I'm trying to setup a ur10 robot in Moveit with a conveyor belt next to it. Unfortunately the move_group node as well as the servo node print out the following warning:
The complete state of the robot is not yet known. Missing BeltPrismatic.
here are my urdfs:
this is the Urdf I primarily start:
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="$(arg name)">
<!-- robot name parameter -->
<xacro:arg name="name" default="ur"/>
<!-- import main macro -->
<xacro:include filename="$(find ur_description)/urdf/ur_macro.xacro"/>
<!-- possible 'ur_type' values: ur3, ur3e, ur5, ur5e, ur10, ur10e, ur16e -->
<!-- the default value should raise an error in case this was called without defining the type -->
<xacro:arg name="ur_type" default="ur10"/>
<!-- parameters -->
<xacro:arg name="tf_prefix" default="" />
<xacro:arg name="joint_limit_params" default="$(find ur_description)/config/$(arg ur_type)/joint_limits.yaml"/>
<xacro:arg name="kinematics_params" default="$(find ur_description)/config/$(arg ur_type)/default_kinematics.yaml"/>
<xacro:arg name="physical_params" default="$(find ur_description)/config/$(arg ur_type)/physical_parameters.yaml"/>
<xacro:arg name="visual_params" default="$(find ur_description)/config/$(arg ur_type)/visual_parameters.yaml"/>
<xacro:arg name="transmission_hw_interface" default=""/>
<xacro:arg name="safety_limits" default="false"/>
<xacro:arg name="safety_pos_margin" default="0.15"/>
<xacro:arg name="safety_k_position" default="20"/>
<xacro:arg name="simulation_controllers" default="joint_trajectory_controller" />
<!-- initial position for simulations (Fake Hardware, Gazebo, Ignition) -->
<xacro:arg name="initial_positions_file" default="$(find ur_description)/config/initial_positions.yaml"/>
<!-- convert to property to use substitution in function -->
<xacro:property name="initial_positions_file" default="$(arg initial_positions_file)"/>
<!-- create link fixed to the "world" -->
<link name="world" />
<!--
After #52 this will be less verbose
since read_model_data will be seperate from ur_robot
and we can modify just the properties we need
-->
<xacro:property name="jnt_limits_file" value="$(arg joint_limit_params)"/>
<xacro:property name="jnt_limits"
value="${xacro.load_yaml(jnt_limits_file)['joint_limits']}"
/>
<xacro:property name="fric_scale" value="100.0" />
<xacro:property name="joint_dyn_dict"
value="${dict(
joint_dynamics=dict(
shoulder_pan_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_pan_joint']['max_effort']),
shoulder_lift_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_lift_joint']['max_effort']),
elbow_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['elbow_joint']['max_effort']),
wrist_1_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_1_joint']['max_effort']),
wrist_2_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_2_joint']['max_effort']),
wrist_3_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_3_joint']['max_effort'])))}"
/>
<param name="blah" value="${joint_dyn_dict}" />
<!-- arm -->
<xacro:ur_robot
name="$(arg name)"
tf_prefix="$(arg tf_prefix)"
parent="world"
safety_limits="$(arg safety_limits)"
safety_pos_margin="$(arg safety_pos_margin)"
safety_k_position="$(arg safety_k_position)"
joint_limits_parameters_file="$(arg joint_limit_params)"
kinematics_parameters_file="$(arg kinematics_params)"
physical_parameters_file="$(arg physical_params)"
visual_parameters_file="$(arg visual_params)"
joint_dynamics="${joint_dyn_dict}"
transmission_hw_interface=""
sim_gazebo="true"
initial_positions="${xacro.load_yaml(initial_positions_file)}"
>
<origin xyz="0 0 0.05" rpy="0 0 0" />
</xacro:ur_robot>
<!--//////////////////////////////////MODIFIKATIONEN AB HIER///////////////////////////////-->
<xacro:include filename="$(find camera_sim)/description/camera_sim.xacro"/>
<joint name="camera_ur_mount" type="fixed">
<origin xyz="0 -0.02 0.0025" rpy="0 0 0"/>
<parent link="wrist_3_link"/>
<child link="camera_mount_link"/>
</joint>
<xacro:include filename="$(find gripper)/description/gripperV2.xacro"/>
<joint name="toolmount" type="fixed">
<origin xyz="0 0 0.035" rpy="0 0 1.57"/>
<parent link="wrist_3_link"/>
<child link="connector_link"/>
</joint>
<xacro:include filename="$(find belt)/description/belt.urdf.xacro"/>
<joint name="belt_mount" type="fixed">
<origin xyz="1 0 0.3" rpy="0 0 0"/>
<parent link="world"/>
<child link="belt"/>
</joint>
<!--//////////////////////////////////ENDE MODIFIKATIONEN///////////////////////////////-->
<!-- Gazebo plugins -->
<gazebo reference="world">
</gazebo>
<gazebo>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<parameters>$(arg simulation_controllers)</parameters>
</plugin>
</gazebo>
</robot>
and this is the Urdf of the belt:
<?xml version="1.0"?>
<!--///////////////////////////AUFBAU DES FÖRDERBANDES///////////////////////////////////-->
<!--link name="root_link"/>
<joint name="root_joint" type="fixed">
<origin xyz="1 0 0.035" rpy="0 0 0"/>
<parent link="root_link"/>
<child link="belt"/>
</joint-->
<link name="belt">
<visual>
<origin xyz="0.1 0 0.08" rpy="0 0 0" />
<geometry>
<box size="1 3 0.15" />
</geometry>
<material name="belt">
<color rgba="0.3 0.3 0.3 1" />
</material>
</visual>
<inertial>
<origin xyz="0.4 0 0.08" rpy="0 0 0" />
<mass value="0.5"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
<collision>
<origin xyz="0.4 0 0.08" rpy="0 0 0" />
<geometry>
<box size="1 3 0.15" />
</geometry>
</collision>
</link>
<link name="cube">
<visual>
<origin xyz="0 -1 0.2" rpy="0 0 0" />
<geometry>
<box size="0.1 0.1 0.1" />
</geometry>
<material name="belt">
<color rgba="0.5 1.0 0.5 1" />
</material>
</visual>
<inertial>
<origin xyz="0 -1 0.15" rpy="0 0 0" />
<mass value="0.5"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
<collision>
<origin xyz="0 -1 0.15" rpy="0 0 0" />
<geometry>
<box size="0.1 0.1 0.1" />
</geometry>
</collision>
</link>
<!--joint name="cube_mount" type="fixed">
<origin xyz="1 0 0.035" rpy="0 0 1.57"/>
<parent link="belt"/>
<child link="cube"/>
</joint-->
<joint name="BeltPrismatic" type="prismatic">
<origin rpy="0 0 0" xyz="0.1 0 0.01"/>
<parent link="belt"/>
<child link="cube"/>
<axis xyz="0 1 0"/>
<limit lower="-0.75" upper="0.75" effort="100" velocity="10.0"/>
</joint>
<!--////////////////////////////////////////Gazebo-Eigenschaften///////////////////////////////////////////-->
<gazebo reference="belt">
<material>Gazebo/DarkGrey</material>
</gazebo>
<gazebo reference="cube">
<material>Gazebo/Grey</material>
</gazebo>
If you need more code/other files to help me out just ask. Im happy to provide them.