Skip to content

Update ROS Bridge to not call the argument a "Radians" or "RadiansPerSecond" when not applicable (should instead be a float) #682

Description

@tabiosg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions