Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving the URDF file for a specific robot #556

Closed
Victorlouisdg opened this issue Dec 2, 2020 · 4 comments
Closed

Saving the URDF file for a specific robot #556

Victorlouisdg opened this issue Dec 2, 2020 · 4 comments

Comments

@Victorlouisdg
Copy link

Hi, I'm wondering the easiest way is to save the URDF file for a specific robot? Something like this would be convenient, but I guess it's not possible:
roslaunch ur_description load_ur10.launch > my_ur_robot.urdf

I also tried directly using the xacro command, but I can't find examples of how to pass arguments:
xacro ur.xacro > my_ur_robot.urdf

@Victorlouisdg
Copy link
Author

My current workaround is to copy the ur.xacro file and manually fill in the arguments, but I'm sure there must be a better way :p

@fmauch
Copy link
Contributor

fmauch commented Dec 2, 2020

One way would be

rosrun xacro xacro $(rospack find ur_description)/urdf/ur.xacro joint_limit_params:=$(rospack find ur_description)/config/ur10/joint_limits.yaml kinematics_params:=$(rospack find ur_description)/config/ur10/default_kinematics.yaml physical_params:=$(rospack find ur_description)/config/ur10/physical_parameters.yaml visual_params:=$(rospack find ur_description)/config/ur10/visual_parameters.yaml

@gavanderhoorn I remember in the back of my head that we though about having one .xacro file per robot type that users could use to build their own environment descriptions. This would have the defaults for the robot types already inserted. Do I remember correctly? This might also be quite nice for #538 as we could have robots named urX instead of just ur.

@gavanderhoorn
Copy link
Member

@Victorlouisdg wrote:

I guess it's not possible:

roslaunch ur_description load_ur10.launch > my_ur_robot.urdf

No, not like that.

What would be possible would be to use rosparam get /robot_description > my_ur_robot.urdf after you ran roslaunch ur_description load_ur10.launch. It won't be pretty, but should be valid URDF.

I haven't tested this though.

@fmauch wrote:

I remember in the back of my head that we though about having one .xacro file per robot type that users could use to build their own environment descriptions

Yes, that is indeed what we've discussed. Basically this: gavanderhoorn@4187b12.

@gavanderhoorn
Copy link
Member

I'm going to close this, as I believe we've addressed the question in the OP.

Feel free to keep commenting on the issue of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants