11#ifndef HalLegTarget_DEFINED
12#define HalLegTarget_DEFINED
90 const bool leg_stop =
false,
91 const bool inRadians =
false)
150 int32_t time = INT_MAX)
175 int32_t time = INT_MAX)
476 if ((stiffness <= 1.0f) && (stiffness >=0.0f)) {
794 std::stringstream ss;
821#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
834 fprintf(stderr,
"NYI - Have it back: %s\n",
const_cast<char *
>(str.c_str()));
Class for moving a SINGLE robotic leg with up to 6 degrees of freedom using local coords of each join...
float get_anklepitch_RAD()
void isAtGoal(bool goalReached)
Leg at Goal Setter Clients/Machines should not use this method.
void setLegPliability(bool hipyawpitch, bool hiproll, bool hippitch, bool kneepitch, bool anklepitch, bool ankleroll)
Individually set the active/passive state of each joint.
void setLegStiffnessMax()
Convenience function to set the stiffness of all the leg's joints to the maximum (1....
void set_target_ankleroll_active(const unsigned int &t_newValue)
uint8_t & target_hipyawpitchstiffness()
float get_kneepitch_RAD()
bool hasSameMirroredPose(const HalLegTarget &other)
Tests if this HalLegTarget object has the same mirrored pose settings as the other HalLegTarget objec...
void mirrorLeg(const HalLegTarget &other)
Convenience function to mirror leg settings about the XZ plane from one HalLegTarget object to anothe...
void set_anklepitch_DEG(float setting)
void set_target_leg_stop(const unsigned int &t_newValue)
void set_target_hipyawpitch_active(const unsigned int &t_newValue)
void set_hipyawpitchstiffness(float setting)
Stiffness Setters.
void set_hippitch_RAD(float setting)
HalLegTarget(const uint8_t &target_leg=0, const float hipyawpitch=0, const float hiproll=0, const float hippitch=0, const float kneepitch=0, const float anklepitch=0, const float ankleroll=0, const float hipyawpitchstiffness=0, const float hiprollstiffness=0, const float hippitchstiffness=0, const float kneepitchstiffness=0, const float anklepitchstiffness=0, const float anklerollstiffness=0, const bool hipyawpitch_active=true, const bool hiproll_active=true, const bool hippitch_active=true, const bool kneepitch_active=true, const bool anklepitch_active=true, const bool ankleroll_active=true, const int32_t movement_time=1000000, const uint8_t pliability=10, const bool leg_stop=false, const bool inRadians=false)
Constructor, defaults to LEFT_LEG.
int32_t & target_movement_time()
bool isLegAllPassive()
Are all of the legs's joints set to passive.
bool isLegPassive()
Are any of the leg's joints set to passive.
void setPose_Rad(float hipyawpitch, float hiproll, float hippitch, float kneepitch, float anklepitch, float ankleroll)
Set Pose in radians.
std::string description() const
Description function.
float get_anklepitch_DEG()
unsigned int target_hiproll_active() const
void set_hiproll_RAD(float setting)
uint8_t & target_kneepitchstiffness()
void set_hippitchstiffness(float setting)
float get_hippitchstiffness()
void set_kneepitchstiffness(float setting)
float get_hiprollstiffness()
void set_ankleroll_RAD(float setting)
bool hasSamePose(const HalLegTarget &other)
Tests if this HalLegTarget object has the same pose settings as the other HalLegTarget object.
HalLegTarget(const std::string &str)
String constructor (NYI)
void goToWithTime_Rad(float hipyawpitch, float hiproll, float hippitch, float kneepitch, float anklepitch, float ankleroll, int32_t time=INT_MAX)
move to position in radians over a given time
void set_target_anklepitch_active(const unsigned int &t_newValue)
void set_anklepitchstiffness(float setting)
void ready()
Set leg to ready state (Default) The leg will act on motion commands.
uint8_t & target_anklerollstiffness()
int16_t & target_hiproll()
unsigned int target_hipyawpitch_active() const
int16_t & target_hipyawpitch()
void set_hippitch_DEG(float setting)
void set_target_hiproll_active(const unsigned int &t_newValue)
float get_hipyawpitch_DEG()
Movement Getters (Degrees)
void tieToLeg(uint8_t leg)
Specify which leg this instance manages.
unsigned int target_hippitch_active() const
unsigned int target_kneepitch_active() const
void set_target_movement_time(const int32_t &t_newValue)
void setLegStiffnessNormal()
Convenience function to set the stiffness of all the leg's joints to what Aldebaran considers 'normal...
void set_hipyawpitch_DEG(float setting)
Movement Setters (Degrees)
uint8_t & target_hiprollstiffness()
uint8_t & target_hippitchstiffness()
void set_kneepitch_DEG(float setting)
void set_target_hipyawpitch(const int16_t &t_newValue)
float get_ankleroll_DEG()
void from_string(const std::string &str)
Parser for recreating this class (NYI)
int16_t & target_ankleroll()
void set_kneepitch_RAD(float setting)
void set_target_ankleroll(const int16_t &t_newValue)
bool atTargetLocation(HalLegTarget status, HalLegTarget tolerance)
Client side test to determine if leg is at the target location, allowing for specified tolerances.
unsigned int target_anklepitch_active() const
void set_target_hiproll(const int16_t &t_newValue)
void set_target_leg(const uint8_t &t_newValue)
void mirrorPose(const HalLegTarget &other)
Convenience function to mirror pose settings about the XZ plane from one HalLegTarget object to anoth...
void set_target_kneepitch_active(const unsigned int &t_newValue)
void set_target_kneepitch(const int16_t &t_newValue)
void set_anklerollstiffness(float setting)
uint8_t & target_anklepitchstiffness()
float get_kneepitch_DEG()
void copyStiffness(const HalLegTarget &other)
Convenience function to copy stiffness settings from one HalLegTarget object to another.
void set_target_anklerollstiffness(const uint8_t &t_newValue)
void set_target_hipyawpitchstiffness(const uint8_t &t_newValue)
void goToWithTime_Deg(float hipyawpitch, float hiproll, float hippitch, float kneepitch, float anklepitch, float ankleroll, int32_t time=INT_MAX)
move to position in degrees over a given time
int16_t & target_kneepitch()
void copyPose(const HalLegTarget &other)
Convenience function to copy pose settings from one HalLegTarget object to another.
void setLegStiffness(float stiffness)
Convenience function to set uniform stiffness on all leg joints to a custom value.
void set_hiproll_DEG(float setting)
float get_anklerollstiffness()
void set_target_hippitchstiffness(const uint8_t &t_newValue)
void set_target_hippitch_active(const unsigned int &t_newValue)
bool hasSameStiffness(const HalLegTarget &other)
Tests if this HalLegTarget object has the same stiffness settings as the other HalLegTarget object.
void setPose_Deg(float hipyawpitch, float hiproll, float hippitch, float kneepitch, float anklepitch, float ankleroll)
Set Pose in degrees.
bool isLegAllActive()
Are all of the leg's joints set to active.
void set_ankleroll_DEG(float setting)
void stop()
Command the leg to stop at its current location and not act on motion commands until ready() is calle...
void set_target_hippitch(const int16_t &t_newValue)
int16_t & target_anklepitch()
float get_ankleroll_RAD()
void setLegActive()
Set leg to be Active (DEDAULT DCM state) The leg is active and manual movements will be resisted,...
void set_anklepitch_RAD(float setting)
void setLegStiffnessOff()
Convenience function to turn off stiffness in all the leg's joints (0.0f).
void set_target_kneepitchstiffness(const uint8_t &t_newValue)
void set_hiprollstiffness(float setting)
void setLegPassive()
Set leg to be Passive Manually moving the leg causes the leg to stay in the new position.
unsigned int target_leg_at_goal() const
float get_hipyawpitchstiffness()
Stiffness Getters.
void set_target_leg_at_goal(const unsigned int &t_newValue)
int16_t & target_hippitch()
float get_kneepitchstiffness()
float get_hipyawpitch_RAD()
Movement Getters (Radians)
void set_target_pliability(const uint8_t &t_newValue)
void set_target_anklepitchstiffness(const uint8_t &t_newValue)
bool atGoal()
Leg at Goal Getter Clients/Machines should use this getter to test if the DCM has reported that the l...
unsigned int target_leg_stop() const
float get_anklepitchstiffness()
void set_target_anklepitch(const int16_t &t_newValue)
uint8_t & target_pliability()
void set_hipyawpitch_RAD(float setting)
Movement Setters (Radians)
void set_target_hiprollstiffness(const uint8_t &t_newValue)
unsigned int target_ankleroll_active() const
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool hipyawpitch_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t anklepitch
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool bool int32_t uint8_t pliability
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t kneepitch
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool anklepitch_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t anklepitchstiffness
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool bool int32_t movement_time
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool hippitch_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool kneepitch_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t anklerollstiffness
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t hiprollstiffness
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool hiproll_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t hippitch
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t hiproll
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t hipyawpitch
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t ankleroll
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t hipyawpitchstiffness
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool bool ankleroll_active
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t kneepitchstiffness
target_hipyawpitch target_hippitch target_anklepitch target_leg target_hiprollstiffness target_kneepitchstiffness target_anklerollstiffness int16_t int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t hippitchstiffness