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

gen3_macro.xacro can't be used to generate urdf #175

Open
patrickwasp opened this issue Sep 26, 2023 · 3 comments
Open

gen3_macro.xacro can't be used to generate urdf #175

patrickwasp opened this issue Sep 26, 2023 · 3 comments

Comments

@patrickwasp
Copy link

running xacro src/ros2_kortex/kortex_description/arms/gen3/6dof/urdf/gen3_macro.xacro returns

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from src/ros2_kortex/kortex_description/arms/gen3/6dof/urdf/gen3_macro.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="gen3_arm">
</robot>

this causes moveit setup assistant to crash with Error: No link elements found in urdf file

@felixmaisonneuve
Copy link

Hi @patrickwasp,

We usually run the xacro command on the gen3_robotiq_2f_85.xacro and gen3_robotiq_2f_140.xacro files (in kortex_description/robots folder), so some arguments are specified

<xacro:arg name="arm" default="gen3" />
<xacro:arg name="dof" default="7" />
<xacro:arg name="vision" default="true" />
<xacro:arg name="gripper" default="robotiq_2f_85" />
<xacro:arg name="sim" default="false" />
<xacro:arg name="prefix" default="" />

If you run the xacro command on the gen3_macro.xacro file directly, arguments are not specified, so things might not work.
E.g. here the file cannot be found correctly because dof is not defined
https://github.com/Kinovarobotics/ros2_kortex/blob/main/kortex_description/arms/gen3/6dof/urdf/gen3_macro.xacro#L35

This probably explains why your file is empty.

What you could do is run the xacro command on the gen3.xacro file (in kortex_description/robots) and specify the arguments manually instead
something like xacro src/ros2_kortex/kortex_description/robots/gen3.xacro arm:=gen3 dof:=6 vision:=false...

Hope this helps,
Felix

@patrickwasp
Copy link
Author

Since this xacro file is in kortex_description/arms/gen3/6dof/, which already specifies 6dof, could we have 6 be set as the default in the gen3_macro.xacro file?

@felixmaisonneuve
Copy link

You can do make the modification on your side, but since the default use case does not require you to convert this file directly, I would prefer not to change it

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

2 participants