You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

361 lines
10 KiB

<?xml version="1.0"?>
<sdf version="1.6">
<model name='rover_differential'>
<!--Links-->
<link name='base_link'>
<pose relative_to='__model__'>0 0 0.1 0 0 0</pose>
<inertial>
<mass>5.0</mass>
<pose>-0.2 0 0 0 0 0</pose> <!-- Center of mass offset to wheel axis-->
<inertia>
<ixx>0.030208333</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.108333333</iyy>
<iyz>0.0</iyz>
<izz>0.130208333</izz>
</inertia>
</inertial>
<visual name='visual'>
<pose>0 0 -0.05 0 0 0</pose>
<geometry>
<mesh>
<uri>model://rover_differential/meshes/rover_differential_base.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='collision'>
<geometry>
<box>
<size>1 0.5 0.1</size>
</box>
</geometry>
</collision>
<!--Sensors-->
<sensor name="air_pressure_sensor" type="air_pressure">
<gz_frame_id>base_link</gz_frame_id>
<always_on>1</always_on>
<update_rate>50</update_rate>
<air_pressure>
<!-- Noise modeled after BMP390 -->
<pressure>
<noise type="gaussian">
<mean>0</mean>
<stddev>3</stddev>
</noise>
</pressure>
</air_pressure>
</sensor>
<sensor name="magnetometer_sensor" type="magnetometer">
<gz_frame_id>base_link</gz_frame_id>
<always_on>1</always_on>
<update_rate>100</update_rate>
<magnetometer>
<!-- TODO: update to fix units and coordinate system when we move past Harmonic -->
<!-- See https://github.com/gazebosim/gz-sim/pull/2460 -->
<!-- 3mgauss RMS: NOTE: noise is in tesla but sensor reports data in gauss -->
<!-- Noise modeled after IIS2MDC -->
<x>
<noise type="gaussian">
<stddev>0.0001</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<stddev>0.0001</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<stddev>0.0001</stddev>
</noise>
</z>
</magnetometer>
</sensor>
<sensor name="imu_sensor" type="imu">
<gz_frame_id>base_link</gz_frame_id>
<always_on>1</always_on>
<update_rate>250</update_rate>
<imu>
<angular_velocity>
<!-- Noise modeled after IIM42653 -->
<!-- 0.05 deg/s converted to rad/s -->
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.0008726646</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.0008726646</stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.0008726646</stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<!-- Noise modeled after IIM42653 -->
<!-- X & Y axis: 0.65 mg-rms converted to m/ss -->
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.00637</stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.00637</stddev>
</noise>
</y>
<!-- Z axis: 0.70 mg-rms converted to m/ss-->
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>0.00686</stddev>
</noise>
</z>
</linear_acceleration>
</imu>
</sensor>
<sensor name="navsat_sensor" type="navsat">
<gz_frame_id>base_link</gz_frame_id>
<always_on>1</always_on>
<update_rate>30</update_rate>
</sensor>
</link>
<link name='wheel_rear_left_link'>
<pose relative_to="base_link">-0.2 0.3 0 -1.5707 0 0</pose>
<inertial>
<mass>0.5</mass>
<inertia>
<ixx>0.000807292</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.000807292</iyy>
<iyz>0</iyz>
<izz>0.00140625</izz>
</inertia>
</inertial>
<visual name='visual'>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>model://rover_differential/meshes/rover_differential_wheel.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='collision'>
<geometry>
<cylinder>
<radius>0.1</radius>
<length>0.1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
<fdir1>1 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
</surface>
</collision>
</link>
<link name='wheel_rear_right_link'>
<pose relative_to="base_link">-0.2 -0.3 0 -1.5707 0 0</pose>
<inertial>
<mass>0.5</mass>
<inertia>
<ixx>0.000807292</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.000807292</iyy>
<iyz>0</iyz>
<izz>0.00140625</izz>
</inertia>
</inertial>
<visual name='visual'>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<uri>model://rover_differential/meshes/rover_differential_wheel.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='collision'>
<geometry>
<cylinder>
<radius>0.1</radius>
<length>0.1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
<fdir1>1 0 0</fdir1>
<slip1>0.0</slip1>
<slip2>0.0</slip2>
</ode>
</friction>
</surface>
</collision>
</link>
<link name='cast_wheel_front_link'>
<pose relative_to="base_link">0.25 0 -0.025 -1.5707 0 0</pose>
<inertial>
<mass>1</mass>
<inertia>
<ixx>0.016</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.016</iyy>
<iyz>0</iyz>
<izz>0.016</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<sphere>
<radius>0.075</radius>
</sphere>
</geometry>
<material>
<ambient>0 0 0 1</ambient>
<diffuse>0 0 0 1</diffuse>
<specular>0 0 0 0</specular>
<emissive>0 0 0 1</emissive>
</material>
</visual>
<collision name='collision'>
<geometry>
<sphere>
<radius>0.075</radius>
</sphere>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<fdir1>1 0 0</fdir1>
</ode>
</friction>
</surface>
</collision>
</link>
<link name='cast_wheel_rear_link'>
<pose relative_to="base_link">-0.3 0 -0.025 -1.5707 0 0</pose>
<inertial>
<mass>1</mass>
<inertia>
<ixx>0.016</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.016</iyy>
<iyz>0</iyz>
<izz>0.016</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<sphere>
<radius>0.075</radius>
</sphere>
</geometry>
<material>
<ambient>0 0 0 1</ambient>
<diffuse>0 0 0 1</diffuse>
<specular>0 0 0 0</specular>
<emissive>0 0 0 1</emissive>
</material>
</visual>
<collision name='collision'>
<geometry>
<sphere>
<radius>0.075</radius>
</sphere>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<fdir1>1 0 0</fdir1>
</ode>
</friction>
</surface>
</collision>
</link>
<!-- Joints -->
<joint name='wheel_rear_left_joint' type='revolute'>
<pose relative_to='wheel_rear_left_link' />
<parent>base_link</parent>
<child>wheel_rear_left_link</child>
<axis>
<xyz expressed_in='__model__'>0 1 0</xyz>
</axis>
</joint>
<joint name='wheel_rear_right_joint' type='revolute'>
<pose relative_to='wheel_rear_right_link' />
<parent>base_link</parent>
<child>wheel_rear_right_link</child>
<axis>
<xyz expressed_in='__model__'>0 1 0</xyz>
</axis>
</joint>
<joint name='cast_wheel_front_joint' type='ball'>
<pose relative_to='cast_wheel_front_link' />
<parent>base_link</parent>
<child>cast_wheel_front_link</child>
</joint>
<joint name='cast_wheel_rear_link' type='ball'>
<pose relative_to='cast_wheel_rear_link' />
<parent>base_link</parent>
<child>cast_wheel_rear_link</child>
</joint>
<!--Plugins-->
<plugin filename="gz-sim-joint-controller-system" name="gz::sim::systems::JointController">
<joint_name>wheel_rear_left_joint</joint_name>
<sub_topic>command/motor_speed</sub_topic>
<control_type>velocity</control_type>
<use_actuator_msg>true</use_actuator_msg>
<actuator_number>1</actuator_number>
</plugin>
<plugin filename="gz-sim-joint-controller-system" name="gz::sim::systems::JointController">
<joint_name>wheel_rear_right_joint</joint_name>
<sub_topic>command/motor_speed</sub_topic>
<control_type>velocity</control_type>
<use_actuator_msg>true</use_actuator_msg>
<actuator_number>0</actuator_number>
</plugin>
<plugin filename="gz-sim-joint-state-publisher-system"
name="gz::sim::systems::JointStatePublisher">
<joint_name>wheel_rear_left_joint</joint_name>
<joint_name>wheel_rear_right_joint</joint_name>
</plugin>
</model>
</sdf>