< = = />origin xyz "0 0 0" rpy "${M_PI/2} 0 0"
< >geometry
< = = />cylinder radius "${wheel_radius}" length "${wheel_length}"
</ >geometry
</ >collision
<!-- inertial -->
< = = =cylinder_inertial_matrix m "${wheel_mass}" r "${wheel_radius}" h "${wh
/>eel_length}"
</ >link
2、添加gazebo标签
为各link配颜色 ,gazebo与rivz颜色设置不兼容
<!-- Add gazebo tag to link -->
< = >gazebo reference "${prefix}_wheel_link"
Gazebo/Gray < >material </ >material
</ >gazebo
3、为joint添加传动装置
用得 transmission 标签
小车轮子用速度控制接口
除此之外还有位置控制接口和力控制接口
<!-- Transmission is important to link the joints and the controller -->
< = >transmission name "${prefix}_wheel_joint_trans"
transmission_interface/SimpleTransmission< >type </ >type
< = >joint name "${prefix}_wheel_joint"
hardware_interface/VelocityJointInterface< >hardwareInterface </hardwa
>reInterface
</ >joint
< = >actuator name "${prefix}_wheel_joint_motor"
hardware_interface/VelocityJointInterface< >hardwareInterface </hardwa
>reInterface
1< >mechanicalReduction </ >mechanicalReduction
</ >actuator
</ >transmission
</ >xacro:macro
同理为前后支撑轮加入内容
1、增加惯性属性和碰撞属性
<!-- Macro for robot caster -->
< = = >xacro:macro name "caster" params "prefix reflect"
< = = >joint name "${prefix}_caster_joint" type "continuous"
< =origin xyz "${reflect*caster_joint_x} 0 ${-(base_length/2 +
= />caster_radius)}" rpy "0 0 0"
< = />parent link "base_link"
< = />child link "${prefix}_caster_link"
< = />axis xyz "0 1 0"
</ >joint
评论10
最新资源