I just learned of the new Jade xacro macros as part of [a PR](https://github.com/ros-industrial/kuka_experimental/pull/117#issuecomment-372887599) I submitted. In switching to using `${radians(foo)}`, the build [failed](https://travis-ci.org/ros-industrial/kuka_experimental/builds/353158609). In comparing to other robots in the `kuka_experimental` repository, I found a few differences, one of which being the `--inorder` flag. I [was informed](https://github.com/ros-industrial/kuka_experimental/issues/120) that these new Jade macros require `--inorder`, but I didn't see that on the wiki.
I've updated the wiki on [math expressions](http://wiki.ros.org/xacro#Math_expressions) to suggest using `--inorder`, but I'm still a bit confused by the behavior and thought I'd bring it here in case there were further doc changes that might be helpful.
For one, I updated two robot `macros.xacro` files to use `${radians()}` for their joint limits. One failed (linked above), and one [succeeded](https://github.com/ros-industrial/kuka_experimental/pull/118). Changing the first to use `--inorder` fixed the build error. The second still doesn't have it, yet this somehow passes the build?
Secondly, [the wiki](http://wiki.ros.org/xacro#Processing_Order) suggests that one can test whether or not this flag affects
their `xacro` files with:
rosrun xacro xacro file.xacro > /tmp/old.xml
rosrun xacro xacro --inorder file.xacro > /tmp/new.xml
diff /tmp/old.xml /tmp/new.xml
I assumed that if `--inorder` was the source of issues, I'd detect it with this test? In trying that on `lbr_iiwa_14_r820_macro.xacro` and `lbr_iiwa_14_r820.xacro` in [this branch](https://github.com/jwhendy/kuka_experimental/tree/lbr_14_r820_tweaks/kuka_lbr_iiwa_support) of `kuka_experimental`, I get no results for either using `diff` (identical output).
Could someone with more macros experience help illuminate what's going on here and suggest any changes I could make to the wiki to help others? I found this to be pretty nuanced/subtle, and it caused maybe an hour of trying random things, waiting for a Travis build, and repeating. It'd be nice to help other users avoid this.
↧








