ros / robot_state_publisher

Allows you to publish the state of a robot (i.e the position of its base and all joints) via the "tf" transform library
http://www.ros.org/wiki/robot_state_publisher
BSD 3-Clause "New" or "Revised" License
84 stars 163 forks source link

Missing urdf_parser_plugin exec_dependencies? #187

Open RiZom-91 opened 2 years ago

RiZom-91 commented 2 years ago

Hi,

I've noticed this package depends on urdf for build and execution but urdf only depends on urdf_parser_plugin for build not execution. As a result, running ros2 run robot_state_publisher robot_state_publisher <urdf_file> fails with the following error on my setup:

terminate called after throwing an instance of 'pluginlib::ClassLoaderException'
  what():  package 'urdf_parser_plugin' not found, searching: [/usr]

I can modify my setup to add urdf_parser_plugin to execution dependencies but maybe it should be changed at package level.

Best Regards, Romain GIMENEZ

clalancette commented 2 years ago

Sorry for the long delay in answering here. This error is pretty weird to me, because urdf_parser_plugin isn't an instantiated class; it is only a header file. So it really should only be necessary at build time, not at runtime. Can you give more details on what ROS 2 distribution you are using, what URDF file you are using, and the version of robot_state_publisher and urdf_parser_plugin you have?

SeeRich commented 2 years ago

@RiZom-91 Could you please elaborate on what you did to work around this issue. I am encountering the same issue and adding ROS_EXEC_DEPENDS = "urdf-parser-plugin" to my bitbake recipe file does not seem to fix the issue? Any advice would be appreciated.

whni commented 2 months ago

@clalancette Hi I am encountering the same issue. Not sure if this issue is still under track. My env is Yocto (kirkstone) + ROS 2 (humble)

[robot_state_publisher-1] terminate called after throwing an instance of 'pluginlib::ClassLoaderException'
[robot_state_publisher-1]   what():  package 'urdf_parser_plugin' not found, searching: [/usr]
[ERROR] [robot_state_publisher-1]: process has died [pid 933, exit code -6, cmd '/usr/lib/robot_state_publisher/robot_state_publisher --ros-args --params-file /tmp/launch_params_vcvbvyxx --params-file /tmp/launch_params_kvj4v1d7'].
whni commented 2 months ago

Solved by adding

RDEPENDS:${PN} += "urdf-parser-plugin"

to urdf_%.bbappend

image