Currently, we have Velocity or Position commands that we used to assume were always in Radians.
However, now, sometimes, they may be in terms of meters. In this case, we set the value "mAvoidConversionToRevolutions" to true.
Currently, we have the functions "setDesiredPosition" and "setDesiredVelocity" but they take in the arguments Radians. It might make more sense to have these functions be just raw dimensionless/float values and then convert them inside later.
For example,
function_name (float argument_velocity)
argument_velocity = std::clamp (argument_velocity, minvel, maxvel);
Revolutions moteus_input_command;
if (mAvoidConversionToRevolutions) {
moteus_input_command = Revolutions{argument_velocity}; // This treats it as the raw value.
}
else {
moteus_input_command = Radians{argument_velocity};
}
Note that this needs to catkin build so this needs to work for the Brushed Controller as well.
Currently, we have Velocity or Position commands that we used to assume were always in Radians. However, now, sometimes, they may be in terms of meters. In this case, we set the value "mAvoidConversionToRevolutions" to true.
Currently, we have the functions "setDesiredPosition" and "setDesiredVelocity" but they take in the arguments Radians. It might make more sense to have these functions be just raw dimensionless/float values and then convert them inside later.
For example,
Note that this needs to catkin build so this needs to work for the Brushed Controller as well.