UR5 arm failing to reach goal position, Unable to sample any valid states
Hi,
I have a UR5
robotic arm. The arm is mounted on a table surface. I have created the following xacro (workcell.xacro) for a combination of ur5.urdf.xacro
and a table link.
<?xml version="1.0" ?>
<robot name="myworkcell" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro" />
<xacro:ur5_robot prefix="" joint_limited="true"/>
<link name="world"/>
<link name="table">
<visual>
<geometry>
<box size="1.0 1.0 0.05"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="1.0 1.0 0.05"/>
</geometry>
</collision>
</link>
<joint name="world_to_table" type="fixed">
<parent link="world"/>
<child link="table"/>
<origin xyz="0 0 0.5" rpy="0 0 0"/>
</joint>
<joint name="table_to_robot" type="fixed">
<parent link="table"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
</robot>
I used the Moveit Setup Assistant
(MSA) to generate a moveit configuration package based on my workcell.xacro, and the screen shot depicts as follows:
For the planning group manipulator
I have specified the following kinetic chain (base_link -> tool0
). The srdf myworkcell.srdf is given as follows:
<?xml version="1.0" ?>
<!--This does not replace URDF, and is not an extension of URDF.
This is a format for representing semantic information about the robot structure.
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
-->
<robot name="myworkcell">
<!--GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc-->
<!--LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included-->
<!--JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included-->
<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
<group name="manipulator">
<chain base_link="base_link" tip_link="tool0" />
</group>
<!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'-->
<group_state name="home" group="manipulator">
<joint name="elbow_joint" value="1.5707" />
<joint name="shoulder_lift_joint" value="-1.5707" />
<joint name="shoulder_pan_joint" value="0" />
<joint name="wrist_1_joint" value="-1.5707" />
<joint name="wrist_2_joint" value="-1.5707" />
<joint name="wrist_3_joint" value="0" />
</group_state>
<group_state name="home_2" group="manipulator">
<joint name="elbow_joint" value="1.5707" />
<joint name ...
Did you consider the
origin
of abox
geometry is in the centre, not at any of the surfaces making up the box?The way you've structured the
.xacro
has thebase_link
of the UR inside the table. That's probably not what you wanted to do.thanks @gvdhoorn. The origin tag is confusing to understand. I have modified the xacro file as follows.
I will see if that can sort out the problem.
I have some further questions, If I issue two calls,
setPositionTarget()
,setOrientationTarget()
, I can see the movements being done on the robotic arm. However, the above two functions expect end-effector link to be provided in the last argument. In the MSA I did not choose any end-effectors, and modeled a single planning group (manipulator / arm) that includes the complete chain (base_link -> tool0
). In this case, would that effect the result of the movement. In the function call, I am passingsetPositionTarget(x, y, z, move_group.getEndEffectorLink())
. thanks,You closed this question saying it was answered, but you have not shared what that answer is. If you can, please provide an answer to your own question for future readers.
unfortunately, I couldn't reopen the question. Its just some unfamiliarity regarding the proper way (protocol) to add comments, or answers, or edits to your question. I was told that we could not answer our own question. Hence, in the last edit, I have explained what were the fixes needed to sort out my problem. thanks,
It is perfectly fine to answer your own question, as long as you are not repeating someone else's answer.