ros-visualization / rqt_service_caller

http://wiki.ros.org/rqt_service_caller
7 stars 10 forks source link

Fixed handling of services with arrays inside them #23

Open sprenger120 opened 2 years ago

sprenger120 commented 2 years ago

This PR fixes two things that I've found not working at all.

I've added a small class called Map, which implements access by dot. This class was not written by be, but rather taken from the supplied stackoverflow link, tell me, if that would be a licensing problem.

To easily test my changes, I've written up a small test application which provides a service with arrays and outputs its content upon being called. See --> here

Potential problem A dynamically sized array would be written, for the UI, like this [{'data1': 1, 'data2': 2}, {'data1': 5, 'data2': 6}]. If you forget to specify one dict key, present in the message definition, you get the previously mentioned serialization exception again. There needs to be some sort of default initialization of all message members in the dict, but I'm unsure how do it.