This article is part of the article here. First, please take a look at this.
FIRST At first. For climbing steps. I will also explain the climb part of Robot.java.
If you think about it, you have to start by explaining how to climb ... I can hardly understand it at first sight, so even if I leave the understanding behind ... In the first place, the article is a style that leaves the reader behind ...
This is the part to climb, and the rest is tidied up
When I tried to put out the whole flow at once, it was blocked by the size upper limit ... Complement in the brain: pray:
Being able to climb a step
Substitute motor and solenoid
Receive and enter information from state
Set the speed on the motor. If you comment out the process here, it will not work.
Lock with stopper
Remove the stopper
Omitted because you can see it.
Roughly divide into the first half and the second half.
Post-processing until and after climbing.
Switch the operation with switch (State.climbSequence)
.
By the way, if there is no step in front of you, the robot will fall down and it will be very bad, so I started with a button that is difficult to press.
kLiftUp Since there are two heights of the step, the operation is divided by the input of the command. Set the height with PID control and move. After confirming that the target value has been reached, move to kLocking.
kLocking Put out the stopper here. For the time being, keep the height of the lift. Consider the time to lock, wait 0.3 seconds before moving to kAdvance.
kAdvance Lower the lift and lift the robot. Run the motor in the back frame where the stopper is hooked to move forward.
kLiftUp Raise the lift
kUnlocking Remove the stopper. Then the back frame is returned by the spring. (It should have been, but in reality it was returned due to rough work)
LAST Finally. Honestly, can you see the operation of this area as a robot student? It was hard to understand at first glance. It's not so if it's said that this area will be useful in the future, so ...
Previous article ⇒ Grabber related Next article ⇒ What to write ..: thinking:
Recommended Posts