gusimplewhiteboard
guWhiteboard::NaoSonarProtectedWalkCommand Class Reference

Provides a C++ wrapper around wb_nao_sonar_protected_walk_command. More...

#include <NaoSonarProtectedWalkCommand.hpp>

Inheritance diagram for guWhiteboard::NaoSonarProtectedWalkCommand:
Collaboration diagram for guWhiteboard::NaoSonarProtectedWalkCommand:

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...
 
NaoSonarProtectedWalkCommandoperator= (const NaoSonarProtectedWalkCommand &t_other)
 Copy Assignment Operator. More...
 
NaoSonarProtectedWalkCommandoperator= (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

- Public Attributes inherited from wb_nao_sonar_protected_walk_command
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...
 

Detailed Description

Provides a C++ wrapper around wb_nao_sonar_protected_walk_command.

Definition at line 85 of file NaoSonarProtectedWalkCommand.hpp.

Constructor & Destructor Documentation

◆ NaoSonarProtectedWalkCommand() [1/4]

guWhiteboard::NaoSonarProtectedWalkCommand::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 
)
inline

◆ NaoSonarProtectedWalkCommand() [2/4]

guWhiteboard::NaoSonarProtectedWalkCommand::NaoSonarProtectedWalkCommand ( const NaoSonarProtectedWalkCommand t_other)
inline

◆ NaoSonarProtectedWalkCommand() [3/4]

◆ NaoSonarProtectedWalkCommand() [4/4]

guWhiteboard::NaoSonarProtectedWalkCommand::NaoSonarProtectedWalkCommand ( const std::string &  t_str)
inline

String Constructor.

Definition at line 412 of file NaoSonarProtectedWalkCommand.hpp.

References from_string().

Member Function Documentation

◆ bend() [1/2]

uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::bend ( )
inline

◆ bend() [2/2]

const uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::bend ( ) const
inline

◆ description()

std::string guWhiteboard::NaoSonarProtectedWalkCommand::description ( )
inline

◆ disconnectWalk()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::disconnectWalk ( )
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.

Returns
A NaoSonarProtectedWalkCommand instance

Definition at line 771 of file NaoSonarProtectedWalkCommand.hpp.

References NaoSonarProtectedWalkCommand(), set_priority(), and set_walkEngineOn().

◆ exactStepsRequested() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::exactStepsRequested ( )
inline

◆ exactStepsRequested() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::exactStepsRequested ( ) const
inline

◆ forward() [1/2]

int16_t & guWhiteboard::NaoSonarProtectedWalkCommand::forward ( )
inline

◆ forward() [2/2]

const int16_t & guWhiteboard::NaoSonarProtectedWalkCommand::forward ( ) const
inline

◆ from_string()

void guWhiteboard::NaoSonarProtectedWalkCommand::from_string ( const std::string &  t_str)
inline

◆ isFast() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::isFast ( )
inline

◆ isFast() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::isFast ( ) const
inline

◆ kickWithLeftFoot() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::kickWithLeftFoot ( )
inline

◆ kickWithLeftFoot() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::kickWithLeftFoot ( ) const
inline

◆ left() [1/2]

int16_t & guWhiteboard::NaoSonarProtectedWalkCommand::left ( )
inline

◆ left() [2/2]

const int16_t & guWhiteboard::NaoSonarProtectedWalkCommand::left ( ) const
inline

◆ leftArmLimp() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::leftArmLimp ( )
inline

◆ leftArmLimp() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::leftArmLimp ( ) const
inline

◆ odometryResetCounter() [1/2]

uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::odometryResetCounter ( )
inline

◆ odometryResetCounter() [2/2]

const uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::odometryResetCounter ( ) const
inline

◆ operator!=() [1/2]

bool guWhiteboard::NaoSonarProtectedWalkCommand::operator!= ( const NaoSonarProtectedWalkCommand t_other) const
inline

Definition at line 168 of file NaoSonarProtectedWalkCommand.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::NaoSonarProtectedWalkCommand::operator!= ( const wb_nao_sonar_protected_walk_command t_other) const
inline

Definition at line 178 of file NaoSonarProtectedWalkCommand.hpp.

◆ operator=() [1/2]

NaoSonarProtectedWalkCommand & guWhiteboard::NaoSonarProtectedWalkCommand::operator= ( const NaoSonarProtectedWalkCommand t_other)
inline

◆ operator=() [2/2]

◆ operator==() [1/2]

bool guWhiteboard::NaoSonarProtectedWalkCommand::operator== ( const NaoSonarProtectedWalkCommand t_other) const
inline

◆ operator==() [2/2]

bool guWhiteboard::NaoSonarProtectedWalkCommand::operator== ( const wb_nao_sonar_protected_walk_command t_other) const
inline

Definition at line 173 of file NaoSonarProtectedWalkCommand.hpp.

References NaoSonarProtectedWalkCommand().

◆ power() [1/2]

uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::power ( )
inline

◆ power() [2/2]

const uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::power ( ) const
inline

◆ priority() [1/2]

