# urdf-rs
[](https://travis-ci.org/OTL/urdf-rs)
[URDF](http://wiki.ros.org/urdf) parser using [serde-xml-rs](https://github.com/RReverser/serde-xml-rs) for rust.
Only [link](http://wiki.ros.org/urdf/XML/link) and [joint](http://wiki.ros.org/urdf/XML/joint) are supported.
[Documentation](https://docs.rs/urdf-rs/)
## Example
You can access urdf elements like below example.
```rust
extern crate urdf_rs;
let urdf_robo = urdf_rs::read_file("sample.urdf").unwrap();
let links = urdf_robo.links;
println!("{:?}", links[0].visual.origin.xyz);
let joints = urdf_robo.joints;
println!("{:?}", joints[0].origin.xyz);
```
## Limitation
### order of elements
You have to repeat "link" tags and "joint" tags in the urdf, like
```
<link />
<link />
<link />
<joint />
<joint />
<joint />
```
Below style does not work now.
```
<link />
<joint />
<link />
<joint />
<link />
<joint />
```
### Mesh
* Only .obj files are supported now. Please convert meshes and edit the urdf.
* `package://` path is ignored. $CWD is used instead.