ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How rosbridge finds custom messages?

asked 2019-03-05 16:50:36 -0500

wthwlh gravatar image

updated 2019-03-05 17:25:22 -0500

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?

edit retag flag offensive close merge delete


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 for rosbridge to understand what msgs/srvs/actions exist.

Which launch file do you use to start rosbridge?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 01:35:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-06 12:59:47 -0500

wthwlh gravatar image

@gvdhoom Thanks for the reply, I have figured that out, it turns out I didn't source my setup.bash in that rosbridge server window...That is stupid...

edit flag offensive delete link more



Well .. that would certainly be required, yes.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 13:06:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-03-05 16:50:36 -0500

Seen: 1,260 times

Last updated: Mar 05 '19