How rosbridge finds custom messages?
I want to subscribe a custom message from a rosbridge server.
First I create a custom package and message by following the ROS official tutorial. Then build with catkin tool with catkin_make install
. After source the .bash file I could successfully see my .msg through rosmsg show
, or find my package though rospack find
. However, when I use my client to request my custom message, it shows:
subscribe: Unable to import my_pack.msg from package my_pack. Caused by: No module named my_pack.msg
Note: I am using roslibpy as client side to connect to rosbridge server. Also Ubuntu 16.04 and ROS kinetic
I think my question would be: how rosbridge locates ROS packages? Should I add additional env var such that ROS bridge could find my package?
No, that should not be necessary.
Are you starting the
rosapi_node
? That is required forrosbridge
to understand what msgs/srvs/actions exist.Which launch file do you use to start
rosbridge
?