Skip to content

Does JointTrajectoryController assume that joints are rotational? #432

@alain-m

Description

@alain-m

Does JointTrajectoryController assume that joints are rotational - continuous, revolute - instead of linear - prismatic -? I cannot find any such assumption documented on the wiki or in the code, but maybe I missed something.
I see the angle_wraparound_ member, apparently used to differentiate continuous from revolute joints.
The calculation for the state_joint_error_ on position at https://github.com/ros-controls/ros_controllers/blob/melodic-devel/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller_impl.h#L390 and that for the state_error on position at https://github.com/ros-controls/ros_controllers/blob/melodic-devel/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller_impl.h#L394 use angles::shortest_angular_distance which will always give you a result in [-pi;pi].
It would be confusing to find that the position error on my linear joint mysteriously doesn't want to go beyond [-3.14meters;3.14meters], although a linear joint with such a length is probably not very common...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions