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

Prismatic joints aren't supported #79

Open
AndyZe opened this issue May 3, 2022 · 2 comments
Open

Prismatic joints aren't supported #79

AndyZe opened this issue May 3, 2022 · 2 comments

Comments

@AndyZe
Copy link

AndyZe commented May 3, 2022

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
Copy link
Collaborator

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.

@AndyZe AndyZe changed the title Prismatic joints aren't supported in ROS2 Prismatic joints aren't supported May 3, 2022
@DLu
Copy link
Contributor

DLu commented May 19, 2022

So prismatic isn't explicitly called out, but the joint types are handled in this block:

if jtype in ['fixed', 'floating', 'planar']:
continue
name = child.getAttribute('name')
self.joint_list.append(name)
if jtype == 'continuous':
minval = -math.pi
maxval = math.pi
else:
try:
limit = child.getElementsByTagName('limit')[0]
minval = float(limit.getAttribute('lower'))
maxval = float(limit.getAttribute('upper'))
except:
self.get_logger().warn('%s is not fixed, nor continuous, but limits are not specified!' % name)
continue

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

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

No branches or pull requests

3 participants