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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 345 times

Last updated: Aug 31 '18