gusimplewhiteboard
|
Provides a C++ wrapper around wb_nao_sonar_protected_walk_command
.
More...
#include <NaoSonarProtectedWalkCommand.hpp>
Public Member Functions | |
NaoSonarProtectedWalkCommand (bool t_walkEngineOn=false, int16_t t_forward=0, int16_t t_left=0, int8_t t_turn=0, int8_t t_priority=1, bool t_exactStepsRequested=false, uint8_t t_speed=100, 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_odometryResetCounter=0, uint8_t t_bend=0) | |
Create a new NaoSonarProtectedWalkCommand . More... | |
NaoSonarProtectedWalkCommand (const NaoSonarProtectedWalkCommand &t_other) | |
Copy Constructor. More... | |
NaoSonarProtectedWalkCommand (const struct wb_nao_sonar_protected_walk_command &t_other) | |
Copy Constructor. More... | |
NaoSonarProtectedWalkCommand & | operator= (const NaoSonarProtectedWalkCommand &t_other) |
Copy Assignment Operator. More... | |
NaoSonarProtectedWalkCommand & | operator= (const struct wb_nao_sonar_protected_walk_command &t_other) |
Copy Assignment Operator. More... | |
bool | operator== (const NaoSonarProtectedWalkCommand &t_other) const |
bool | operator!= (const NaoSonarProtectedWalkCommand &t_other) const |
bool | operator== (const wb_nao_sonar_protected_walk_command &t_other) const |
bool | operator!= (const wb_nao_sonar_protected_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) |
int8_t & | priority () |
const int8_t & | priority () const |
void | set_priority (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) |
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 & | odometryResetCounter () |
const uint8_t & | odometryResetCounter () const |
void | set_odometryResetCounter (const uint8_t &t_newValue) |
uint8_t & | bend () |
const uint8_t & | bend () const |
void | set_bend (const uint8_t &t_newValue) |
NaoSonarProtectedWalkCommand (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 NaoSonarProtectedWalkCommand | walkProtected (int8_t t_priority, int16_t t_forward, int16_t t_left, int8_t t_turn) |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
static NaoSonarProtectedWalkCommand | walkProtectedPrecisely (int8_t t_priority, 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 NaoSonarProtectedWalkCommand | stop () |
Convenience function to make the nao stop walking. More... | |
static NaoSonarProtectedWalkCommand | standWithStiffness () |
Convenience function to make the nao stand in the 'walk' position (slightly crouched), ready to immediately start walking again. More... | |
static NaoSonarProtectedWalkCommand | standWithMinimalStiffness () |
Convenience function to make the nao stand in the 'STANDING' position, upright with minimal stiffness. More... | |
static NaoSonarProtectedWalkCommand | 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... | |
int8_t | priority |
subsumption priority 1: unprotected walk, command unmodified. More... | |
bool | exactStepsRequested |
No ratcheting, no speed 'buildup', just full step sizes. More... | |
uint8_t | speed |
[0 - 100] modifier for forward etc. 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 | odometryResetCounter |
Odometry will reset any time this is changed or incremented. 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_sonar_protected_walk_command
.
Definition at line 85 of file NaoSonarProtectedWalkCommand.hpp.
|
inline |
Create a new NaoSonarProtectedWalkCommand
.
Definition at line 115 of file NaoSonarProtectedWalkCommand.hpp.
Referenced by disconnectWalk(), operator==(), stop(), and walkProtected().
|
inline |
Copy Constructor.
Definition at line 122 of file NaoSonarProtectedWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), priority(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Copy Constructor.
Definition at line 129 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::bend, wb_nao_sonar_protected_walk_command::exactStepsRequested, wb_nao_sonar_protected_walk_command::forward, wb_nao_sonar_protected_walk_command::isFast, wb_nao_sonar_protected_walk_command::kickWithLeftFoot, wb_nao_sonar_protected_walk_command::left, wb_nao_sonar_protected_walk_command::leftArmLimp, wb_nao_sonar_protected_walk_command::odometryResetCounter, wb_nao_sonar_protected_walk_command::power, wb_nao_sonar_protected_walk_command::priority, wb_nao_sonar_protected_walk_command::rightArmLimp, wb_nao_sonar_protected_walk_command::speed, wb_nao_sonar_protected_walk_command::turn, wb_nao_sonar_protected_walk_command::useShuffle, and wb_nao_sonar_protected_walk_command::walkEngineOn.
|
inline |
String Constructor.
Definition at line 412 of file NaoSonarProtectedWalkCommand.hpp.
References from_string().
|
inline |
Definition at line 393 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::bend.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 398 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::bend.
|
inline |
USE_WB_NAO_SONAR_PROTECTED_WALK_COMMAND_C_CONVERSION
Definition at line 417 of file NaoSonarProtectedWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), NAO_SONAR_PROTECTED_WALK_COMMAND_DESC_BUFFER_SIZE, odometryResetCounter(), power(), priority(), rightArmLimp(), speed(), turn(), useShuffle(), walkEngineOn(), and wb_nao_sonar_protected_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 771 of file NaoSonarProtectedWalkCommand.hpp.
References NaoSonarProtectedWalkCommand(), set_priority(), and set_walkEngineOn().
|
inline |
Definition at line 258 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::exactStepsRequested.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 263 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::exactStepsRequested.
|
inline |
Definition at line 198 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::forward.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 203 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::forward.
|
inline |
USE_WB_NAO_SONAR_PROTECTED_WALK_COMMAND_C_CONVERSION
Definition at line 503 of file NaoSonarProtectedWalkCommand.hpp.
References NAO_SONAR_PROTECTED_WALK_COMMAND_DESC_BUFFER_SIZE, set_bend(), set_exactStepsRequested(), set_forward(), set_isFast(), set_kickWithLeftFoot(), set_left(), set_leftArmLimp(), set_odometryResetCounter(), set_power(), set_priority(), set_rightArmLimp(), set_speed(), set_turn(), set_useShuffle(), and set_walkEngineOn().
Referenced by NaoSonarProtectedWalkCommand().
|
inline |
Definition at line 288 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::isFast.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 293 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::isFast.
|
inline |
Definition at line 303 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::kickWithLeftFoot.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 308 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::kickWithLeftFoot.
|
inline |
Definition at line 213 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::left.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 218 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::left.
|
inline |
Definition at line 333 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::leftArmLimp.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 338 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::leftArmLimp.
|
inline |
Definition at line 378 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::odometryResetCounter.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 383 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::odometryResetCounter.
|
inline |
Definition at line 168 of file NaoSonarProtectedWalkCommand.hpp.
|
inline |
Definition at line 178 of file NaoSonarProtectedWalkCommand.hpp.
|
inline |
Copy Assignment Operator.
Definition at line 136 of file NaoSonarProtectedWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), priority(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Copy Assignment Operator.
Definition at line 144 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::bend, wb_nao_sonar_protected_walk_command::exactStepsRequested, wb_nao_sonar_protected_walk_command::forward, wb_nao_sonar_protected_walk_command::isFast, wb_nao_sonar_protected_walk_command::kickWithLeftFoot, wb_nao_sonar_protected_walk_command::left, wb_nao_sonar_protected_walk_command::leftArmLimp, wb_nao_sonar_protected_walk_command::odometryResetCounter, wb_nao_sonar_protected_walk_command::power, wb_nao_sonar_protected_walk_command::priority, wb_nao_sonar_protected_walk_command::rightArmLimp, wb_nao_sonar_protected_walk_command::speed, wb_nao_sonar_protected_walk_command::turn, wb_nao_sonar_protected_walk_command::useShuffle, and wb_nao_sonar_protected_walk_command::walkEngineOn.
|
inline |
Definition at line 149 of file NaoSonarProtectedWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), odometryResetCounter(), power(), priority(), rightArmLimp(), speed(), turn(), useShuffle(), and walkEngineOn().
|
inline |
Definition at line 173 of file NaoSonarProtectedWalkCommand.hpp.
References NaoSonarProtectedWalkCommand().
|
inline |
Definition at line 363 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::power.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 368 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::power.
|
inline |
Definition at line 243 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::priority.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 248 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::priority.
|
inline |
Definition at line 348 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::rightArmLimp.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 353 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::rightArmLimp.
|
inline |
Definition at line 403 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::bend.
Referenced by from_string(), standWithMinimalStiffness(), standWithStiffness(), stop(), and walkProtected().
|
inline |
Definition at line 268 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::exactStepsRequested.
Referenced by from_string(), and walkProtectedPrecisely().
|
inline |
Definition at line 208 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::forward.
Referenced by from_string(), stop(), and walkProtected().
|
inline |
Definition at line 298 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::isFast.
Referenced by from_string().
|
inline |
Definition at line 313 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::kickWithLeftFoot.
Referenced by from_string().
|
inline |
Definition at line 223 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::left.
Referenced by from_string(), stop(), and walkProtected().
|
inline |
Definition at line 343 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::leftArmLimp.
Referenced by from_string().
|
inline |
Definition at line 388 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::odometryResetCounter.
Referenced by from_string().
|
inline |
Definition at line 373 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::power.
Referenced by from_string().
|
inline |
Definition at line 253 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::priority.
Referenced by disconnectWalk(), from_string(), standWithMinimalStiffness(), standWithStiffness(), stop(), and walkProtected().
|
inline |
Definition at line 358 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::rightArmLimp.
Referenced by from_string().
|
inline |
Definition at line 283 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::speed.
Referenced by from_string().
|
inline |
Definition at line 238 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::turn.
Referenced by from_string(), stop(), and walkProtected().
|
inline |
Definition at line 328 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::useShuffle.
Referenced by from_string().
|
inline |
Definition at line 193 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::walkEngineOn.
Referenced by disconnectWalk(), from_string(), standWithMinimalStiffness(), standWithStiffness(), stop(), and walkProtected().
|
inline |
Definition at line 273 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::speed.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 278 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_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 759 of file NaoSonarProtectedWalkCommand.hpp.
References set_bend(), set_priority(), 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 745 of file NaoSonarProtectedWalkCommand.hpp.
References set_bend(), set_priority(), 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 730 of file NaoSonarProtectedWalkCommand.hpp.
References NaoSonarProtectedWalkCommand(), set_bend(), set_forward(), set_left(), set_priority(), set_turn(), and set_walkEngineOn().
Referenced by standWithMinimalStiffness(), and standWithStiffness().
|
inline |
USE_WB_NAO_SONAR_PROTECTED_WALK_COMMAND_C_CONVERSION
Definition at line 458 of file NaoSonarProtectedWalkCommand.hpp.
References bend(), exactStepsRequested(), forward(), isFast(), kickWithLeftFoot(), left(), leftArmLimp(), NAO_SONAR_PROTECTED_WALK_COMMAND_TO_STRING_BUFFER_SIZE, odometryResetCounter(), power(), priority(), rightArmLimp(), speed(), turn(), useShuffle(), walkEngineOn(), and wb_nao_sonar_protected_walk_command_to_string().
|
inline |
Definition at line 228 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::turn.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 233 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::turn.
|
inline |
Definition at line 318 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::useShuffle.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 323 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::useShuffle.
|
inline |
Definition at line 183 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::walkEngineOn.
Referenced by NaoSonarProtectedWalkCommand(), description(), operator=(), operator==(), and to_string().
|
inline |
Definition at line 188 of file NaoSonarProtectedWalkCommand.hpp.
References wb_nao_sonar_protected_walk_command::walkEngineOn.
|
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 702 of file NaoSonarProtectedWalkCommand.hpp.
References NaoSonarProtectedWalkCommand(), set_bend(), set_forward(), set_left(), set_priority(), set_turn(), and set_walkEngineOn().
Referenced by walkProtectedPrecisely().
|
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 720 of file NaoSonarProtectedWalkCommand.hpp.
References set_exactStepsRequested(), and walkProtected().