DFKI-NI / rospy_message_converter

Converts between Python dictionaries and JSON to ROS messages.
BSD 3-Clause "New" or "Revised" License
227 stars 101 forks source link

Avoid numpy dependency #44

Closed betaboon closed 4 years ago

betaboon commented 4 years ago

hopefully solves #43 in the desired way

betaboon commented 4 years ago

@mintar i don't know how to fix the failing test as i don't understand it due to the high complexity there

mintar commented 4 years ago

i don't know how to fix the failing test as i don't understand it due to the high complexity there

It took me a while, too! The bug was that the python_int_types list was shared across all the int/uint dictionary entries and mutated. This lead to all those entries having the full list of types, so the type check incorrectly passed for all types (e.g., assigning a numpy.uint64 to a std_msgs.Int32 passed, which it shouldn't). I fixed that in 61219728. Good thing we have unit tests!

Thanks for the PR, I'm going to merge and re-release.

betaboon commented 4 years ago

@mintar thanks for fixing it :)

mintar commented 4 years ago

The release is out, so this version should be available after the next sync (couple of weeks):