刚写这篇文章的时候在想 不会有人还在手撸urdf/xacro吧
但是在我整的过程中,发现这个gazebo真的太蠢了,遂放弃
注意:最后失败了,出现了奇怪的bug,开始仿真的时候整辆车只剩下底板
gazebo界面->edit->building editor,里面可以画墙壁、门等,已经够用了
gazebo界面->edit->model editor
画几何体后右键->link inspector 修改参数,包含link、visual、collision三个菜单,里面都需要做相应的修改,尤其是pose、geometry这些参数,值得注意的是link菜单下的pose是这个link相对于世界坐标系的坐标,而inertial、visual、collision的pose则是相对于link自身坐标系的坐标。
我的建议是尽量画在中心对称的地方,包含多个元件的时候可以分开画多个model,然后在一个model里同时导入,然后对齐、加joint等操作。
图形化操作会有各种bug,觉得不对劲就重启一下gazebo
本人的经历说明,对于我来说环境的文件是可以可视化界面绘制的,模型还是手写xacro、urdf。
一般xacro是得用到的,因为可以用宏、include、数值计算等。对一个四轮机器人的物理模型表示,我是这样写的:
<robot name="robot"
xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="robot.gazebo" />
<xacro:property name="PI" value="3.1415926" />
<link name="footprint">link>
<link name='base'>
<pose>0 0 0.1 0 0 0pose>
<inertial>
<mass value="1.50"/>
<origin xyz="0.0 0 0" rpy=" 0 0 0"/>
<inertia ixx="0.00282" ixy="0" ixz="0" iyy="0.00417" iyz="0" izz="0.00615" />
inertial>
<collision name='collision'>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<geometry>
<box size="0.3 0.24 0.1"/>
geometry>
collision>
<visual name='base_visual'>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<geometry>
<box size="0.3 0.24 0.1"/>
geometry>
visual>
link>
<xacro:macro name="wheel_and_joint" params="name x y">
<link name="${name}_wheel">
<inertial>
<mass value="0.50"/>
<origin xyz="0.0 0 0" rpy=" 0 ${PI/2} ${PI/2}"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />
inertial>
<visual>
<origin xyz="0.0 0 0" rpy=" 0 ${PI/2} ${PI/2}"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
visual>
<collision>
<origin xyz="0.0 0 0" rpy=" 0 ${PI/2} ${PI/2}"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
collision>
link>
<joint type="continuous" name="${name}_wheel_joint">
<origin xyz="${x} ${y} 0" rpy="0 0 0"/>
<child link="${name}_wheel"/>
<parent link="base"/>
<axis xyz="0 1 0" rpy="0 0 0"/>
<limit effort="10000" velocity="1000"/>
<dynamics damping="1.0" friction="1.0"/>
joint>
<gazebo reference="${name}_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>500000.0kp>
<kd>10.0kd>
<minDepth>0.001minDepth>
<maxVel>0.1maxVel>
<fdir1>1 0 0fdir1>
gazebo>
xacro:macro>
<xacro:macro name="ball_wheel_and_joint" params="name x y z">
<link name="${name}_ball_wheel">
<inertial>
<mass value="0.1"/>
<origin xyz="0.0 0 0" rpy=" 0 0 0"/>
<inertia ixx="0.0005" ixy="0" ixz="0" iyy="0.0005" iyz="0" izz="0.0005" />
inertial>
<visual>
<origin xyz="0.0 0 0" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
visual>
<collision>
<origin xyz="0.0 0 0" rpy=" 0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
collision>
link>
<joint type="fixed" name="${name}_ball_wheel_joint">
<origin xyz="${x} ${y} ${z}" rpy="0 0 0"/>
<child link="${name}_ball_wheel"/>
<parent link="base"/>
<axis xyz="0 0 1" rpy="0 0 0"/>
joint>
<gazebo reference="${name}_ball_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>1000000.0kp>
<kd>100.0kd>
<minDepth>0.001minDepth>
<maxVel>1.0maxVel>
gazebo>
xacro:macro>
<xacro:wheel_and_joint name="front_left" x="0.05" y="0.15"/>
<xacro:wheel_and_joint name="front_right" x="0.05" y="-0.15"/>
<xacro:ball_wheel_and_joint name="back1" x="-0.11" y="0.1" z="-0.055"/>
<xacro:ball_wheel_and_joint name="back2" x="-0.11" y="-0.1" z="-0.055"/>
<link name="camera">
<inertial>
<mass value="0.1"/>
<origin xyz="0.02 0.05 0.05" rpy=" 0 0 0"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
inertial>
<visual name="camera_visual">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.02 0.05 0.05"/>
geometry>
visual>
<collision name="camera_colision">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.02 0.05 0.05"/>
geometry>
collision>
link>
<link name="vodyne">
<inertial>
<mass value="1e-5"/>
<origin xyz="0 0 0" rpy=" 0 0 0"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
inertial>
<visual name="vodyne_visual">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
visual>
<collision name="vodyne_colision">
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="0.05" radius="0.03"/>
geometry>
collision>
link>
<joint name="footprint_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link="footprint"/>
<child link="base" />
joint>
<joint type="fixed" name="camera_joint">
<origin xyz="0.175 0 0" rpy="0 0 0"/>
<child link="camera"/>
<parent link="base"/>
<axis xyz="0 0 1" rpy="0 0 0"/>
joint>
<joint type="fixed" name="vodyne_joint">
<origin xyz="0.08 0 0.075" rpy="0 0 0"/>
<child link="vodyne"/>
<parent link="base"/>
<axis xyz="0 0 1" rpy="0 0 0"/>
joint>
<gazebo reference="base">
<material>Gazebo/Whitematerial>
gazebo>
<gazebo reference="camera">
<material>Gazebo/Blackmaterial>
gazebo>
<gazebo reference="vodyne">
<material>Gazebo/Blackmaterial>
gazebo>
robot>
其中robot.gazebo如下,包含了一些控制插件
<robot>
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<alwaysOn>falsealwaysOn>
<legacyMode>falselegacyMode>
<publishTf>truepublishTf>
<publishWheelJointState>truepublishWheelJointState>
<updateRate>60updateRate>
<leftJoint>front_left_wheel_jointleftJoint>
<rightJoint>front_right_wheel_jointrightJoint>
<wheelSeparation>0.30 wheelSeparation>
<wheelDiameter>0.12wheelDiameter>
<robotBaseFrame>footprintrobotBaseFrame>
<torque>20torque>
<commandTopic>cmd_velcommandTopic>
<odometryTopic>odomodometryTopic>
<odometryFrame>odomodometryFrame>
<odometrySource>worldodometrySource>
<wheelAcceleration>1wheelAcceleration>
<wheelTorque>10wheelTorque>
<rosDebugLevel>narosDebugLevel>
plugin>
gazebo>
<gazebo reference="camera">
<sensor type="camera" name="camera_sensor">
<update_rate>30.0update_rate>
<always_on>1always_on>
<camera name="camera">
<horizontal_fov>1.3962634horizontal_fov>
<image>
<width>800width>
<height>800height>
<format>R8G8B8format>
image>
<clip>
<near>0.02near>
<far>300far>
clip>
<distortion>
<k1>0.0k1>
<k2>0.0k2>
<k3>0.0k3>
<p1>0.0p1>
<p2>0.0p2>
<center>0.5 0.5center>
distortion>
camera>
<plugin name="camera_controller" filename="libgazebo_ros_camera.so">
<ros>
<namespace>/robotnamespace>
<argument>camera/image_raw:=/robot/camera/imageargument>
<argument>camera/camera_info:=/robot/camera/image/camera_infoargument>
ros>
<camera_name>cameracamera_name>
<frame_name>cameraframe_name>
<hack_baseline>0.07hack_baseline>
plugin>
sensor>
gazebo>
<gazebo reference="vodyne">
<sensor type="ray" name="vodyne16">
<pose>0 0 0 0 0 0pose>
<visualize>truevisualize>
<update_rate>10update_rate>
<ray>
<scan>
<horizontal>
<samples>1200samples>
<resolution>1resolution>
<min_angle>-1.0471975min_angle>
<max_angle>1.0471975max_angle>
horizontal>
<vertical>
<samples>64samples>
<resolution>1resolution>
<min_angle>-0.26179938min_angle>
<max_angle>0.26179938max_angle>
vertical>
scan>
<range>
<min>0.055min>
<max>100.0max>
<resolution>0.1resolution>
range>
<noise>
<type>gaussiantype>
<mean>0.00mean>
<stddev>0.01stddev>
noise>
ray>
<plugin name="gazebo_ros_laser_controller" filename="libgazebo_ros_velodyne_laser.so">
<topicName>/scantopicName>
<frameName>laserframeName>
<min_range>0.9min_range>
<max_range>130.0max_range>
<gaussianNoise>0.0gaussianNoise>
plugin>
sensor>
gazebo>
robot>
而gazebo调用机器人模型得通过urdf文件,使用我们还要进一步生成urdf文件(用xacro是为了方便),这个我就放最后面去,不放这边了,感兴趣的可以对照看
运行以下命令
rosrun xacro xacro xxx.xacro > xxx.urdf
也可以在之后的launch文件里,把 , 两行替换成
下面为初始化一个世界和一个机器人模型的模板launch文件,包含了世界生成、模型生成、坐标变换三个要素,以后只要对着这个改就行
<launch>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="x" default="-3.0" />
<arg name="y" default="-9.0" />
<arg name="z" default="0.0" />
<arg name="roll" default="0"/>
<arg name="pitch" default="0"/>
<arg name="yaw" default="1.5707963"/>
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find robot)/urdf/robot.urdf.xacro'" />
<arg name="robot_name" default="robot" />
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="verbose" value="true"/>
<arg name="world_name" value="$(find robot)/worlds/maze.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
include>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw) -model $(arg robot_name) -param robot_description"/>
<node name="tf_scan_pub" pkg="tf2_ros" type="static_transform_publisher" args="0.08 0 0.075 0 0 0 /footprint /laser"/>
launch>
<sdf version='1.7'>
<world name='default'>
<light name='sun' type='directional'>
<cast_shadows>1cast_shadows>
<pose>0 0 10 0 -0 0pose>
<diffuse>0.8 0.8 0.8 1diffuse>
<specular>0.2 0.2 0.2 1specular>
<attenuation>
<range>1000range>
<constant>0.9constant>
<linear>0.01linear>
<quadratic>0.001quadratic>
attenuation>
<direction>-0.5 0.1 -0.9direction>
<spot>
<inner_angle>0inner_angle>
<outer_angle>0outer_angle>
<falloff>0falloff>
spot>
light>
<model name='ground_plane'>
<static>1static>
<link name='link'>
<collision name='collision'>
<geometry>
<plane>
<normal>0 0 1normal>
<size>100 100size>
plane>
geometry>
<surface>
<friction>
<ode>
<mu>100mu>
<mu2>50mu2>
ode>
<torsional>
<ode/>
torsional>
friction>
<contact>
<ode/>
contact>
<bounce/>
surface>
<max_contacts>10max_contacts>
collision>
<visual name='visual'>
<cast_shadows>0cast_shadows>
<geometry>
<plane>
<normal>0 0 1normal>
<size>100 100size>
plane>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
script>
material>
visual>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
model>
<gravity>0 0 -9.8gravity>
<magnetic_field>6e-06 2.3e-05 -4.2e-05magnetic_field>
<atmosphere type='adiabatic'/>
<physics type='ode'>
<max_step_size>0.001max_step_size>
<real_time_factor>1real_time_factor>
<real_time_update_rate>1000real_time_update_rate>
physics>
<scene>
<ambient>0.4 0.4 0.4 1ambient>
<background>0.7 0.7 0.7 1background>
<shadows>1shadows>
scene>
<wind/>
<spherical_coordinates>
<surface_model>EARTH_WGS84surface_model>
<latitude_deg>0latitude_deg>
<longitude_deg>0longitude_deg>
<elevation>0elevation>
<heading_deg>0heading_deg>
spherical_coordinates>
<state world_name='default'>
<sim_time>2549 610000000sim_time>
<real_time>2562 864281356real_time>
<wall_time>1659430410 402862747wall_time>
<iterations>2549610iterations>
<model name='ground_plane'>
<pose>0 0 0 0 -0 0pose>
<scale>1 1 1scale>
<link name='link'>
<pose>0 0 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
model>
<model name='maze_big'>
<pose>-4.5354 -0.426624 0 0 -0 0pose>
<scale>1 1 1scale>
<link name='Wall_47'>
<pose>-23.4402 1.32338 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_48'>
<pose>-4.51517 7.24838 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_49'>
<pose>14.4098 -0.426624 0 0 0 -1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_50'>
<pose>6.7348 -8.10162 0 0 -0 3.14159pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_51'>
<pose>-0.94017 -5.42662 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_53'>
<pose>-21.3056 -0.232422 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_54'>
<pose>-19.1306 -1.78242 0 0 0 -1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_55'>
<pose>-17.0806 -3.33242 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_56'>
<pose>-15.0306 0.092578 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_57'>
<pose>-17.5806 3.51758 0 0 -0 3.14159pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_62'>
<pose>-14.2247 -8.0808 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_63'>
<pose>-5.04972 -4.0308 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_64'>
<pose>2.87528 0.019196 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_65'>
<pose>10.8003 -2.4058 0 0 0 -1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_68'>
<pose>3.01778 -2.2456 0 0 0 -1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_70'>
<pose>7.1847 -5.36534 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_72'>
<pose>-1.02778 1.85077 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_73'>
<pose>5.27222 3.65077 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_76'>
<pose>-4.57778 3.65077 0 0 -0 3.14159pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_78'>
<pose>-10.1249 -3.22677 0 0 -0 0pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_79'>
<pose>-8.82487 -4.27677 0 0 0 -1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_81'>
<pose>-6.84972 0.019196 0 0 -0 3.14159pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
<link name='Wall_85'>
<pose>-11.4249 1.94823 0 0 -0 1.5708pose>
<velocity>0 0 0 0 -0 0velocity>
<acceleration>0 0 0 0 -0 0acceleration>
<wrench>0 0 0 0 -0 0wrench>
link>
model>
<light name='sun'>
<pose>0 0 10 0 -0 0pose>
light>
state>
<model name='maze_big'>
<pose>-4.5354 -0.426624 0 0 -0 0pose>
<link name='Wall_47'>
<collision name='Wall_47_Collision'>
<geometry>
<box>
<size>12 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_47_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>12 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-18.9048 1.75 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_48'>
<collision name='Wall_48_Collision'>
<geometry>
<box>
<size>38 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_48_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>38 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>0.020227 7.675 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_49'>
<collision name='Wall_49_Collision'>
<geometry>
<box>
<size>15.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_49_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>15.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>18.9452 -0 0 0 -0 -1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_50'>
<collision name='Wall_50_Collision'>
<geometry>
<box>
<size>15.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_50_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>15.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>11.2702 -7.675 0 0 -0 3.14159pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_51'>
<collision name='Wall_51_Collision'>
<geometry>
<box>
<size>5.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_51_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>5.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>3.59523 -5 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_53'>
<collision name='Wall_53_Collision'>
<geometry>
<box>
<size>4.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_53_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>4.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-16.7702 0.194202 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_54'>
<collision name='Wall_54_Collision'>
<geometry>
<box>
<size>3.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_54_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>3.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-14.5952 -1.3558 0 0 -0 -1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_55'>
<collision name='Wall_55_Collision'>
<geometry>
<box>
<size>4.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_55_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>4.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-12.5452 -2.9058 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_56'>
<collision name='Wall_56_Collision'>
<geometry>
<box>
<size>7 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_56_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>7 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-10.4952 0.519202 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_57'>
<collision name='Wall_57_Collision'>
<geometry>
<box>
<size>5.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_57_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>5.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-13.0452 3.9442 0 0 -0 3.14159pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_62'>
<collision name='Wall_62_Collision'>
<geometry>
<box>
<size>18.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_62_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>18.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-9.68932 -7.65418 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_63'>
<collision name='Wall_63_Collision'>
<geometry>
<box>
<size>8.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_63_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>8.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-0.514317 -3.60418 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_64'>
<collision name='Wall_64_Collision'>
<geometry>
<box>
<size>16 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_64_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>16 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>7.41068 0.44582 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_65'>
<collision name='Wall_65_Collision'>
<geometry>
<box>
<size>5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_65_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>15.3357 -1.97918 0 0 -0 -1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_68'>
<collision name='Wall_68_Collision'>
<geometry>
<box>
<size>4.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_68_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>4.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>7.55318 -1.81898 0 0 -0 -1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_70'>
<collision name='Wall_70_Collision'>
<geometry>
<box>
<size>5.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_70_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>5.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>11.7201 -4.93872 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_72'>
<collision name='Wall_72_Collision'>
<geometry>
<box>
<size>3.75 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_72_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>3.75 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>3.50762 2.27739 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_73'>
<collision name='Wall_73_Collision'>
<geometry>
<box>
<size>12.75 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_73_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>12.75 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>9.80762 4.07739 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_76'>
<collision name='Wall_76_Collision'>
<geometry>
<box>
<size>7.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_76_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>7.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-0.042383 4.07739 0 0 -0 3.14159pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_78'>
<collision name='Wall_78_Collision'>
<geometry>
<box>
<size>2.75 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_78_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>2.75 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-5.58947 -2.80015 0 0 -0 0pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_79'>
<collision name='Wall_79_Collision'>
<geometry>
<box>
<size>2.25 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_79_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>2.25 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-4.28947 -3.85015 0 0 -0 -1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_81'>
<collision name='Wall_81_Collision'>
<geometry>
<box>
<size>3.75 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_81_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>3.75 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-2.31432 0.44582 0 0 -0 3.14159pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<link name='Wall_85'>
<collision name='Wall_85_Collision'>
<geometry>
<box>
<size>10.5 0.15 2.5size>
box>
geometry>
<pose>0 0 1.25 0 -0 0pose>
<max_contacts>10max_contacts>
<surface>
<contact>
<ode/>
contact>
<bounce/>
<friction>
<torsional>
<ode/>
torsional>
<ode/>
friction>
surface>
collision>
<visual name='Wall_85_Visual'>
<pose>0 0 1.25 0 -0 0pose>
<geometry>
<box>
<size>10.5 0.15 2.5size>
box>
geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
script>
<ambient>1 1 1 1ambient>
material>
<meta>
<layer>0layer>
meta>
visual>
<pose>-6.88947 2.37485 0 0 -0 1.5708pose>
<self_collide>0self_collide>
<enable_wind>0enable_wind>
<kinematic>0kinematic>
link>
<static>1static>
model>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose>-61.3252 -25.5797 25.1052 0 0.265797 0.513018pose>
<view_controller>orbitview_controller>
<projection_type>perspectiveprojection_type>
camera>
gui>
world>
sdf>
<robot name="robot">
<gazebo>
<plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
<alwaysOn>falsealwaysOn>
<legacyMode>falselegacyMode>
<publishTf>truepublishTf>
<publishWheelJointState>truepublishWheelJointState>
<updateRate>60updateRate>
<leftJoint>front_left_wheel_jointleftJoint>
<rightJoint>front_right_wheel_jointrightJoint>
<wheelSeparation>0.30 wheelSeparation>
<wheelDiameter>0.12wheelDiameter>
<robotBaseFrame>footprintrobotBaseFrame>
<torque>20torque>
<commandTopic>cmd_velcommandTopic>
<odometryTopic>odomodometryTopic>
<odometryFrame>odomodometryFrame>
<odometrySource>worldodometrySource>
<wheelAcceleration>1wheelAcceleration>
<wheelTorque>10wheelTorque>
<rosDebugLevel>narosDebugLevel>
plugin>
gazebo>
<gazebo reference="camera">
<sensor name="camera_sensor" type="camera">
<update_rate>30.0update_rate>
<always_on>1always_on>
<camera name="camera">
<horizontal_fov>1.3962634horizontal_fov>
<image>
<width>800width>
<height>800height>
<format>R8G8B8format>
image>
<clip>
<near>0.02near>
<far>300far>
clip>
<distortion>
<k1>0.0k1>
<k2>0.0k2>
<k3>0.0k3>
<p1>0.0p1>
<p2>0.0p2>
<center>0.5 0.5center>
distortion>
camera>
<plugin filename="libgazebo_ros_camera.so" name="camera_controller">
<ros>
<namespace>/robotnamespace>
<argument>camera/image_raw:=/robot/camera/imageargument>
<argument>camera/camera_info:=/robot/camera/image/camera_infoargument>
ros>
<camera_name>cameracamera_name>
<frame_name>cameraframe_name>
<hack_baseline>0.07hack_baseline>
plugin>
sensor>
gazebo>
<gazebo reference="vodyne">
<sensor name="vodyne16" type="ray">
<pose>0 0 0 0 0 0pose>
<visualize>truevisualize>
<update_rate>10update_rate>
<ray>
<scan>
<horizontal>
<samples>1200samples>
<resolution>1resolution>
<min_angle>-1.0471975min_angle>
<max_angle>1.0471975max_angle>
horizontal>
<vertical>
<samples>64samples>
<resolution>1resolution>
<min_angle>-0.26179938min_angle>
<max_angle>0.26179938max_angle>
vertical>
scan>
<range>
<min>0.055min>
<max>100.0max>
<resolution>0.1resolution>
range>
<noise>
<type>gaussiantype>
<mean>0.00mean>
<stddev>0.01stddev>
noise>
ray>
<plugin filename="libgazebo_ros_velodyne_laser.so" name="gazebo_ros_laser_controller">
<topicName>/scantopicName>
<frameName>laserframeName>
<min_range>0.9min_range>
<max_range>130.0max_range>
<gaussianNoise>0.0gaussianNoise>
plugin>
sensor>
gazebo>
<link name="footprint"/>
<link name="base">
<pose>0 0 0.1 0 0 0pose>
<inertial>
<mass value="1.50"/>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<inertia ixx="0.00282" ixy="0" ixz="0" iyy="0.00417" iyz="0" izz="0.00615"/>
inertial>
<collision name="collision">
<origin rpy=" 0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.3 0.24 0.1"/>
geometry>
collision>
<visual name="base_visual">
<origin rpy=" 0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.3 0.24 0.1"/>
geometry>
visual>
link>
<link name="front_left_wheel">
<inertial>
<mass value="0.50"/>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
inertial>
<visual>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
visual>
<collision>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
collision>
link>
<joint name="front_left_wheel_joint" type="continuous">
<origin rpy="0 0 0" xyz="0.05 0.15 0"/>
<child link="front_left_wheel"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 1 0"/>
<limit effort="10000" velocity="1000"/>
<dynamics damping="1.0" friction="1.0"/>
joint>
<gazebo reference="front_left_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>500000.0kp>
<kd>10.0kd>
<minDepth>0.001minDepth>
<maxVel>0.1maxVel>
<fdir1>1 0 0fdir1>
gazebo>
<link name="front_right_wheel">
<inertial>
<mass value="0.50"/>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
inertial>
<visual>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
visual>
<collision>
<origin rpy=" 0 1.5707963 1.5707963" xyz="0.0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
collision>
link>
<joint name="front_right_wheel_joint" type="continuous">
<origin rpy="0 0 0" xyz="0.05 -0.15 0"/>
<child link="front_right_wheel"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 1 0"/>
<limit effort="10000" velocity="1000"/>
<dynamics damping="1.0" friction="1.0"/>
joint>
<gazebo reference="front_right_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>500000.0kp>
<kd>10.0kd>
<minDepth>0.001minDepth>
<maxVel>0.1maxVel>
<fdir1>1 0 0fdir1>
gazebo>
<link name="back1_ball_wheel">
<inertial>
<mass value="0.1"/>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<inertia ixx="0.0005" ixy="0" ixz="0" iyy="0.0005" iyz="0" izz="0.0005"/>
inertial>
<visual>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
visual>
<collision>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
collision>
link>
<joint name="back1_ball_wheel_joint" type="fixed">
<origin rpy="0 0 0" xyz="-0.11 0.1 -0.055"/>
<child link="back1_ball_wheel"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 0 1"/>
joint>
<gazebo reference="back1_ball_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>1000000.0kp>
<kd>100.0kd>
<minDepth>0.001minDepth>
<maxVel>1.0maxVel>
gazebo>
<link name="back2_ball_wheel">
<inertial>
<mass value="0.1"/>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<inertia ixx="0.0005" ixy="0" ixz="0" iyy="0.0005" iyz="0" izz="0.0005"/>
inertial>
<visual>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
visual>
<collision>
<origin rpy=" 0 0 0" xyz="0.0 0 0"/>
<geometry>
<sphere radius="0.005"/>
geometry>
collision>
link>
<joint name="back2_ball_wheel_joint" type="fixed">
<origin rpy="0 0 0" xyz="-0.11 -0.1 -0.055"/>
<child link="back2_ball_wheel"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 0 1"/>
joint>
<gazebo reference="back2_ball_wheel">
<material>Gazebo/Graymaterial>
<mu1>0.1mu1>
<mu2>0.1mu2>
<kp>1000000.0kp>
<kd>100.0kd>
<minDepth>0.001minDepth>
<maxVel>1.0maxVel>
gazebo>
<link name="camera">
<inertial>
<mass value="0.1"/>
<origin rpy=" 0 0 0" xyz="0.02 0.05 0.05"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/>
inertial>
<visual name="camera_visual">
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.02 0.05 0.05"/>
geometry>
visual>
<collision name="camera_colision">
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.02 0.05 0.05"/>
geometry>
collision>
link>
<link name="vodyne">
<inertial>
<mass value="1e-5"/>
<origin rpy=" 0 0 0" xyz="0 0 0"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/>
inertial>
<visual name="vodyne_visual">
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.06"/>
geometry>
visual>
<collision name="vodyne_colision">
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="0.05" radius="0.03"/>
geometry>
collision>
link>
<joint name="footprint_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0"/>
<parent link="footprint"/>
<child link="base"/>
joint>
<joint name="camera_joint" type="fixed">
<origin rpy="0 0 0" xyz="0.175 0 0"/>
<child link="camera"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 0 1"/>
joint>
<joint name="vodyne_joint" type="fixed">
<origin rpy="0 0 0" xyz="0.08 0 0.075"/>
<child link="vodyne"/>
<parent link="base"/>
<axis rpy="0 0 0" xyz="0 0 1"/>
joint>
<gazebo reference="base">
<material>Gazebo/Whitematerial>
gazebo>
<gazebo reference="camera">
<material>Gazebo/Blackmaterial>
gazebo>
<gazebo reference="vodyne">
<material>Gazebo/Blackmaterial>
gazebo>
robot>
<gazebo>
<plugin filename="libgazebo_ros_diff_drive.so" name="skid_steer_drive_controller">
<ros>
<namespace>/mobotnamespace>
<argument>/cmd_vel:=mr_cme_velargument>
<argument>/odom:=odomargument>
ros>
<update_rate>100.0update_rate>
<num_wheel_pairs>2num_wheel_pairs>
<odometry_frame>odomodometry_frame>
<left_joint>front_left_wheel_jointleft_joint>
<left_joint>back_left_wheel_jointleft_joint>
<wheel_separation>0.4wheel_separation>
<wheel_diameter>0.2wheel_diameter>
<right_joint>front_right_wheel_jointright_joint>
<right_joint>back_right_wheel_jointright_joint>
<wheel_separation>0.4wheel_separation>
<wheel_diameter>0.2wheel_diameter>
<robot_base_frame>robot_footprintrobot_base_frame>
<max_wheel_torque>20max_wheel_torque>
<publish_odom>truepublish_odom>
<publish_odom_tf>truepublish_odom_tf>
<publish_wheel_tf>truepublish_wheel_tf>
<odometry_source>worldodometry_source>
plugin>
gazebo>
这里需要把原代码中的 hokuyo_link换为vodyne,安装相关插件sudo apt-get install ros-noetic-velodyne-simulator并且在.gazebo中把雷达插件部分脚本更改如下,其他不变
<gazebo reference="vodyne">
<sensor type="ray" name="vodyne16">
<pose>0 0 0 0 0 0pose>
<visualize>truevisualize>
<update_rate>10update_rate>
<ray>
<scan>
<horizontal>
<samples>1200samples>
<resolution>1resolution>
<min_angle>-1.0471975min_angle>
<max_angle>1.0471975max_angle>
horizontal>
<vertical>
<samples>64samples>
<resolution>1resolution>
<min_angle>-0.26179938min_angle>
<max_angle>0.26179938max_angle>
vertical>
scan>
<range>
<min>0.055min>
<max>100.0max>
<resolution>0.1resolution>
range>
<noise>
<type>gaussiantype>
<mean>0.00mean>
<stddev>0.01stddev>
noise>
ray>
<plugin name="gazebo_ros_laser_controller" filename="libgazebo_ros_velodyne_laser.so">
<topicName>/scantopicName>
<frameName>laserframeName>
<min_range>0.9min_range>
<max_range>130.0max_range>
<gaussianNoise>0.0gaussianNoise>
plugin>
sensor>
gazebo>