openrr / urdf-rs

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

write_to_string exports with "Robot" tag instead of "robot" #80

Closed audrow closed 1 year ago

audrow commented 1 year ago

The write_to_string function uses uppercase "Robot" tag. This can't be used directly by Rviz (and probably other ROS tools) without converting to lowercase "robot" tag.

Simple work around:

urdf_rs::write_to_string(&urdf)?.replace("<Robot", "<robot").replace("</Robot", "</robot")
taiki-e commented 1 year ago

Oh, this is another bug introduced in https://github.com/openrr/urdf-rs/pull/64. We should probably use #[yaserde(root = "robot")]#[yaserde(rename = "robot")] on the Robot struct.

Thanks for the report!

taiki-e commented 1 year ago

Fixed in 0.7.3.

audrow commented 1 year ago

Nice, thank you for the quick fix!