int8_t & guWhiteboard::NaoSonarProtectedWalkCommand::priority ( )
inline

◆ priority() [2/2]

const int8_t & guWhiteboard::NaoSonarProtectedWalkCommand::priority ( ) const
inline

◆ rightArmLimp() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::rightArmLimp ( )
inline

◆ rightArmLimp() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::rightArmLimp ( ) const
inline

◆ set_bend()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_bend ( const uint8_t &  t_newValue)
inline

◆ set_exactStepsRequested()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_exactStepsRequested ( const bool &  t_newValue)
inline

◆ set_forward()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_forward ( const int16_t &  t_newValue)
inline

◆ set_isFast()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_isFast ( const bool &  t_newValue)
inline

◆ set_kickWithLeftFoot()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_kickWithLeftFoot ( const bool &  t_newValue)
inline

◆ set_left()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_left ( const int16_t &  t_newValue)
inline

◆ set_leftArmLimp()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_leftArmLimp ( const bool &  t_newValue)
inline

◆ set_odometryResetCounter()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_odometryResetCounter ( const uint8_t &  t_newValue)
inline

◆ set_power()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_power ( const uint8_t &  t_newValue)
inline

Definition at line 373 of file NaoSonarProtectedWalkCommand.hpp.

References wb_nao_sonar_protected_walk_command::power.

Referenced by from_string().

◆ set_priority()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_priority ( const int8_t &  t_newValue)
inline

◆ set_rightArmLimp()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_rightArmLimp ( const bool &  t_newValue)
inline

◆ set_speed()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_speed ( const uint8_t &  t_newValue)
inline

Definition at line 283 of file NaoSonarProtectedWalkCommand.hpp.

References wb_nao_sonar_protected_walk_command::speed.

Referenced by from_string().

◆ set_turn()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_turn ( const int8_t &  t_newValue)
inline

◆ set_useShuffle()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_useShuffle ( const bool &  t_newValue)
inline

◆ set_walkEngineOn()

void guWhiteboard::NaoSonarProtectedWalkCommand::set_walkEngineOn ( const bool &  t_newValue)
inline

◆ speed() [1/2]

uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::speed ( )
inline

◆ speed() [2/2]

const uint8_t & guWhiteboard::NaoSonarProtectedWalkCommand::speed ( ) const
inline

◆ standWithMinimalStiffness()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::standWithMinimalStiffness ( )
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.

Returns
A NaoSonarProtectedWalkCommand instance

Definition at line 759 of file NaoSonarProtectedWalkCommand.hpp.

References set_bend(), set_priority(), set_walkEngineOn(), and stop().

◆ standWithStiffness()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::standWithStiffness ( )
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'.

Returns
A NaoSonarProtectedWalkCommand instance

Definition at line 745 of file NaoSonarProtectedWalkCommand.hpp.

References set_bend(), set_priority(), set_walkEngineOn(), and stop().

◆ stop()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::stop ( )
inlinestatic

Convenience function to make the nao stop walking.

The robot will slow down and stop, remaining in the 'walking' position (slightly crouched).

Returns
A NaoSonarProtectedWalkCommand instance

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().

◆ to_string()

std::string guWhiteboard::NaoSonarProtectedWalkCommand::to_string ( )
inline

◆ turn() [1/2]

int8_t & guWhiteboard::NaoSonarProtectedWalkCommand::turn ( )
inline

◆ turn() [2/2]

const int8_t & guWhiteboard::NaoSonarProtectedWalkCommand::turn ( ) const
inline

◆ useShuffle() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::useShuffle ( )
inline

◆ useShuffle() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::useShuffle ( ) const
inline

◆ walkEngineOn() [1/2]

bool & guWhiteboard::NaoSonarProtectedWalkCommand::walkEngineOn ( )
inline

◆ walkEngineOn() [2/2]

const bool & guWhiteboard::NaoSonarProtectedWalkCommand::walkEngineOn ( ) const
inline

◆ walkProtected()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::walkProtected ( int8_t  t_priority,
int16_t  t_forward,
int16_t  t_left,
int8_t  t_turn 
)
inlinestatic

WHITEBOARD_POSTER_STRING_CONVERSION.

Convenience function to make the nao walk.

Parameters
t_forwardsee struct documentation.
t_leftsee struct documentation.
t_turnsee struct documentation.
Returns
A NaoSonarProtectedWalkCommand instance

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().

◆ walkProtectedPrecisely()

static NaoSonarProtectedWalkCommand guWhiteboard::NaoSonarProtectedWalkCommand::walkProtectedPrecisely ( int8_t  t_priority,
int16_t  t_forward,
int16_t  t_left,
int8_t  t_turn 
)
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.

Parameters
t_forwardsee struct documentation.
t_leftsee struct documentation.
t_turnsee struct documentation.
Returns
A NaoSonarProtectedWalkCommand instance

Definition at line 720 of file NaoSonarProtectedWalkCommand.hpp.

References set_exactStepsRequested(), and walkProtected().


The documentation for this class was generated from the following file: