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

ROSSerial Msg.h equivalent in ROS

asked 2017-01-18 17:08:19 -0500

inkspell4 gravatar image

Is their a equivalent in the main ROS structure for the Msg.h contained in rosserial. I have need for the ability to use a single call to serialize and serialize a range of different message types. Any thoughts?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-19 02:48:19 -0500

gvdhoorn gravatar image

If you're not using Python, I believe the only way to do that would be to use the ShapeShifter (and perhaps in combination with facontidavide/ros_type_introspection).

For ShapeShifter there are some good posts on this board on how to use it / find references. It's not really documented, as it's not really meant as a public API.

edit flag offensive delete link more


what is the shapeshifter meant to do, from what I could tell it looks to be a type of publisher?

inkspell4 gravatar image inkspell4  ( 2017-01-19 14:59:31 -0500 )edit

As far as I can tell it would seem to allow you to do exactly what you asked for: use a single subscriber to subscribe to multiple topics, each of a different type.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-19 15:21:56 -0500 )edit

What function would be used for subscribing? All I can see is advertise which would create a publisher.

inkspell4 gravatar image inkspell4  ( 2017-01-22 14:23:51 -0500 )edit

The ros_type_introspection has some tutorials that will probably help you.

The answer to #q50375 also contains some hints.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-22 15:29:44 -0500 )edit

Ok, I was looking at the class in the wrong way that is exactly what I need. Thank you.

inkspell4 gravatar image inkspell4  ( 2017-01-22 16:22:38 -0500 )edit

Question Tools



Asked: 2017-01-18 17:08:19 -0500

Seen: 111 times

Last updated: Jan 19 '17