Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions reflex_driver/src/reflex_hand.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ namespace reflex_hand
static const uint16_t DYN_MIN_RAW = 0;
static const uint16_t DYN_MAX_RAW = 4095;
static const uint16_t DYN_MIN_RAW_WRAPPED = 16383; // For checking negative wraps
static const float DYN_POS_SCALE = (4 * 2 * 3.141596) / 4095; // Assuming resolution divider of 4
static const float DYN_VEL_SCALE = 0.01194; // rad/s for every velocity command -- http://support.robotis.com/en/product/dynamixel/mx_series/mx-28.htm#Actuator_Address_20
static const float ENC_SCALE = (2 * 3.141596) / 16383;
static constexpr float DYN_POS_SCALE = (4 * 2 * 3.141596) / 4095; // Assuming resolution divider of 4
static constexpr float DYN_VEL_SCALE = 0.01194; // rad/s for every velocity command -- http://support.robotis.com/en/product/dynamixel/mx_series/mx-28.htm#Actuator_Address_20
static constexpr float ENC_SCALE = (2 * 3.141596) / 16383;
enum ControlMode{CM_IDLE = 0, CM_VELOCITY = 1, CM_POSITION = 2};

typedef boost::function<void(const ReflexHandState * const)> StateCallback;
Expand Down
8 changes: 4 additions & 4 deletions reflex_driver2/src/reflex_hand.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ namespace reflex_hand
static const uint16_t DYN_MIN_RAW_WRAPPED = 16383;

// Assuming resolution divider of 4
static const float DYN_POS_SCALE = (4 * 2 * 3.141596) / 4095;
static constexpr float DYN_POS_SCALE = (4 * 2 * 3.141596) / 4095;

/*
rad/s for every velocity command --
http://support.robotis.com/en/product/dynamixel
/mx_series/mx-28.htm#Actuator_Address_20
*/
static const float DYN_VEL_SCALE = 0.01194;
static const float ENC_SCALE = (2 * 3.141596) / 16383;
static constexpr float DYN_VEL_SCALE = 0.01194;
static constexpr float ENC_SCALE = (2 * 3.141596) / 16383;

enum ControlMode{ CM_IDLE = 0,
CM_VELOCITY = 1,
Expand Down Expand Up @@ -116,4 +116,4 @@ namespace reflex_hand
};
}

#endif
#endif