ros / joint_state_publisher

http://wiki.ros.org/joint_state_publisher
50 stars 81 forks source link

Prismatic joints aren't supported #79

Open AndyZe opened 2 years ago

AndyZe commented 2 years ago

You can tell by searching for prismatic here: https://github.com/ros/joint_state_publisher/blob/ros2/joint_state_publisher/joint_state_publisher/joint_state_publisher.py

It's not a big deal but I wanted to raise the issue so others don't waste their time.

clalancette commented 2 years ago

Did joint_state_publisher support prismatic joints in ROS 1? I also looked for prismatic in https://github.com/ros/joint_state_publisher/blob/noetic-devel/joint_state_publisher/src/joint_state_publisher/__init__.py , and I didn't find anything.

DLu commented 2 years ago

So prismatic isn't explicitly called out, but the joint types are handled in this block: https://github.com/ros/joint_state_publisher/blob/0a765c0ef26b59ba230992fa0eeb8610a61643ed/joint_state_publisher/joint_state_publisher/joint_state_publisher.py#L95-L109

floating and planar are excluded (because they would require multiple sliders).

continuous joints are handled with a special case because their limits don't exist.

prismatic and revolute joints are handled implicitly by the else block.

Can you given an example of how it doesn't work? If you launch the URDF tutorial that uses joint_state_publisher_gui, you should be able to extend/retract the arm using the prismatic joint gripper_extension

screenshot from urdf_tutorial