updated robot description
This commit is contained in:
34
src/sherpa/urdf/components/imu.xacro
Normal file
34
src/sherpa/urdf/components/imu.xacro
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||
|
||||
<xacro:macro name="imu" params="name parent xyz rpy frequency">
|
||||
|
||||
<link name="${name}_link">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<inertia
|
||||
ixx="0.001828"
|
||||
ixy="0.0"
|
||||
ixz="0.0"
|
||||
iyy="0.001828"
|
||||
iyz="0.0"
|
||||
izz="0.003528"
|
||||
/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="${name}_joint" type="fixed">
|
||||
<parent link="${parent}_link"/>
|
||||
<child link="${name}_link"/>
|
||||
<origin xyz="${xyz}" rpy="${rpy}"/>
|
||||
</joint>
|
||||
<gazebo reference="${name}_link">
|
||||
<sensor name="${name}" type="imu">
|
||||
<always_on>1</always_on>
|
||||
<update_rate>${frequency}</update_rate>
|
||||
<gz_frame_id>${name}_link</gz_frame_id>
|
||||
<visualize>true</visualize>
|
||||
<topic>/imu</topic>
|
||||
</sensor>
|
||||
</gazebo>
|
||||
</xacro:macro>
|
||||
</robot>
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
<!-- get left or right wheel -->
|
||||
<xacro:if value="${direction == 'l'}">
|
||||
<xacro:property name="mesh" value="https://fuel.gazebosim.org/1.0/OpenRobotics/models/Mecanum lift/tip/files/meshes/mecanum_wheel_left.STL"/>
|
||||
<xacro:property name="mesh" value="package://sherpa/urdf/meshes//mecanum_wheel_left.STL"/>
|
||||
<xacro:property name="friction_dir" value="-1"/>
|
||||
</xacro:if>
|
||||
<xacro:if value="${direction == 'r'}">
|
||||
<xacro:property name="mesh" value="https://fuel.gazebosim.org/1.0/OpenRobotics/models/Mecanum lift/tip/files/meshes/mecanum_wheel_right.STL"/>
|
||||
<xacro:property name="mesh" value="package://sherpa/urdf/meshes//mecanum_wheel_right.STL"/>
|
||||
<xacro:property name="friction_dir" value="1"/>
|
||||
</xacro:if>
|
||||
|
||||
@@ -46,18 +46,18 @@
|
||||
<material name="mecanum_wheel_material"/>
|
||||
</visual>
|
||||
<collision name='collision'>
|
||||
<geometry>
|
||||
<sphere radius="${radius}"/>
|
||||
</geometry>
|
||||
<surface>
|
||||
<friction>
|
||||
<ode>
|
||||
<mu>1.2</mu>
|
||||
<mu2>0</mu2>
|
||||
<fdir1 gz:expressed_in="${parent}">1 ${friction_dir} 0</fdir1>
|
||||
</ode>
|
||||
</friction>
|
||||
</surface>
|
||||
<geometry>
|
||||
<sphere radius="${radius}"/>
|
||||
</geometry>
|
||||
<surface>
|
||||
<friction>
|
||||
<ode>
|
||||
<mu>1.2</mu>
|
||||
<mu2>0</mu2>
|
||||
<fdir1 gz:expressed_in="${parent}_link">1 ${friction_dir} 0</fdir1>
|
||||
</ode>
|
||||
</friction>
|
||||
</surface>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name='${name}_joint' type='continuous'>
|
||||
|
||||
@@ -140,11 +140,6 @@
|
||||
</joint>
|
||||
<gazebo reference="${name}_link">
|
||||
<sensor name="${name}" type="gpu_lidar">
|
||||
<plugin
|
||||
filename="gz-sim-sensors-system"
|
||||
name="gz::sim::systems::Sensors">
|
||||
<render_engine>ogre2</render_engine>
|
||||
</plugin>
|
||||
<update_rate>${frequency}</update_rate>
|
||||
<topic>/velodyne_points</topic>
|
||||
<gz_frame_id>${name}_link</gz_frame_id>
|
||||
|
||||
Reference in New Issue
Block a user