Ask Your Question
0

Adding a standard msg within the custom msg [closed]

asked 2015-09-22 17:56:51 -0500

cjusto gravatar image

Hi! I've made my custom message following the tutorial here. It works fine. What i want to do is to include some information in my message, as a twist.msg, for instance.

How can I declare this on my .msg file? Something like this? :

geometry_msgs/Twist Base
geometry_msgs/Quaternion Turret
uint8  battery

would this work when catkin making all the custom messages?

Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by cjusto
close date 2015-11-19 06:58:10.743037

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-22 18:19:02 -0500

Mani gravatar image

That is the correct way to define the message defintion. In addition:

  1. Make sure you add proper dependencies to geometry_msgs and std_msgs in your package's package.xml and your CMakeLists.txt files.

  2. You need to also add those dependencies to generate_messages macro in package's CMakeLists.txt:

generate_messages( DEPENDENCIES std_msgs geometry_msgs )

edit flag offensive delete link more

Comments

Thank You so much Mani.

As soon as I finish all the message content, i'll make them and I'll let You know on the success.

:)

cjusto gravatar imagecjusto ( 2015-09-22 18:39:57 -0500 )edit

You are welcome. Hopefully it will compile without any hassle.

Mani gravatar imageMani ( 2015-09-22 21:52:57 -0500 )edit

Question Tools

Stats

Asked: 2015-09-22 17:56:51 -0500

Seen: 233 times

Last updated: Sep 22 '15