Error in rviz displaying urdf model
Hello,
I am trying to create a simple 4 wheel robot with a camera and I have written this code for the urdf model:
<robot name="labrob">
<!-- Base link -->
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="1 0.5 0.25"/>
</geometry>
<material name="yellow">
<color rgba="0.8 0.8 0 1"/>
</material>
</visual>
</link>
<!-- Front Right Wheel -->
<link name="f_r_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
<material name="black">
<color rgba="0.05 0.05 0.05 1"/>
</material>
</visual>
</link>
<joint name="joint_f_r_wheel" type="continuous">
<parent link="base_link"/>
<child link="f_r_wheel"/>
<origin xyz="0.25 -0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0 0" />
</joint>
<!-- Back Right Wheel -->
<link name="b_r_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
<material name="black"/>
</visual>
</link>
<joint name="joint_b_r_wheel" type="continuous">
<parent link="base_link"/>
<child link="b_r_wheel"/>
<origin xyz="-0.25 -0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0 0" />
</joint>
<!-- Front Left Wheel -->
<link name="f_l_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
<material name="black"/>
</visual>
</link>
<joint name="joint_f_l_wheel" type="continuous">
<parent link="base_link"/>
<child link="f_l_wheel"/>
<origin xyz="0.25 0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0 0" />
</joint>
<!-- Back Left Wheel -->
<link name="b_l_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
<material name="black"/>
</visual>
</link>
<joint name="joint_b_l_wheel" type="continuous">
<parent link="base_link"/>
<child link="b_l_wheel"/>
<origin xyz="-0.25 0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0 0" />
</joint>
</robot>
As you can read I haven't put yet the camera or the trasmission blocks. I just have written the basic structure of the model with the joints. I have also written this .launch file:
<launch>
<!-- urdf xml robot description loaded on the Parameter Server-->
<param name="robot_description" textfile="$(find labrob_description)/urdf/labrob.urdf" />
<arg name="gui" default="true" />
<arg name="rvizconfig" default="$(find labrob_description)/rviz/urdf.rviz" />
<!--param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" -->
<param name="use_gui" value="$(arg gui)"/>
<!-- source that publishes the joint positions as a sensor_msgs/JointState -->
<param name="use_gui" value="true"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<!-- publish all the frames to TF -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="rob_st_pub" >
<param name="publish_frequency" value="50"/> <!-- Hz -->
</node>
<!-- robot visualization -->
<node name="rviz" pkg="rviz" args="-d $(arg rvizconfig)" type="rviz" required="true" />
</launch>
In this launch file I am trying to display my model in the rviz environment. Via the launch file I call a .rviz configuration file which is this one:
Panels ...