Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
Header
Collaboration diagram for Header:

Functions

void MX28_SetMultiTurnOffset (Dynamixel_HandleTypeDef *hdynamixel, int16_t offset)
 For an actuator in multi-turn mode, this applies a tunable offset to all positions. That is it allows you to change where the actuator considers position 0 to be. For an actuator not in multi-turn mode, this setting has no effect. More...
 
void MX28_SetResolutionDivider (Dynamixel_HandleTypeDef *hdynamixel, uint8_t divider)
 Unimplemented. This function should change the resolution divider, allowing for more precise or less precise control settings depending on the value. More...
 
void MX28_SetDGain (Dynamixel_HandleTypeDef *hdynamixel, uint8_t DGain)
 Sets the value of the derivative gain used in the motor's PID controller. More...
 
void MX28_SetIGain (Dynamixel_HandleTypeDef *hdynamixel, uint8_t IGain)
 Sets the value of the integral gain used in the motor's PID controller. More...
 
void MX28_SetPGain (Dynamixel_HandleTypeDef *hdynamixel, uint8_t PGain)
 Sets the value of the proportional gain used in the motor's PID controller. More...
 
void MX28_SetGoalAcceleration (Dynamixel_HandleTypeDef *hdynamixel, float goalAcceleration)
 Sets the goal acceleration. The argument should be in units of degree/s^2. More...
 
void MX28_EnterMultiTurnMode (Dynamixel_HandleTypeDef *hdynamixel)
 Activates multi-turn mode, which allows the actuator to have a range of controllable position values from -28672 to 28672. More...
 

Variables

const uint8_t MX28_MAX_VELOCITY
 
const uint8_t MX28_DEFAULT_BAUD_RATE
 
const uint16_t MX28_DEFAULT_CCW_ANGLE_LIMIT
 
const uint8_t MX28_DEFAULT_HIGHEST_VOLTAGE_LIMIT
 
const uint8_t MX28_DEFAULT_D_GAIN
 
const uint8_t MX28_DEFAULT_I_GAIN
 
const uint8_t MX28_DEFAULT_P_GAIN
 
const uint16_t MX28_DEFAULT_PUNCH
 

Detailed Description

Function Documentation

◆ MX28_EnterMultiTurnMode()

void MX28_EnterMultiTurnMode ( Dynamixel_HandleTypeDef hdynamixel)

Activates multi-turn mode, which allows the actuator to have a range of controllable position values from -28672 to 28672.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 238 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetDGain()

void MX28_SetDGain ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  DGain 
)

Sets the value of the derivative gain used in the motor's PID controller.

kD = DGain / 250

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
DGainthe derivative gain parameter
Returns
None

Definition at line 137 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetGoalAcceleration()

void MX28_SetGoalAcceleration ( Dynamixel_HandleTypeDef hdynamixel,
float  goalAcceleration 
)

Sets the goal acceleration. The argument should be in units of degree/s^2.

Special: goalAcceleration of 0 means no control over accel (uses max acceleration of motor)

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
goalAccelerationthe target acceleration in degree/s^2
Returns
None

Definition at line 186 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetIGain()

void MX28_SetIGain ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  IGain 
)

Sets the value of the integral gain used in the motor's PID controller.

kI = IGain * 125/256

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
IGainthe integral gain parameter
Returns
None

Definition at line 153 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetMultiTurnOffset()

void MX28_SetMultiTurnOffset ( Dynamixel_HandleTypeDef hdynamixel,
int16_t  offset 
)

For an actuator in multi-turn mode, this applies a tunable offset to all positions. That is it allows you to change where the actuator considers position 0 to be. For an actuator not in multi-turn mode, this setting has no effect.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
offsetthe signed offset argument indicating the offset value to program
Returns
None

Definition at line 100 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetPGain()

void MX28_SetPGain ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  PGain 
)

Sets the value of the proportional gain used in the motor's PID controller.

kP = PGain / 8

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
PGainthe proportional gain parameter
Returns
None

Definition at line 169 of file MX28.c.

Here is the call graph for this function:

◆ MX28_SetResolutionDivider()

void MX28_SetResolutionDivider ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  divider 
)

Unimplemented. This function should change the resolution divider, allowing for more precise or less precise control settings depending on the value.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
dividerthe resolution divider setting
Returns
None

Definition at line 124 of file MX28.c.

Variable Documentation

◆ MX28_DEFAULT_BAUD_RATE

const uint8_t MX28_DEFAULT_BAUD_RATE

Default baud rate register setting

Definition at line 42 of file MX28.c.

◆ MX28_DEFAULT_CCW_ANGLE_LIMIT

const uint16_t MX28_DEFAULT_CCW_ANGLE_LIMIT

Default counter-clockwise angle limit

Definition at line 43 of file MX28.c.

◆ MX28_DEFAULT_D_GAIN

const uint8_t MX28_DEFAULT_D_GAIN

Default derivative gain parameter value

Definition at line 45 of file MX28.c.

◆ MX28_DEFAULT_HIGHEST_VOLTAGE_LIMIT

const uint8_t MX28_DEFAULT_HIGHEST_VOLTAGE_LIMIT

Default permitted maximum voltage (0xA0 = 160 -> 16.0 V)

Definition at line 44 of file MX28.c.

◆ MX28_DEFAULT_I_GAIN

const uint8_t MX28_DEFAULT_I_GAIN

Default integral gain parameter value

Definition at line 46 of file MX28.c.

◆ MX28_DEFAULT_P_GAIN

const uint8_t MX28_DEFAULT_P_GAIN

Default proportional gain parameter value

Definition at line 47 of file MX28.c.

◆ MX28_DEFAULT_PUNCH

const uint16_t MX28_DEFAULT_PUNCH

Default punch

Definition at line 48 of file MX28.c.

◆ MX28_MAX_VELOCITY

const uint8_t MX28_MAX_VELOCITY

Maximum angular velocity (RPM)

Definition at line 39 of file MX28.c.