Skip to content

Commit

Permalink
Merge pull request #1 from sebcrozet/mesh-scale
Browse files Browse the repository at this point in the history
feat: parse the mesh’s "scale" attribute
  • Loading branch information
neka-nat authored Jun 3, 2024
2 parents 4c22a75 + 17d17f3 commit 54dde2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xurdf/src/urdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ fn parse_geometry(node: roxmltree::Node) -> Result<Geometry> {
let filename = child
.attribute("filename")
.ok_or(anyhow::anyhow!("Failed to parse mesh filename"))?;
let scale = child
.attribute("scale")
.and_then(|s| parse_string_to_vector3(s).ok());
return Ok(Geometry::Mesh {
filename: filename.to_string(),
scale: None,
scale,
});
}
&_ => (),
Expand Down

0 comments on commit 54dde2f

Please sign in to comment.