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

What type of messages can be used in services?(existing and custom)

asked 2012-07-07 11:21:04 -0600

Nishant gravatar image

updated 2012-07-07 11:22:17 -0600

Hello!

I was just curious about what kind of messages I can transmit over services and topics. Is there a list available somewhere which I can refer to for this? I know that simple messages can be of the following types

1)a built-in type, such as "float32 pan" or "string name"

2)names of Message descriptions defined on their own, such as "geometry_msgs/PoseStamped"

3)fixed- or variable-length arrays (lists) of the above, such as "float32[] ranges" or "Point32[10] points"

4)the special Header type, which maps to std_msgs/Header

Also, what if I want to pass my own class instance as a message? What do I need to do that?

All help is greatly appreciated. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-07-07 11:28:09 -0600

cagatay gravatar image

hello you can look at the type of messages from here

http://www.ros.org/wiki/msg

in order to look what is inside of a specific message header file, you can check its reference

for example here is the laserscan msg

http://www.ros.org/doc/api/sensor_msgs/html/msg/LaserScan.html

if you want to create your own services and messages, check out this wiki below

http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv

hope these help you

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-07 11:21:04 -0600

Seen: 751 times

Last updated: Jul 07 '12