Error from gazebo_ros_joint_state_publisher: Joint <joint_name> does not exist!
Hi Everyone,
ROS2 Humble, Gazebo11.
I am using the gazebo plugin gazebo_ros_joint_state_publisher in my URDF as follows:
<plugin name="joint_states" filename="libgazebo_ros_joint_state_publisher.so">
<joint_name>left_front_wheel_joint</joint_name>
<joint_name>right_front_wheel_joint</joint_name>
<joint_name>base_to_left_back_wheel</joint_name>
<joint_name>base_to_right_back_wheel</joint_name>
<joint_name>front_left_steer_joint</joint_name>
<joint_name>front_right_steer_joint</joint_name>
<update_rate>100</update_rate>
</plugin>
But when I run this I get the following errors:
gzserver-1] [ERROR] [1679572299.127302596] [joint_states]: Joint left_front_wheel_joint does not exist!
gzserver-1] [ERROR] [1679572299.127366060] [joint_states]: Joint right_front_wheel_joint does not exist!
gzserver-1] [INFO] [1679572299.127389593] [joint_states]: Going to publish joint [base_to_left_back_wheel]
gzserver-1] [INFO] [1679572299.127410405] [joint_states]: Going to publish joint [base_to_right_back_wheel]
gzserver-1] [ERROR] [1679572299.127440221] [joint_states]: Joint front_left_steer_joint does not exist!
gzserver-1] [ERROR] [1679572299.127461168] [joint_states]: Joint front_right_steer_joint does not exist!
So only 2 out of the 6 joints are published. The plugin has a problem with the other 4. There is no difference in how I've set up the URDF for the joints that work, and those that don't. I've gone through and proof-read the code. There are no errors prior to this (such as XML formatting errors, unknown links and so forth).
I have made sure to rebuild my code. And have even removed the /install, /build and /log directories and then rebuilt.
Anyone have any ideas as to what might be causing the issue? Thanks.
Just because that happens to me sometimes: Have you checked again whether the joint names match those in the URDF? I just noticed that sometimes you add _joint in the naming of your joint and sometimes you don't.