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

How rosbridge finds custom messages?

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

wthwlh gravatar image

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

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

Comments

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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Comments

1

Well .. that would certainly be required, yes.

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

Question Tools

Stats

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

Seen: 2,054 times

Last updated: Mar 05 '19