openrr / urdf-rs

URDF parser for Rust
Apache License 2.0
32 stars 12 forks source link

Fix yaserde deserialization of Joint limits #74

Closed patrvanh closed 1 year ago

patrvanh commented 1 year ago

This fixes the bug described in this #64 comment.

luca-della-vedova commented 1 year ago

Beat me to it, thanks! Yep yaserde needs explicit tagging for fields that are stored in attributes and will not automatically work for both attributes and child elements as serde-xml-rs used to do. There might be more lurking in code that was not covered by test

taiki-e commented 1 year ago

Thanks for the PR! I have looked at other structs, and it appears that the Mimic, SafetyController, and Dynamics's fields are also all attributes: https://wiki.ros.org/urdf/XML/joint

Could you also update them?