mehmetkillioglu / ros2_message_converter

Ros2_message_converter is a lightweight ROS2 package and Python library to convert from Python dictionaries and JSON messages to rclpy messages, and vice versa
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

updated _is_field_type_a_primitive_array #6

Open dustingooding opened 2 years ago

dustingooding commented 2 years ago

types like double[x] were passing through _is_field_type_a_primitive_array() undetected, and get_fields_and_field_types was being called on a python list (which fails). this fixes that. validated with a complex message sensor_msgs/msg/NavSatFix. also validated that the generated JSON is correctly converted back into a ROS2 message.