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

message with array of different messages

asked 2013-05-15 00:38:40 -0500

Hunk gravatar image

Hello,

in my code i define something like

class Sphere { ...
class Plane { ...
...

and defined a vector with different shape types.

Now i want to send this information as ROS message. Is it possible that i can define a message like

 shapes[] shapes

and shape could be plane or sphere?

Thank you for your help

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-15 03:56:36 -0500

dornhege gravatar image

Simple answer: No

Longer answer: You could make a shape message that contains every possible shape. An example would be visualization_msgs/Marker that puts multiple shapes in one message.

edit flag offensive delete link more

Comments

ok thank you, that was my first idea too.

Hunk gravatar image Hunk  ( 2013-05-15 05:54:29 -0500 )edit

Question Tools

Stats

Asked: 2013-05-15 00:38:40 -0500

Seen: 268 times

Last updated: May 15 '13