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

how can i publish a std::map<std::string, std::string> to a ros topic using roscpp?

asked 2018-08-31 07:18:54 -0500

bugfighter gravatar image

how can i publish a std::map<std::string, std::string=""> to a ros topic using roscpp?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-31 11:47:28 -0500

alsora gravatar image

ROS doesn't provide a map type to be used within messages.

You can see here the list of primitive types http://wiki.ros.org/msg

A solution could be to use two vectors of strings. The first vector will contain the keys and the second one the values.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-08-31 07:18:54 -0500

Seen: 1,099 times

Last updated: Aug 31 '18