gusimplewhiteboard
|
Provides a C++ wrapper around wb_nao_walk_command
.
More...
#include <NaoWalkCommand.hpp>
Public Member Functions | |
NaoWalkCommand (bool t_walkEngineOn=false, int16_t t_forward=0, int16_t t_left=0, int8_t t_turn=0, bool t_exactStepsRequested=false, uint8_t t_speed=100, uint8_t t_odometryResetCounter=0, bool t_isFast=false, bool t_kickWithLeftFoot=true, bool t_useShuffle=true, bool t_leftArmLimp=false, bool t_rightArmLimp=false, uint8_t t_power=0, uint8_t t_bend=0) | |
Create a new NaoWalkCommand . More... | |
NaoWalkCommand (const NaoWalkCommand &t_other) | |
Copy Constructor. More... | |
NaoWalkCommand (const struct wb_nao_walk_command &t_other) | |
Copy Constructor. More... | |
NaoWalkCommand & | operator= (const NaoWalkCommand &t_other) |
Copy Assignment Operator. More... | |
NaoWalkCommand & | operator= (const struct wb_nao_walk_command &t_other) |
Copy Assignment Operator. More... | |
bool | operator== (const NaoWalkCommand &t_other) const |
bool | operator!= (const NaoWalkCommand &t_other) const |
bool | operator== (const wb_nao_walk_command &t_other) const |
bool | operator!= (const wb_nao_walk_command &t_other) const |
bool & | walkEngineOn () |
const bool & | walkEngineOn () const |
void | set_walkEngineOn (const bool &t_newValue) |
int16_t & | forward () |
const int16_t & | forward () const |
void | set_forward (const int16_t &t_newValue) |
int16_t & | left () |
const int16_t & | left () const |
void | set_left (const int16_t &t_newValue) |
int8_t & | turn () |
const int8_t & | turn () const |
void | set_turn (const int8_t &t_newValue) |
bool & | exactStepsRequested () |
const bool & | exactStepsRequested () const |
void | set_exactStepsRequested (const bool &t_newValue) |
uint8_t & | speed () |
const uint8_t & | speed () const |
void | set_speed (const uint8_t &t_newValue) |
uint8_t & | odometryResetCounter () |
const uint8_t & | odometryResetCounter () const |
void | set_odometryResetCounter (const uint8_t &t_newValue) |
bool & | isFast () |
const bool & | isFast () const |
void | set_isFast (const bool &t_newValue) |
bool & | kickWithLeftFoot () |
const bool & | kickWithLeftFoot () const |
void | set_kickWithLeftFoot (const bool &t_newValue) |
bool & | useShuffle () |
const bool & | useShuffle () const |
void | set_useShuffle (const bool &t_newValue) |
bool & | leftArmLimp () |
const bool & | leftArmLimp () const |
void | set_leftArmLimp (const bool &t_newValue) |
bool & | rightArmLimp () |
const bool & | rightArmLimp () const |
void | set_rightArmLimp (const bool &t_newValue) |
uint8_t & | power () |
const uint8_t & | power () const |
void | set_power (const uint8_t &t_newValue) |
uint8_t & | bend () |
const uint8_t & | bend () const |
void | set_bend (const uint8_t &t_newValue) |
NaoWalkCommand (const std::string &t_str) | |
String Constructor. More... | |
std::string | description () |
std::string | to_string () |
void | from_string (const std::string &t_str) |
Static Public Member Functions | |
static NaoWalkCommand | walk (int16_t t_forward, int16_t t_left, int8_t t_turn) |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
static NaoWalkCommand | walkPrecisely (int16_t t_forward, int16_t t_left, int8_t t_turn) |
Convenience function to make the nao walk, with precise step distances. More... | |
static NaoWalkCommand | stop () |
Convenience function to make the nao stop walking. More... | |
static NaoWalkCommand | standWithStiffness () |
Convenience function to make the nao stand in the 'walk' position (slightly crouched), ready to immediately start walking again. More... | |
static NaoWalkCommand | standWithMinimalStiffness () |
Convenience function to make the nao stand in the 'STANDING' position, upright with minimal stiffness. More... | |
static NaoWalkCommand | disconnectWalk () |
Convenience function to disconnect the walk engine from the DCM. More... | |
Additional Inherited Members | |
![]() | |
bool | walkEngineOn |
connects the dcm callbacks. More... | |
int16_t | forward |
[-300 - 300] step-size(mm) per second, limited to +/- 300mm/step More... | |
int16_t | left |
[-200 - 200] step-size(mm) per second, limited to +/- 200mm/step More... | |
int8_t | turn |
[-85 - 85] step-size(mm) per second, limited to +/- 85deg/step More... | |
bool | exactStepsRequested |
No ratcheting, no speed 'buildup', just full step sizes. More... | |
uint8_t | speed |
[0 - 100] modifier for forward etc. More... | |
uint8_t | odometryResetCounter |
Odometry will reset any time this is changed or incremented. More... | |
bool | isFast |
for kicks. More... | |
bool | kickWithLeftFoot |
which foot to use for kicking More... | |
bool | useShuffle |
limits the step height so the robot 'shuffles' instead of taking larger steps. More... | |
bool | leftArmLimp |
lower stiffness in the arms when walking, allows the arm to move a little more. More... | |
bool | rightArmLimp |
lower stiffness in the arms when walking, allows the arm to move a little more. More... | |
uint8_t | power |
[0 - 100] stiffness, auto set to minimum needed values. More... | |
uint8_t | bend |
[0 - 1] controls what the robot does when stopped, 0 == STAND and lower stiffness, 1 == stay in READY, crouched and ready to walk immediately. More... | |
Provides a C++ wrapper around wb_nao_walk_command
.
Definition at line 83 of file NaoWalkCommand.hpp.
|
inline |
Create a new NaoWalkCommand
.
Definition at line 112 of file NaoWalkCommand.hpp.
Referenced by disconnectWalk(), operator==(), stop(), and walk().
|
inline |
Copy Constructor.
Definition at line 119 of file NaoWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Copy Constructor.
Definition at line 126 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::bend, wb_nao_walk_command::exactStepsRequested, wb_nao_walk_command::forward, wb_nao_walk_command::isFast, wb_nao_walk_command::kickWithLeftFoot, wb_nao_walk_command::left, wb_nao_walk_command::leftArmLimp, wb_nao_walk_command::odometryResetCounter, wb_nao_walk_command::power, wb_nao_walk_command::rightArmLimp, wb_nao_walk_command::speed, wb_nao_walk_command::turn, wb_nao_walk_command::useShuffle, and wb_nao_walk_command::walkEngineOn.
|
inline |
|
inline |
Definition at line 374 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::bend.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 379 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::bend.
|
inline |
USE_WB_NAO_WALK_COMMAND_C_CONVERSION
Definition at line 398 of file NaoWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), NAOWALKCOMMAND_DESC_BUFFER_SIZE, odometryResetCounter(), power(), rightArmLimp(), speed(), turn(), useShuffle(), walkEngineOn(), and wb_nao_walk_command_description().
|
inlinestatic |
Convenience function to disconnect the walk engine from the DCM.
This must be done in order to give control of the joints to another module, like the Motion Player. You should return to the CROUCH position via 'standWithStiffness' or 'stop' before doing this, to ensure a smooth motion control transition.
Definition at line 735 of file NaoWalkCommand.hpp.
References NaoWalkCommand(), and set_walkEngineOn().
|
inline |
Definition at line 239 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::exactStepsRequested.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 244 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::exactStepsRequested.
|
inline |
Definition at line 194 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::forward.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 199 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::forward.
|
inline |
USE_WB_NAO_WALK_COMMAND_C_CONVERSION
Definition at line 480 of file NaoWalkCommand.hpp.
References NAOWALKCOMMAND_DESC_BUFFER_SIZE, set_bend(), set_exactStepsRequested(), set_forward(), set_isFast(), set_kickWithLeftFoot(), set_left(), set_leftArmLimp(), set_odometryResetCounter(), set_power(), set_rightArmLimp(), set_speed(), set_turn(), set_useShuffle(), and set_walkEngineOn().
Referenced by NaoWalkCommand().
|
inline |
Definition at line 284 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::isFast.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 289 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::isFast.
|
inline |
Definition at line 299 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::kickWithLeftFoot.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 304 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::kickWithLeftFoot.
|
inline |
Definition at line 209 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::left.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 214 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::left.
|
inline |
Definition at line 329 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::leftArmLimp.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 334 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::leftArmLimp.
|
inline |
Definition at line 269 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::odometryResetCounter.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 274 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::odometryResetCounter.
|
inline |
Definition at line 164 of file NaoWalkCommand.hpp.
|
inline |
Definition at line 174 of file NaoWalkCommand.hpp.
|
inline |
Copy Assignment Operator.
Definition at line 133 of file NaoWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Copy Assignment Operator.
Definition at line 141 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::bend, wb_nao_walk_command::exactStepsRequested, wb_nao_walk_command::forward, wb_nao_walk_command::isFast, wb_nao_walk_command::kickWithLeftFoot, wb_nao_walk_command::left, wb_nao_walk_command::leftArmLimp, wb_nao_walk_command::odometryResetCounter, wb_nao_walk_command::power, wb_nao_walk_command::rightArmLimp, wb_nao_walk_command::speed, wb_nao_walk_command::turn, wb_nao_walk_command::useShuffle, and wb_nao_walk_command::walkEngineOn.
|
inline |
Definition at line 146 of file NaoWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Definition at line 169 of file NaoWalkCommand.hpp.
References NaoWalkCommand().
|
inline |
Definition at line 359 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::power.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 364 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::power.
|
inline |
Definition at line 344 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::rightArmLimp.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 349 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::rightArmLimp.
|
inline |
Definition at line 384 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::bend.
Referenced by from_string(), standWithMinimalStiffness(), standWithStiffness(), stop(), and walk().
|
inline |
Definition at line 249 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::exactStepsRequested.
Referenced by from_string(), and walkPrecisely().
|
inline |
Definition at line 204 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::forward.
Referenced by from_string(), stop(), and walk().
|
inline |
Definition at line 294 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::isFast.
Referenced by from_string().
|
inline |
Definition at line 309 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::kickWithLeftFoot.
Referenced by from_string().
|
inline |
Definition at line 219 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::left.
Referenced by from_string(), stop(), and walk().
|
inline |
Definition at line 339 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::leftArmLimp.
Referenced by from_string().
|
inline |
Definition at line 279 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::odometryResetCounter.
Referenced by from_string().
|
inline |
Definition at line 369 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::power.
Referenced by from_string().
|
inline |
Definition at line 354 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::rightArmLimp.
Referenced by from_string().
|
inline |
Definition at line 264 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::speed.
Referenced by from_string().
|
inline |
Definition at line 234 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::turn.
Referenced by from_string(), stop(), and walk().
|
inline |
Definition at line 324 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::useShuffle.
Referenced by from_string().
|
inline |
Definition at line 189 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::walkEngineOn.
Referenced by disconnectWalk(), from_string(), standWithMinimalStiffness(), standWithStiffness(), stop(), and walk().
|
inline |
Definition at line 254 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::speed.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 259 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::speed.
|
inlinestatic |
Convenience function to make the nao stand in the 'STANDING' position, upright with minimal stiffness.
Good for longer pauses in movement, to save on battery and motor wear. You should always return to the CROUCH position before giving up control of the DCM with a 'disconnectWalk'. If you don't return to that position, other motion activities like the MotionPlayer may 'jerk' when activated. You do not need to return to the CROUCH position when you issue walk commands, it will be done automatically.
Definition at line 724 of file NaoWalkCommand.hpp.
References set_bend(), set_walkEngineOn(), and stop().
|
inlinestatic |
Convenience function to make the nao stand in the 'walk' position (slightly crouched), ready to immediately start walking again.
This is handy for returning from the STANDING position, reached via 'standWithMinimalStiffness'.
Definition at line 713 of file NaoWalkCommand.hpp.
References set_bend(), set_walkEngineOn(), and stop().
|
inlinestatic |
Convenience function to make the nao stop walking.
The robot will slow down and stop, remaining in the 'walking' position (slightly crouched).
Definition at line 699 of file NaoWalkCommand.hpp.
References NaoWalkCommand(), set_bend(), set_forward(), set_left(), set_turn(), and set_walkEngineOn().
Referenced by standWithMinimalStiffness(), and standWithStiffness().
|
inline |
USE_WB_NAO_WALK_COMMAND_C_CONVERSION
Definition at line 437 of file NaoWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), NAOWALKCOMMAND_TO_STRING_BUFFER_SIZE, odometryResetCounter(), power(), rightArmLimp(), speed(), turn(), useShuffle(), walkEngineOn(), and wb_nao_walk_command_to_string().
|
inline |
Definition at line 224 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::turn.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 229 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::turn.
|
inline |
Definition at line 314 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::useShuffle.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 319 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::useShuffle.
|
inlinestatic |
WHITEBOARD_POSTER_STRING_CONVERSION.
Convenience function to make the nao walk.
t_forward | see struct documentation. |
t_left | see struct documentation. |
t_turn | see struct documentation. |
Definition at line 672 of file NaoWalkCommand.hpp.
References NaoWalkCommand(), set_bend(), set_forward(), set_left(), set_turn(), and set_walkEngineOn().
Referenced by walkPrecisely().
|
inline |
Definition at line 179 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::walkEngineOn.
Referenced by NaoWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 184 of file NaoWalkCommand.hpp.
References wb_nao_walk_command::walkEngineOn.
|
inlinestatic |
Convenience function to make the nao walk, with precise step distances.
There is no speed buildup with this method, it uses a consistent step size and speed. This is good for small accurate movements, like lining up a kick.
t_forward | see struct documentation. |
t_left | see struct documentation. |
t_turn | see struct documentation. |
Definition at line 689 of file NaoWalkCommand.hpp.
References set_exactStepsRequested(), and walk().