Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does JointTrajectoryController assume that joints are rotational? #432

Open
alain-m opened this issue Oct 17, 2019 · 3 comments · May be fixed by #623
Open

Does JointTrajectoryController assume that joints are rotational? #432

alain-m opened this issue Oct 17, 2019 · 3 comments · May be fixed by #623

Comments

@alain-m
Copy link

alain-m commented Oct 17, 2019

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...

@bmagyar
Copy link
Member

bmagyar commented Jan 10, 2020

I think you are quite right about this. Did you come around to solve it in the end or still building your 3+ meters long linear joint? :)

@alain-m
Copy link
Author

alain-m commented Jan 10, 2020

I don't have a 3+m long linear joint so I was never really affected by this, just wanted to point it out for the next guy :)

@steinmn
Copy link

steinmn commented Mar 25, 2022

As "the next guy", thank you so much for this comment @alain-m. This was really giving me a headache until I found this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants