Setting a root joint

3,619 views
Skip to first unread message

Michael Ferguson

unread,
May 31, 2013, 5:31:49 AM5/31/13
to moveit...@googlegroups.com
I see this when I start up MoveIt: 

"No root joint specified. Assuming fixed joint"

Which I presume means that there is some parameter that can be set for changing the root frame in which all planning is done -- what is that parameter?

Thanks,
-Fergs

Ioan Sucan

unread,
May 31, 2013, 5:37:22 AM5/31/13
to Michael Ferguson, moveit...@googlegroups.com
Hey Fergs,

URDF models start with a link at the root, but In MoveIt, models start with a joint. The root joint is the way the robot is connected with the world. The root joint is defined in the SRDF, using the virtual_joint tag, and there are 3 types supported right now: fixed(0DOF), planar(3DOF) and floating (6DOF).
If there is no virtual joint defined, a fixed one is assumed. The planning frame will then be the same as root link.
If there is a virtual joint defined, that joint specifies the name of the parent frame. That frame will then be the planning frame.

Ioan

jz...@swri.org

unread,
May 31, 2013, 8:46:36 AM5/31/13
to moveit...@googlegroups.com

Ioan,

Thanks for this explanation.  This is helpful.  I have wondered exactly what the "Virtual Joint" was used for.  The Setup Assistant Quick Start gives some vague wording about attaching the robot to the world frame.  This is a correct description, but still left me with some questions. 

Would it be possible to add this additional info to the MoveIt wiki?  I'm not sure where it would fit best.  Maybe there is a need for an additional page (or section) to discuss MoveIt design concepts.  This way, things like Virtual Joints, End Effectors, Planning Groups, Constraints, etc. could all be discussed in more detail as to how they are actually used inside of MoveIt.

Just a suggestion,
 
Jeremy Zoss
 
Southwest Research Institute

mfr...@vt.edu

unread,
Feb 10, 2014, 11:40:53 AM2/10/14
to moveit...@googlegroups.com, Michael Ferguson, isu...@willowgarage.com
Hey Ioan,

I was wondering if I define a link and joint in the urdf to represent the robots connection to the world:
<link name="world"/>

<joint name="world_joint" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
</joint>

Then does the virtual joint need to be defined? If so would I define it with the link and joint defined in the urdf?

Thanks
Mike

Sachin Chitta

unread,
Feb 10, 2014, 11:42:40 PM2/10/14
to Michael Francis, moveit-users, Michael Ferguson, isu...@willowgarage.com
Hi Mike,

Don't define that in the URDF - define it using a virtual joint so it shows up in the SRDF. The general idea behind the virtual joint is that it represents the connection to the world, i.e. the position of the robot in the world. This is not a property of the robot itself so it does not go into the URDF.

Let me know if that does not work.

Best Regards,
Sachin

mfr...@vt.edu

unread,
Feb 12, 2014, 10:34:49 AM2/12/14
to moveit...@googlegroups.com, Michael Francis, Michael Ferguson, isu...@willowgarage.com
Hey Sachin,

I need to define the dummy link and root joint in order for gazebo to know that the base of the arm is connected to the world frame. I tired setting the virtual joint value to the world_joint I set in the urdf , and when I ran the demo.launch file I kept seeing info lines saying no root joint specified, however I am able to see the arm in RVIZ and move it around using the setting "allow approximate IK setting". 

Thanks
Mike

Ben Lee

unread,
Jun 18, 2014, 5:28:02 PM6/18/14
to moveit...@googlegroups.com, mfr...@vt.edu, mfe...@gmail.com, isu...@willowgarage.com
Hello:

I have a fixed manipulator arm and I have attempted to set this up but it does not seem to work. In my SRDF I have a virtual root setup with /world as the parent frame. Also, I'm broadcasting a static transform from world to the child_link's frame. However, the move_group reports that the planning frame is still the child_link's frame ("v_base"). Can someone help me understand what I am doing wrong, please?

---
    <virtual_joint name="v_root" type="fixed" parent_frame="world" child_link="v_base" />
---
  moveit::planning_interface::MoveGroup group("arm");
  ROS_INFO_STREAM("| Pose Reference Frame: " << group.getPoseReferenceFrame());
  ROS_INFO_STREAM("| Root Joint:           " << group.getCurrentState()->getRobotModel()->getRootJointName());
  ROS_INFO_STREAM("| Model Frame:          " << group.getCurrentState()->getRobotModel()->getModelFrame());
  ROS_INFO_STREAM("| Planning Frame:       " << group.getPlanningFrame());
  ROS_INFO_STREAM("| Reference frame:      " << group.getEndEffectorLink());
---
[ INFO] [1403126265.455168860, 248.061000000]: | Pose Reference Frame: /v_base
[ INFO] [1403126265.656496012, 248.261000000]: | Root Joint:           v_root
[ INFO] [1403126265.656540134, 248.261000000]: | Model Frame:          /v_base
[ INFO] [1403126265.656557051, 248.261000000]: | Planning Frame:       /v_base
[ INFO] [1403126265.656570067, 248.261000000]: | Reference frame:      ee_link

Dave Hershberger

unread,
Jun 18, 2014, 5:42:13 PM6/18/14
to moveit...@googlegroups.com
I don't have a good idea about "why", but I can tell you found this code in robot_model.cpp:

   00092     const urdf::Link *root_link_ptr = urdf_model.getRoot().get();
00093     model_frame_ = '/' + root_link_ptr->name;
and
   00888           // for fixed frames we still use the robot root link
00889           if (vjoints[i].type_ != "fixed")
00890           {
00891             model_frame_ = vjoints[i].parent_frame_;
00892             if (model_frame_[0] != '/')
00893               model_frame_ = '/' + model_frame_;
00894           }

In other words, it only does what you expect if the virtual root joint type is not "fixed".

I guess if the robot base is really fixed, your planning frame is forced to be the root link of the robot.

So if you are receiving coordinates in some other frame ("world") you'll need to transform them into the planning frame yourself.

Dave

Ben Lee

unread,
Jun 18, 2014, 11:56:20 PM6/18/14
to moveit...@googlegroups.com
Thank you very much for you reply. This helps me understand why my fixed virtual_joint wasn't helping.

Seems wrong since a "fixed" joint would seem to be appropriate for a fixed installation manipulator that needs to do work on objects that are in the world frame. In my case I will have several manipulators working a conveyor belt with target object state being broadcast in terms of the world frame. Nonetheless....

For experimental purposes I switched to a planar joint and as expected, the frames to change to /world.

However, now the move_group node is complaining that my virtual_joint's state is missing (duh - it doesn't exist!). Furthermore, the poses are not being transformed from the robot's frame into the world frame - presumably because the link transforms cannot be computed because the virtual_joint state is missing.

So.... assuming that this will actually work as I'm hoping (namely: that the poses produced by the move_group will be transformed for me into the world frame), are there any suggestions for how to get the static joint state published (besides building a silly ROS node that broadcasts the static planar joint state)?
Reply all
Reply to author
Forward
0 new messages