-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Rename 'world' frame to 'robot_base' in URDF #284
Rename 'world' frame to 'robot_base' in URDF #284
Conversation
@davetcoleman, thanks for the contribution. What do you think about using the ROS-I standard frame I do wonder why that frame transform is in the URDF and what might depend on it? IK Solvers ( Assuming we can overcome these issues, is there a way to make this change backwards compatible(not sure I can think of one)? |
I tried
No telling, but its a bug with MoveIt! and in general its wrong - the URDF should not assume how the robot is connected to the rest of the world, and what the world frame is. What if you connect it to a table then the \world? What if the UR5 is on a mobile base, like many are? \world should be the origin and static, and cannot be assumed to be a static transform to the robot base. I think this should be moved to the kinetic branch, since that is a safer place for potentially breaking changes like this. |
I updated the PR to |
The fixed joint connecting the robot to world was needed for gazebo simulation - without it, the arm kept "rolling" around in simulation. |
Welcome back @ipa-fxm! |
@ipa-fmw that's a good point. If that is the case, the *_moveit_config package is pointing to the wrong URDF here because there is still a MoveIt! bug |
@shaun-edwards and possibly @davetcoleman Am I missing something or do the "base" definitions need to be flipped to read (child/parent swapped):
If I modify an industrial-hosted urdf as above by flipping the child/parents of the base-link or equivalent then MoveIt! is happy... OR... is this MoveIt! just being too picky wrt the world-to-robot virtual joint? |
I would not use the For all MoveIt configs that I've created, I've always made |
@BrettHemes wrote:
Nitpicky perhaps, but |
Thanks for the notes @gavanderhoorn, this helps. |
I tried changing to
Testing on real hardware there were no apparent issues despite the warning. |
I think that warning is not really a problem in your case. Afaik, it only becomes a problem if we want to ask KDL to calculate dynamics-related things for us, which we don't. |
What I'd like to suggest is to create three additional xacros in Non-Gazebo-based consumers would use the The MoveIt configs would then use the non-Gazebo versions, which should address the issue reported by @davetcoleman. |
just make a duplication of |
03bb130
to
7a74ef4
Compare
The changes suggested by this PR are conceptually ok: the urdfs/xacros should not contain a However, my suggestion would be to do something similar to what @jacknlliu proposes: the In other robot support packages we've done exactly that, where as much of this in delegated to Gazebo support packages (although it's not necessarily Gazebo specific of course). See abb_irb120_gazebo/urdf/irb120_3_58.xacro for an example. Doing it this way would introduce a significant breaking change, so that would need to be a conscious decision. Tagging this with |
Yes I'm not focused on UR efforts right now so would welcome someone else take this on |
This comment has been minimized.
This comment has been minimized.
4 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoping that this will be helpful for other people with this issue I post here the two additional urdf created following the suggestion from @jacknlliu and @gavanderhoorn . I post here the ones created for UR10
ur10_moveit.urdf.xacro
to be added in /ur_description/urdf
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro"
name="ur10" >
<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
<!-- ur10 -->
<xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
<!-- arm -->
<xacro:ur10_robot prefix="" joint_limited="false"/>
</robot>
ur10_joint_limited_moveit.urdf.xacro
to be added in /ur_description/urdf
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro"
name="ur10" >
<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
<!-- ur10 -->
<xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
<!-- arm -->
<xacro:ur10_robot prefix="" joint_limited="true"/>
</robot>
edit ur10_moveit_config/launch/planning_context.launch referencing the 2 new file just added
<!-- Load universal robot description format (URDF) -->
<group if="$(arg load_robot_description)">
<param unless="$(arg limited)" name="$(arg robot_description)" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_moveit.urdf.xacro'" />
<param if="$(arg limited)" name="$(arg robot_description)" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_joint_limited_moveit.urdf.xacro'" />
</group>
edit ur10_moveit_config/launch/move_group.launch adding the arg to load the robot_description
<include file="$(find ur10_moveit_config)/launch/planning_context.launch">
<arg name="limited" value="$(arg limited)" />
<arg name="load_robot_description" value="true" />
</include>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoping that this will be helpful for other people with this issue I post here the two additional urdf created following the suggestion from @jacknlliu and @gavanderhoorn . I post here the ones created for UR10
ur10_moveit.urdf.xacro
to be added in /ur_description/urdf
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro"
name="ur10" >
<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
<!-- ur10 -->
<xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
<!-- arm -->
<xacro:ur10_robot prefix="" joint_limited="false"/>
</robot>
ur10_joint_limited_moveit.urdf.xacro
to be added in /ur_description/urdf
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro"
name="ur10" >
<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
<!-- ur10 -->
<xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
<!-- arm -->
<xacro:ur10_robot prefix="" joint_limited="true"/>
</robot>
edit ur10_moveit_config/launch/planning_context.launch referencing the 2 new file just added
<!-- Load universal robot description format (URDF) -->
<group if="$(arg load_robot_description)">
<param unless="$(arg limited)" name="$(arg robot_description)" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_moveit.urdf.xacro'" />
<param if="$(arg limited)" name="$(arg robot_description)" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_joint_limited_moveit.urdf.xacro'" />
</group>
edit ur10_moveit_config/launch/move_group.launch adding the arg to load the robot_description
<include file="$(find ur10_moveit_config)/launch/planning_context.launch">
<arg name="limited" value="$(arg limited)" />
<arg name="load_robot_description" value="true" />
</include>
just modify the virtual_joint in the urX.srdf , let child_link match the link "world" in the urX_robot.urdf.xacro. I don't know why, but it worked. |
I modified the virtual joint in the srdf file and renamed the parent frame with 'robot_base' and the child frame with 'world'. It worked!
|
The universal_robot/ur_gazebo/urdf/ur_robot.urdf.xacro Lines 29 to 34 in 1303775
And then only in the top-level As such, this is not needed any more for The MoveIt configurations will be updated as part of #448, which will include the update to the virtual joint. |
Thanks for submitting the PR @davetcoleman. This will partly be merged into |
The transform between base_link and world is currently located in the URDF:
as well as a virtual_joint in MoveIt! here
Which is bad for MoveIt! and complains:
I propose we rename the fixed link to the world in the URDF so that MoveIt! can still modify the world transform to allow the robot to move. I do not think we should remove the fixed link in the URDF because the KDL warns about the base link having inertia.