Atlas Sim Interface
1.0
|
Structure for feedback data specific to the Walk behavior. More...
#include <AtlasControlTypes.h>
Structure for feedback data specific to the Walk behavior.
Public Member Functions | |
AtlasBehaviorWalkFeedback () | |
Default constructor. | |
Public Attributes | |
float | t_step_rem |
Estimated step time remaining. | |
int32_t | current_step_index |
Current step index. | |
int32_t | next_step_index_needed |
Next step index needed. | |
uint32_t | status_flags |
Bit-wise array of AtlasBehaviorWalkFlags values indicating Walk behavior status. | |
AtlasBehaviorStepData | step_queue_saturated [NUM_REQUIRED_WALK_STEPS] |
Saturated copy of step_queue from user. |
AtlasBehaviorWalkFeedback::AtlasBehaviorWalkFeedback | ( | ) | [inline] |
Default constructor.
Estimated step time remaining.
Current step index.
Step 0 is the position of the foot at the beginning of Walk. Step 1 is the first user-specified foot position, etc.
The step index will increase as Walk progresses. It will reset to 0 on behavior changes.
Next step index needed.
At the next touchdown, Walk will be looking for step data with indices starting with next_step_index_needed. This will usually be roughly current_step_index plus four.
This variable should be watched to know when the next step should be queued.
Bit-wise array of AtlasBehaviorWalkFlags values indicating Walk behavior status.
All flags are 0 when the behavior begins, and will be set to 1 at appropriate times.
All flags will latch unless otherwise noted. "Latch" means that once the flag is set to 1, it won't be re-set to 0 until the behavior is left and re-entered.
To check a flag, use something like:
if (walk_feedback.status_flags & WALK_ERROR_INCONSISTENT_STEPS) do_something_about_the_error();
Flags:
Walk is preparing to take a its first step by swaying the body. This flag does not latch. Only one of WALK_SUBSTATE_SWAYING, WALK_SUBSTATE_STEPPING, or WALK_SUBSTATE_CATCHING will be set at any given time.
Walk is actively stepping. This flag does not latch.
Walk has stopped stepping and is preparing to go back to Stand. This flag does not latch.
Walk was unable to find the number of steps it was looking for and has triggered an attempt to go back to Stand. (Does not latch.)
Walk detected the user tried to take 2 steps with the same foot, and attempt to go back into Stand.
Saturated copy of step_queue from user.
Walk will do its best to reach the desired step data, but may have to modify data to fit within constraints. The modified data is contained in this variable.