Missing transformations in Rviz
And i dont know how to connect other links to chassis
urdf file is properly formed, gazebo file is not, says:
Error: No name given for the robot. at line 89 in /build/urdfdom-ACOcA8/urdfdom-1.0.0/urdf_parser/src/model.cpp ERROR: Model Parsing the xml failed
gazebo code:
<?xml version="1.0"?>
<robot>
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<legacyMode>false</legacyMode>
<alwaysOn>true</alwaysOn>
<updateRate>20</updateRate>
<leftJoint>left_wheel_hinge</leftJoint>
<rightJoint>right_wheel_hinge</rightJoint>
<wheelSeparation>0.4</wheelSeparation>
<wheelDiameter>0.1</wheelDiameter>
<torque>20</torque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>chassis</robotBaseFrame>
</plugin>
</gazebo>
<gazebo reference="chassis">
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="left_wheel">
<material>Gazebo/Blue</material>
</gazebo>
<gazebo reference="right_wheel">
<material>Gazebo/Blue</material>
</gazebo>
<gazebo reference="camera_link">
<sensor name="kinect_camera" type="depth">
<!--update_rate>40</update_rate-->
<visualize>true</visualize>
<camera>
<horizontal_fov>1.047198</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<plugin name="kinect_controller" filename="libgazebo_ros_openni_kinect.so">
<baseline>0.2</baseline>
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>kinect_camera_ir</cameraName>
<imageTopicName>/kinect_camera/image_raw</imageTopicName>
<cameraInfoTopicName>/kinect_camera/depth/camera_info</cameraInfoTopicName>
<depthImageTopicName>/kinect_camera/depth/image_raw</depthImageTopicName>
<depthImageInfoTopicName>/kinect_camera/depth/camera_info</depthImageInfoTopicName>
<pointCloudTopicName>/kinect_camera/depth/points</pointCloudTopicName>
<frameName>kinect_frame</frameName>
<pointCloudCutoff>0.5</pointCloudCutoff>
<pointCloudCutoffMax>3.0</pointCloudCutoffMax>
<distortionK1>0</distortionK1>
<distortionK2>0</distortionK2>
<distortionK3>0</distortionK3>
<distortionT1>0</distortionT1>
<distortionT2>0</distortionT2>
<CxPrime>0</CxPrime>
<Cx>0</Cx>
<Cy>0</Cy>
<focalLength>0</focalLength>
<hackBaseline>0</hackBaseline>
</plugin>
</sensor>
</gazebo>
</robot>
xacro file:
<?xml version='1.0'?>
<robot name="myrobot"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find mybot_description)/urdf/mybot.gazebo" />
<xacro:include filename="$(find mybot_description)/urdf/materials.xacro" />
<xacro:include filename="$(find mybot_description)/urdf/macros.xacro" />
<link name='chassis'>
<pose>0 0 0.1 0 0 0</pose>
<inertial>
<mass value="10.0"/>
<origin xyz="0.0 0 0.1" rpy=" 0 0 0"/>
<inertia
ixx="0.5" ixy="0" ixz="0"
iyy="1.0" iyz="0"
izz="0.1" />
</inertial>
<collision name='collision'>
<geometry>
<cylinder radius=".3" length="0.1"/>
</geometry>
</collision>
<visual name='chassis_visual'>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<geometry>
<cylinder radius=".3" length ="0.1"/>
</geometry>
</visual>
<collision name='caster_collision'>
<origin xyz="-0.2 0 -0.05" rpy=" 0 0 0"/>
<geometry>
<sphere ...
We can't really help only with a screenshot from rviz, can you detail what you have launched to get this result ? Also have you checked that your urdf is properly formed ? You can try this :
Yes is its, says robot name is: myrobot ---------- Successfully Parsed XML --------------- root Link: chassis has 3 child(ren) child(1): camera_link child(1): camera_depth_frame child(1): camera_depth_optical_frame child(2): camera_rgb_frame child(1): camera_rgb_optical_frame child(2): left_wheel child(3): right_wheel I added code to the question