openrr / urdf-rs

URDF parser for Rust
Apache License 2.0
30 stars 11 forks source link

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

Closed audrow closed 11 months ago

audrow commented 11 months 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 11 months 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 11 months ago

Fixed in 0.7.3.

audrow commented 11 months ago

Nice, thank you for the quick fix!