11#ifndef HalArmTarget_DEFINED
12#define HalArmTarget_DEFINED
82 const float hand_PCT = 0,
97 const bool arm_stop =
false,
98 const bool inRadians =
false)
192 int32_t time = INT_MAX)
217 int32_t time = INT_MAX)
519 if ((stiffness <= 1.0f) && (stiffness >=0.0f)) {
828 std::stringstream ss;
855#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
868 fprintf(stderr,
"NYI - Have it back: %s\n",
const_cast<char *
>(str.c_str()));
Class for moving a SINGLE robotic arm with up to 6 degrees of freedom using local coords of each join...
void set_shoulderpitch_RAD(float setting)
Movement Setters (Radians)
void set_target_hand_active(const unsigned int &t_newValue)
unsigned int target_arm_stop() const
bool atTargetLocation(HalArmTarget status, HalArmTarget tolerance)
Client side test to determine if arm is at the target location, allowing for specified tolerances.
void set_shoulderpitchstiffness(float setting)
Stiffness Setters.
void set_target_wrist_active(const unsigned int &t_newValue)
uint8_t & target_pliability()
void set_target_shoulderroll_active(const unsigned int &t_newValue)
void set_elbowrollstiffness(float setting)
void set_target_shoulderpitchstiffness(const uint8_t &t_newValue)
void set_target_arm_at_goal(const unsigned int &t_newValue)
float get_elbowroll_DEG()
int16_t & target_shoulderroll()
void setArmStiffness(float stiffness)
Convenience function to set uniform stiffness on all arm joints to a custom value.
void setArmStiffnessNormal()
Convenience function to set the stiffness of all the arm's joints to what Aldebaran considers 'normal...
void stop()
Command the arm to stop at its current location and not act on motion commands until ready() is calle...
void setPose_Rad(float shoulderpitch, float shoulderroll, float elbowroll, float elbowyaw, float wristyaw, float hand)
Set Pose in radians.
void set_target_elbowroll(const int16_t &t_newValue)
uint8_t & target_wristyawstiffness()
void set_target_elbowrollstiffness(const uint8_t &t_newValue)
float get_shoulderroll_RAD()
void set_wristyawstiffness(float setting)
void set_elbowroll_RAD(float setting)
unsigned int target_hand_active() const
int16_t & target_shoulderpitch()
void set_target_movement_time(const int32_t &t_newValue)
unsigned int target_elbowyaw_active() const
void set_target_elbowyawstiffness(const uint8_t &t_newValue)
uint8_t & target_shoulderrollstiffness()
float get_elbowroll_RAD()
void set_elbowyaw_DEG(float setting)
uint8_t & target_handstiffness()
bool atGoal()
Arm at Goal Getter Clients/Machines should use this getter to test if the DCM has reported that the a...
void set_target_wristyaw(const int16_t &t_newValue)
void set_target_hand(const uint8_t &t_newValue)
uint8_t & target_elbowrollstiffness()
void ready()
Set arm to ready state (Default) The arm will act on motion commands.
void tieToArm(uint8_t arm)
Specify which arm this instance manages.
uint8_t & target_shoulderpitchstiffness()
uint8_t & target_elbowyawstiffness()
int32_t & target_movement_time()
void setArmStiffnessOff()
Convenience function to turn off stiffness in all the arm's joints (0.0f).
void copyStiffness(const HalArmTarget &other)
Convenience function to copy stiffness settings from one HalArmTarget object to another.
void set_handstiffness(float setting)
void set_elbowyawstiffness(float setting)
void copyPose(const HalArmTarget &other)
Convenience function to copy pose settings from one HalArmTarget object to another.
void set_wristyaw_RAD(float setting)
float get_elbowyawstiffness()
void setArmPliability(bool shoulderpitch, bool shoulderroll, bool elbowroll, bool elbowyaw, bool wristyaw, bool hand)
Individually set the active/passive state of each joint.
void set_shoulderroll_RAD(float setting)
void set_target_wristyawstiffness(const uint8_t &t_newValue)
void setPose_Deg(float shoulderpitch, float shoulderroll, float elbowroll, float elbowyaw, float wristyaw, float hand)
Set Pose in degrees.
float get_hand()
Hand Movement Getter.
void set_target_arm_stop(const unsigned int &t_newValue)
void from_string(const std::string &str)
Parser for recreating this class (NYI)
void set_shoulderroll_DEG(float setting)
float get_wristyawstiffness()
void set_target_elbowyaw_active(const unsigned int &t_newValue)
void set_target_shoulderrollstiffness(const uint8_t &t_newValue)
void set_shoulderpitch_DEG(float setting)
Movement Setters (Degrees)
unsigned int target_wrist_active() const
void set_target_handstiffness(const uint8_t &t_newValue)
void set_hand(float setting)
Hand Movement Setter.
void set_wristyaw_DEG(float setting)
void set_target_pliability(const uint8_t &t_newValue)
void goToWithTime_Rad(float shoulderpitch, float shoulderroll, float elbowroll, float elbowyaw, float wristyaw, float hand, int32_t time=INT_MAX)
move to position in radians over a given time
bool hasSamePose(const HalArmTarget &other)
Tests if this HalArmTarget object has the same pose settings as the other HalArmTarget object.
float get_shoulderroll_DEG()
void set_target_arm(const uint8_t &t_newValue)
void mirrorPose(const HalArmTarget &other)
Convenience function to mirror pose settings about the XZ plane from one HalArmTarget object to anoth...
int16_t & target_elbowroll()
HalArmTarget(const uint8_t &target_arm=0, const float shoulderpitch=0, const float shoulderroll=0, const float elbowroll=0, const float elbowyaw=0, const float wristyaw=0, const float hand_PCT=0, const float shoulderpitchstiffness=0, const float shoulderrollstiffness=0, const float elbowrollstiffness=0, const float elbowyawstiffness=0, const float wristyawstiffness=0, const float handstiffness=0, const bool shoulderpitch_active=true, const bool shoulderroll_active=true, const bool elbowroll_active=true, const bool elbowyaw_active=true, const bool wrist_active=true, const bool hand_active=true, const int32_t movement_time=1000000, const uint8_t pliability=10, const bool arm_stop=false, const bool inRadians=false)
Constructor, defaults to LEFT_ARM.
void set_target_shoulderroll(const int16_t &t_newValue)
void set_elbowroll_DEG(float setting)
bool isArmAllActive()
Are all of the arm's joints set to active.
float get_shoulderpitchstiffness()
Stiffness Getters.
void set_target_shoulderpitch_active(const unsigned int &t_newValue)
float get_handstiffness()
unsigned int target_elbowroll_active() const
void setArmPassive()
Set arm to be Passive Manually moving the arm causes the arm to remain in the new position.
void goToWithTime_Deg(float shoulderpitch, float shoulderroll, float elbowroll, float elbowyaw, float wristyaw, float hand, int32_t time=INT_MAX)
move to position expressed in degrees over a given time
void set_target_elbowroll_active(const unsigned int &t_newValue)
void set_target_shoulderpitch(const int16_t &t_newValue)
bool hasSameMirroredPose(const HalArmTarget &other)
Tests if this HalArmTarget object has the same mirrored pose settings as the other HalArmTarget objec...
bool hasSameStiffness(const HalArmTarget &other)
Tests if this HalArmTarget object has the same stiffness settings as the other HalArmTarget object.
void setArmActive()
Set arm to be Active (DEDAULT DCM state) The arm is active and manual movements will be resisted,...
float get_shoulderpitch_RAD()
Movement Getters (Radians)
HalArmTarget(const std::string &str)
String constructor (NYI)
void set_elbowyaw_RAD(float setting)
unsigned int target_arm_at_goal() const
unsigned int target_shoulderpitch_active() const
void isAtGoal(bool goalReached)
Arm at Goal Setter Clients/Machines should not use this method.
void setArmStiffnessMax()
Convenience function to set the stiffness of all the arm's joints to the maximum (1....
float get_shoulderrollstiffness()
float get_elbowrollstiffness()
unsigned int target_shoulderroll_active() const
void set_shoulderrollstiffness(float setting)
int16_t & target_elbowyaw()
bool isArmPassive()
Are any of the arm's joints set to passive.
void mirrorArm(const HalArmTarget &other)
Convenience function to mirror arm settings about the XZ plane from one HalArmTarget object to anothe...
std::string description() const
Description function.
int16_t & target_wristyaw()
void set_target_elbowyaw(const int16_t &t_newValue)
bool isArmAllPassive()
Are all of the arm's joints set to passive.
float get_shoulderpitch_DEG()
Movement Getters (Degrees)
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t wristyaw
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t wristyawstiffness
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t elbowyawstiffness
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_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_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t elbowyaw
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t shoulderrollstiffness
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t shoulderpitch
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool bool hand_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool shoulderroll_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t elbowroll
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool wrist_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t handstiffness
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool shoulderpitch_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t shoulderroll
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool bool bool int32_t movement_time
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool bool elbowyaw_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t uint8_t bool bool bool elbowroll_active
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t hand
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t shoulderpitchstiffness
target_shoulderpitch target_elbowroll target_wristyaw target_hand target_shoulderrollstiffness target_elbowyawstiffness target_handstiffness int16_t int16_t int16_t int16_t int16_t uint8_t uint8_t uint8_t uint8_t elbowrollstiffness