Robotics StackExchange | Archived questions

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

how can i publish a std::map to a ros topic using roscpp?

Asked by bugfighter on 2018-08-31 07:18:54 UTC

Comments

Answers

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.

Asked by alsora on 2018-08-31 11:47:28 UTC

Comments