[ros-users] Error in Publishing the composite messages

Tully Foote tfoote at willowgarage.com
Tue Nov 9 02:31:12 UTC 2010

Hi Soonhac,

rostopic pub uses yaml syntax on the command line.
http://www.ros.org/wiki/ROS/YAMLCommandLine you need to put all the things
you want to publish into yaml.

It looks like you are hoping that it will republish data from another
topic.  That sort of behavior is very ill defined and way to complicated for
just yaml syntax.  To do that you will have to write a node to receive the
data from both topics synchronize them if desired and then resend it,
filling in the other fields as applicable.


On Mon, Nov 8, 2010 at 5:53 PM, Soonhac Hong <soonhac.hong at gmail.com> wrote:

> Hi,
> I'm trying to implement the composite message of string, image and
> numbers as follows.
> <my_msgs.msg>
> string name
> sensor_msgs/Image left_image
> sensor_msgs/Image right_image
> int32 size
> int32 maximum
> When I ran the rostopic to generate the my_msgs, there is an errors as
> the follows.
> $rostopic pub -r 1 /my_test test_msgs/my_msgs BlockMatch /BB2/left_rgb
> /BB2/right_rgb 11 256
> ERROR: No key named [/BB2/left_rgb]
> Args are: [name left_image.header.seq left_image.header.stamp
> left_image.header.frame_id left_image.height left_image.width
> left_image.encoding left_image.is_bigendian left_image.step
> left_image.data right_image.header.seq right_image.header.stamp
> right_image.header.frame_id right_image.height right_image.width
> right_image.encoding right_image.is_bigendian right_image.step
> right_image.data size maximum]
> However, when I checked the rostopic list, /BB2/left_rgb and
> /BB2/right_rgb was publishing properly and it was double checked by
> image_view. The environment is boxturtle 1.0.5 on the Ubuntu 9.10
> Any comment would be highly appreciated.
> Best,
> Soonhac
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users

Tully Foote
Systems Engineer
Willow Garage, Inc.
tfoote at willowgarage.com
(650) 475-2827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101108/f26a99c3/attachment-0003.html>

More information about the ros-users mailing list