我用gazebo仿真小车运动,下面是我按照教程编写的urdf文件,但是我运行gazebo后,出现了很多debug,如下图所示,然后话题也没有cmd_vel,请问这是什么原因呢?
<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com)
Commit Version: 1.6.0-4-g7f85cfe Build Version: 1.6.7995.38578
For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
name="mycar">
<link
name="base_link">
<inertial>
<origin
xyz="1.04862678870082E-17 1.38777878078145E-17 -0.03"
rpy="0 0 0" />
<mass
value="1.8" />
<inertia
ixx="0.003915"
ixy="-1.0842021724855E-19"
ixz="-1.80700362080917E-19"
iyy="0.00654"
iyz="6.37746501097161E-36"
izz="0.009375" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/base_link.STL" />
</geometry>
<material
name="">
<color
rgba="1 1 1 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/base_link.STL" />
</geometry>
</collision>
</link>
<link
name="wheel1_link">
<inertial>
<origin
xyz="1.3878E-17 0.011033 0"
rpy="0 0 0" />
<mass
value="0.059627" />
<inertia
ixx="1.5917E-05"
ixy="-2.2905E-23"
ixz="-2.5935E-21"
iyy="2.5522E-05"
iyz="2.4238E-22"
izz="1.5917E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel1_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel1_link.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel1_joint"
type="continuous">
<origin
xyz="0.08 -0.115 -0.045"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel1_link" />
<axis
xyz="0 1 0" />
</joint>
<link
name="wheel2_link">
<inertial>
<origin
xyz="0 -0.011033 2.7756E-17"
rpy="0 0 0" />
<mass
value="0.059627" />
<inertia
ixx="1.5917E-05"
ixy="-5.0676E-22"
ixz="-8.4832E-22"
iyy="2.5522E-05"
iyz="-1.3894E-22"
izz="1.5917E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel2_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel2_link.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel2_joint"
type="fixed">
<origin
xyz="0.08 0.115 -0.045"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel2_link" />
<axis
xyz="0 0 0" />
</joint>
<link
name="wheel3_link">
<inertial>
<origin
xyz="0 -0.011033 2.7756E-17"
rpy="0 0 0" />
<mass
value="0.059627" />
<inertia
ixx="1.5917E-05"
ixy="-5.0676E-22"
ixz="-8.4832E-22"
iyy="2.5522E-05"
iyz="-1.3894E-22"
izz="1.5917E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel3_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel3_link.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel3_joint"
type="fixed">
<origin
xyz="-0.08 0.115 -0.045"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel3_link" />
<axis
xyz="0 0 0" />
</joint>
<link
name="wheel4_link">
<inertial>
<origin
xyz="0 0.011033 2.7756E-17"
rpy="0 0 0" />
<mass
value="0.059627" />
<inertia
ixx="1.5917E-05"
ixy="4.9885E-22"
ixz="-7.893E-22"
iyy="2.5522E-05"
iyz="-3.1796E-22"
izz="1.5917E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel4_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/wheel4_link.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel4_joint"
type="fixed">
<origin
xyz="-0.08 -0.115 -0.045"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel4_link" />
<axis
xyz="0 0 0" />
</joint>
<link
name="camera_link">
<inertial>
<origin
xyz="-0.0075 0 -2.7756E-17"
rpy="0 0 0" />
<mass
value="0.03" />
<inertia
ixx="1.025E-05"
ixy="1.1156E-36"
ixz="1.5882E-22"
iyy="6.8125E-06"
iyz="-3.0268E-22"
izz="4.5625E-06" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/camera_link.STL" />
</geometry>
<material
name="">
<color
rgba="1 1 1 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://mycar/meshes/camera_link.STL" />
</geometry>
</collision>
</link>
<gazebo reference = "camera_link">
<material>Gazebo/Red</material>
</gazebo>
<joint
name="camera_joint"
type="fixed">
<origin
xyz="0.08 0 0.025"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="camera_link" />
<axis
xyz="0 0 0" />
</joint>
<transmission name="wheel3_joint_trans">
<type> transmission_interface/SimpleTransmission</type>
<joint name="wheel3_joint"/>
<actuator name="wheel3_joint_motor">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<transmission name="wheel4_joint_trans">
<type> transmission_interface/SimpleTransmission</type>
<joint name="wheel4_joint"/>
<actuator name="wheel4_joint_motor">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<rosDebugLevel>Debug</rosDebugLevel>
<robotNamespace>/</robotNamespace>
<publishWheelTF>false</publishWheelTF>
<publishWheelJointState>true</publishWheelJointState>
<alwaysOn>true</alwaysOn>
<leftJoint>wheel3_joint</leftJoint>
<rightJoint>wheel4_joint</rightJoint>
<wheelSeparation>0.3</wheelSeparation>
<wheelDiameter>0.18</wheelDiameter>
<wheelTorque>20</wheelTorque>
<wheelAcceleration>1.8</wheelAcceleration>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<odometrySource>world</odometrySource>
<robotBaseFrame>base_link</robotBaseFrame>
<updateRate>50</updateRate>
</plugin>
</gazebo>
<!--
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<rosDebugLevel>Debug</rosDebugLevel>
<alwaysOn>true</alwaysOn>
<updateRate>40</updateRate>
<robotNamespace>/mycar</robotNamespace>
<legacyMode>false</legacyMode>
<leftJoint> wheel3_joint</leftJoint>
<rightJoint>wheel4_joint</rightJoint>
<wheelSeparation>0.19</wheelSeparation>
<wheelDiameter>0.06</wheelDiameter>
<wheelTorque>30</wheelTorque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>base_link</robotBaseFrame>
<publishWheelTF>false</publishWheelTF>
<publishWheelJointState>false</publishWheelJointState>
<wheelAcceleration>1.8</wheelAcceleration>
<odometrySource>world</odometrySource>
<publishTf>1</publishTf>
<publishOdomTF>false</publishOdomTF>
</plugin>
</gazebo>
-->
</robot>
<launch>
<include
file="$(find gazebo_ros)/launch/empty_world.launch" />
<node
name="spawn_model"
pkg="gazebo_ros"
type="spawn_model"
args="-file $(find mycar)/urdf/mycar.urdf -urdf -model mycar"
output="screen" />
</launch>
