Create movable object for pick and place
Hi community, I'm creating a pick and place operation with MoveIt and a Yumi. I have created the Xacro/URDF files for generate a base to the robot and the XACRO files also for the object to pick and place. I created a joint connection for the test tubes with the base (In order to have a TF with respect to the base and in order to pick and place them) of floating type. The issue is that when I'm launching the spawn urdf I haven't the test tubes and i have this error in Rviz
The error shown is: No transform from [test_tube_1_tube_link] to [world]
I haven't errors related to the test tubes in Rviz. And the errors are not happening if i'm using the joint type: fixed The xacro file where i'm importing the robot (with the base and the world) and the test tubes is this:
<?xml version="1.0"?>
<robot name="lab" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="base_height" value="1.0"/>
<xacro:property name="tube_height" value="0.1030"/>
<xacro:property name="x_tube" value="0.3"/>
<xacro:property name="y_tube1" value="0"/>
<xacro:property name="y_tube2" value="0.3"/>
<xacro:property name="y_tube3" value="0.6"/>
<!-- Include Yumi with table -->
<xacro:include filename="$(find yumi_description)/urdf/yumi.urdf.xacro"/>
<!-- Include test tubes -->
<xacro:include filename="$(find YumiProjectThesis)/urdf/test_tube/test_tube.urdf.xacro"/>
<xacro:test_tube_urdf prefix="test_tube_1_"/>
<xacro:test_tube_urdf prefix="test_tube_2_"/>
<xacro:test_tube_urdf prefix="test_tube_3_"/>
<!-- Joint test_tubes -->
<joint name="test_tube_1_joint" type="floating">
<parent link="world"/>
<child link="test_tube_1_tube_link"/>
<origin xyz="${x_tube} ${y_tube1} ${(base_height+tube_height) / 2}"/>
</joint>
<joint name="test_tube_2_joint" type="floating">
<parent link="base"/>
<child link="test_tube_2_tube_link"/>
<origin xyz="${x_tube} ${y_tube2} ${(base_height + tube_height)/2}"/>
</joint>
<joint name="test_tube_3_joint" type="floating">
<parent link="base"/>
<child link="test_tube_3_tube_link"/>
<origin xyz="${x_tube} ${y_tube3} ${(base_height + tube_height)/2}"/>
</joint>
</robot>
I don't think I would make the test tubes as part of the robot model as they are independent objects. I'd spawn them separately, or have them as part of the Gazebo world file into which you spawn the Yumi.
On your specific issue, though, do you have a
joint_state_publisher
or ajoint_state_controller
setup (more info)?Actually I tried to create a Gazebo world file in which i putted the model file on gazebo but this wasn't represented in Rviz and hasn't the TF. For that i tried to put inside a URDF instead of a world file. Regarding the joint_state_publisher and joint_state_controller. I have the one of the Yumi, it is inside the package that I'm using: package.
I also tried to create a separated URDF with only the objects to pick up and used another spawn_model node inside the launcher but always errors:
No transform from [test_tube_1_tube_link] to [world]
I followed a lot of posts and tutorials but i haven't find the answer