ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Could not load the file sensor_msgs/JointState.h

asked 2019-05-20 04:28:59 -0500

Robin Hède gravatar image


I have an error with the package robot_state_publisher when I'm try to catkin_make_isolated with ROS Melodic on Raspbian 9 (stretch).

Specifically, I get an error from the file robot_state_publisher/include/robot_state_publisher/joint_state_listener.h on line 43.

fatal error: sensor_msgs/JointState.h: No such file or directory

However, the dependency sensor_msgs is correctly loaded in the package.xml file and the searched file exists at the indicated path.

Could you help me ?

Best regards,

Robin Hède.

edit retag flag offensive close merge delete



This would seem to be a cross-post of ros/robot_state_publisher#110.

Cross-posting is considered bad practice. Please try to refrain from it.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-20 05:25:31 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-05-24 08:31:43 -0500

Robin Hède gravatar image

updated 2019-05-24 08:33:01 -0500

The solution is available here.

edit flag offensive delete link more


So do I understand your comment on ros/robot_state_publisher#110 correctly when I believe you had a Catkin workspace seeded with a .rosinstall file that you generated using rosinstall_generator but you specified ros_comm as the base package instead of any of the variants defined in REP-150? Then adding robot_state_publisher (again: from source) to that workspace failed to build as it could not find sensor_msgs/JointState?

If yes: did you not get CMake errors telling you that it could not find the sensor_msgs package in your workspace?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-24 09:05:00 -0500 )edit

Yes, I used ROS-Comm because this variant is listed in the installation procedure.

With this package path, I did not have the robot_state_publisher dependency require to install the sick_tim package.

Then, the mistake that I made was to clone the git repository directly into the source directory (~/ros_catkin_ws/src) instead of installing it cleanly.

From now on, I install everything directly via the command rosinstall_generator robot sick_tim --rosdistro melodic --deps --tar > melodic-robot.rosinstall.

Robin Hède gravatar image Robin Hède  ( 2019-05-24 09:31:29 -0500 )edit

Question Tools



Asked: 2019-05-20 04:27:55 -0500

Seen: 531 times

Last updated: May 24 '19