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

publish new defined message type in ros indigo

asked 2015-04-23 00:15:14 -0500

crazymumu gravatar image

I want to publish new type message like std:map which store obstacle information.How can i do that?
Could you give me some suggestions. Thanks so much.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2015-04-23 08:19:23 -0500

aak2166 gravatar image

You need to create a .msg file in a msg/ directory. You can create the message using the ROS Message Description Language.

Then you will need to add some info about the message to your package.xml and CMakeLists.txt see here.

edit flag offensive delete link more

Comments

thanks so much

crazymumu gravatar image crazymumu  ( 2015-04-24 17:56:06 -0500 )edit
0

answered 2015-04-23 20:17:37 -0500

crazymumu gravatar image

std::map can't be published, I use array instead.

edit flag offensive delete link more

Comments

you should use the comment function instead of posting an "answer" for that. Do you try to publish it with "rostopic pub" or where do you try to publish it? You should add a bit of more information, like your code, errors etc.

cyborg-x1 gravatar image cyborg-x1  ( 2015-04-24 03:33:07 -0500 )edit

thanks, i will use comment function. I try to use std::map define as a new message. I check the link aak2166 give to me. Fix that problem.

crazymumu gravatar image crazymumu  ( 2015-04-24 17:56:08 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-23 00:15:14 -0500

Seen: 220 times

Last updated: Apr 23 '15