joint_state_publisher icon indicating copy to clipboard operation
joint_state_publisher copied to clipboard

Incorrect order of joints using ROS Humble

Open IvoD1998 opened this issue 2 years ago • 4 comments

Hello

When trying to use the joint states of the robot for a forward kinematic calculation, we noticed that the order of the joint positions seems to be published incorrectly. It appears that the order of joints is now published as:

  • joint1
  • joint2
  • joint5
  • joint3
  • joint4
  • joint6

(see screenshot below for added clarity)

Screenshot from 2023-02-15 11-50-42

Thank you in advance! Ivo Dekker

IvoD1998 avatar Feb 15 '23 10:02 IvoD1998

Can you please describe why that is wrong, and how joint_state_publisher is involved here?

clalancette avatar Feb 15 '23 14:02 clalancette

We were wondering why the list of joints as published by the joint state publisher does not match the sequential order they are supposed to be in according to the robot URDF. We tested this with various different robot models and got the same result. It could of course also be an issue on the side of the MoveIt configs for the robots, but we are uncertain.

IvoD1998 avatar Feb 15 '23 15:02 IvoD1998

Can I use foxglove to do this ? What do I need to do ?

karanchahal avatar Mar 05 '23 20:03 karanchahal

It looks like there is an intent to publish the joints in a fixed order:

https://github.com/ros/joint_state_publisher/blob/424fd9e1955fddf38f1b3e1721baf9f6e9322d6b/joint_state_publisher/joint_state_publisher/joint_state_publisher.py#L344

Mind posting a urdf that shows the issue? It might be the change in order came from the urdf parser, as that's where joint_state_publisher gets the order from

https://github.com/ros/joint_state_publisher/blob/424fd9e1955fddf38f1b3e1721baf9f6e9322d6b/joint_state_publisher/joint_state_publisher/joint_state_publisher.py#L87-L98

sloretz avatar Mar 06 '23 17:03 sloretz