feat: complete part of xacro
This commit is contained in:
parent
f082edb9d4
commit
0ed7aab229
@ -36,6 +36,134 @@
|
||||
</material>
|
||||
|
||||
|
||||
<gazebo reference="left_wheel">
|
||||
<mu1>0.1000</mu1>
|
||||
<mu2>0.1000</mu2>
|
||||
<kp>500000.0</kp>
|
||||
<kd>10.0</kd>
|
||||
<minDepth>0.001</minDepth>
|
||||
<maxVel>0.1</maxVel>
|
||||
<fdir1>1 0 0</fdir1>
|
||||
</gazebo>
|
||||
|
||||
<gazebo reference="right_wheel">
|
||||
<mu1>0.1000</mu1>
|
||||
<mu2>0.1000</mu2>
|
||||
<kp>500000.0</kp>
|
||||
<kd>10.0</kd>
|
||||
<minDepth>0.001</minDepth>
|
||||
<maxVel>0.1</maxVel>
|
||||
<fdir1>1 0 0</fdir1>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<gazebo reference="left_caster">
|
||||
<mu1>0.0</mu1>
|
||||
<mu2>0.0</mu2>
|
||||
<kp>1000000.0</kp>
|
||||
<kd>100.0</kd>
|
||||
<minDepth>0.001</minDepth>
|
||||
<maxVel>1.0</maxVel>
|
||||
<material>Gazebo/FlatBlack</material>
|
||||
</gazebo>
|
||||
|
||||
<gazebo reference="right_caster">
|
||||
<mu1>0.0</mu1>
|
||||
<mu2>0.0</mu2>
|
||||
<kp>1000000.0</kp>
|
||||
<kd>100.0</kd>
|
||||
<minDepth>0.001</minDepth>
|
||||
<maxVel>1.0</maxVel>
|
||||
<material>Gazebo/FlatBlack</material>
|
||||
</gazebo>
|
||||
|
||||
<gazebo>
|
||||
<plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<bodyName>imu_link</bodyName>
|
||||
<frameName>imu_link</frameName>
|
||||
<topicName>imu</topicName>
|
||||
<serviceName>imu_service</serviceName>
|
||||
<gaussianNoise>0.0</gaussianNoise>
|
||||
<updateRate>0</updateRate>
|
||||
<imu>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<rate>
|
||||
<mean>0.0</mean>
|
||||
<stddev>2e-4</stddev>
|
||||
<bias_mean>0.0000075</bias_mean>
|
||||
<bias_stddev>0.0000008</bias_stddev>
|
||||
</rate>
|
||||
<accel>
|
||||
<mean>0.0</mean>
|
||||
<stddev>1.7e-2</stddev>
|
||||
<bias_mean>0.1</bias_mean>
|
||||
<bias_stddev>0.001</bias_stddev>
|
||||
</accel>
|
||||
</noise>
|
||||
</imu>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<gazebo reference="base_scan">
|
||||
<material>Gazebo/FlatBlack</material>
|
||||
<sensor type="ray" name="lds_lfcd_sensor">
|
||||
<pose>0 0 0 0 0 0</pose>
|
||||
<visualize>$(arg laser_visual)</visualize>
|
||||
<update_rate>5</update_rate>
|
||||
<ray>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>0.0</min_angle>
|
||||
<max_angle>6.28319</max_angle>
|
||||
</horizontal>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.120</min>
|
||||
<max>3.5</max>
|
||||
<resolution>0.015</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_kaser.so">
|
||||
<topicName>scan</topicName>
|
||||
<frameName>base_scan</frameName>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<gazebo>
|
||||
<plugin name="turtlebot3_waffle_controller" filename="libgazebo_ros_diff_drive.so">
|
||||
<commandTopic>cmd_vel</commandTopic>
|
||||
<odometryTopic>odom</odometryTopic>
|
||||
<odometryFrame>odom</odometryFrame>
|
||||
<odometrySource>world</odometrySource>
|
||||
<publishOdomTF>true</publishOdomTF>
|
||||
<robotBaseFrame>base_footprint</robotBaseFrame>
|
||||
<publishWheelTF>false</publishWheelTF>
|
||||
<publishTf>true</publishTf>
|
||||
<publishWheelJointState>true</publish WheelJointState>
|
||||
<legacyMode>false</legacyMode>
|
||||
<updateRate>30</updateRate>
|
||||
<leftJoint>wheel_left_joint</leftJoint>
|
||||
<rightJoint>wheel_right_joint</rightJoint>
|
||||
<wheelSeparation>0.45</wheel Separation>
|
||||
<wheelDiameter>0.1</wheel Diameter>
|
||||
<wheelAcceleration>1</wheelAcceleration>
|
||||
<wheelTorque>10</wheelTorque>
|
||||
<rosDebugLevel>na</rosDebugLevel>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
<xacro:macro name="cube_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
@ -61,6 +189,78 @@
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="wheel" params="prefix reflect material">
|
||||
<link name="${prefix}_wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
</geometry>
|
||||
<material name="${material}"/>
|
||||
<origin rpy="${PI*0.5} 0 0" xyz="0 ${reflect*wheel_length*0.5} 0"/>
|
||||
<material name="red"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
</geometry>
|
||||
<origin rpy="${PI*0.5} 0 0" xyz="0 ${reflect*wheel_length*0.5} 0"/>
|
||||
</collision>
|
||||
<xacro:cylinder_inertial mass="${wheel_mass}" ixx="0.0001" iyy="0.001" izz="0.0001"/>
|
||||
</link>
|
||||
|
||||
<gazebo reference="${prefix}_wheel">
|
||||
<material>Gazebo/${material}</material>
|
||||
</gazebo>
|
||||
|
||||
<joint name="wheel_${prefix}_joint" type="continuous">
|
||||
<parent link="base_link"/>
|
||||
<child link="${prefix}_wheel"/>
|
||||
<origin xyz="${base_link_w*0.25} ${reflect*base_link*0.5} -${base_link_h*0.25}"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint>
|
||||
</xacro:macro>
|
||||
|
||||
|
||||
<xacro:macro name="caster" params="prefix reflect material">
|
||||
<link name="${prefix}_caster">
|
||||
<visual>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="${material}"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="${material}"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
</link>
|
||||
<gazebo reference="${prefix}_caster">
|
||||
<material>
|
||||
Gazebo/${material}
|
||||
</material>
|
||||
</gazebo>
|
||||
<joint name="base_to_${prefix}_caster" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="${prefix}_caster"/>
|
||||
<origin xyz="-${base_link_w*0.33} ${reflect*base_link_l*0.25} -${base_link_h*0.5}"/>
|
||||
</joint>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="rigid_inertial" params="mass ixx iyy izz">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="${ixx}" ixy="0.0" ixz="0.0"
|
||||
iyy="${iyy}" iyz="0.0"
|
||||
izz="${izz}"/>
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
|
||||
|
||||
|
||||
<link name="base_footprint"/>
|
||||
|
||||
@ -87,10 +287,20 @@
|
||||
<mass value="${base_link_mass}"/>
|
||||
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.02" iyz="0.0" izz="0.041"/>
|
||||
</inertial> -->
|
||||
<xacro:cube_inertial mass="${base_link_mass}"/>
|
||||
</link>
|
||||
|
||||
<link name="right_wheel">
|
||||
<!-- TODO: -->
|
||||
<xacro:rigid_inertial mass="${base_link_mass}" ixx="0.01" iyy="0.02" izz="0.041"/>
|
||||
</link>
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Orange</material>
|
||||
</gazebo>
|
||||
|
||||
|
||||
|
||||
<xacro:wheel prefix="right" reflect="-1" material="Red"/>
|
||||
<xacro:wheel prefix="left" reflect="1" material="Green"/>
|
||||
|
||||
<!-- <link name="right_wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
@ -117,11 +327,9 @@
|
||||
<child link="right_wheel"/>
|
||||
<origin xyz="0.0 -0.2 -0.025"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint>
|
||||
</joint> -->
|
||||
|
||||
|
||||
|
||||
<link name="left_wheel">
|
||||
<!-- <link name="left_wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
@ -147,41 +355,41 @@
|
||||
<child link="left_wheel"/>
|
||||
<origin xyz="0.0 0.2 -0.025"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint>
|
||||
</joint> -->
|
||||
|
||||
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Orange</material>
|
||||
</gazebo>
|
||||
<xacro:caster prefix="right" reflect="1" material="Gray"/>
|
||||
<xacro:caster prefix="left" reflect="-1" material="Gray"/>
|
||||
|
||||
|
||||
<link name="right_caster">
|
||||
<visual>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
</link>
|
||||
<gazebo reference="right_caster">
|
||||
<material>Gazebo/Gray</material>
|
||||
</gazebo>
|
||||
|
||||
<joint name="base_to_right_caster" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="right_caster"/>
|
||||
<origin xyz="${base_link_w*0.33} ${base_link_l*0.0} -${base_link_h*0.5}"/>
|
||||
</joint>
|
||||
<!--
|
||||
<link name="right_caster">
|
||||
<visual>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
</link>
|
||||
<gazebo reference="right_caster">
|
||||
<material>Gazebo/Gray</material>
|
||||
</gazebo>
|
||||
|
||||
<joint name="base_to_right_caster" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="right_caster"/>
|
||||
<origin xyz="${base_link_w*0.33} ${base_link_l*0.0} -${base_link_h*0.5}"/>
|
||||
</joint> -->
|
||||
|
||||
<!--
|
||||
<link name="left_caster">
|
||||
<visual>
|
||||
<geometry>
|
||||
@ -206,7 +414,7 @@
|
||||
<parent link="base_link"/>
|
||||
<child link="left_caster"/>
|
||||
<origin xyz="-${base_link_w*0.33} -${base_link_l*0} -${base_link_h*0.5}"/>
|
||||
</joint>
|
||||
</joint> -->
|
||||
|
||||
<!-- imu -->
|
||||
|
||||
@ -270,7 +478,7 @@
|
||||
</link>
|
||||
|
||||
<joint name="scan_joint" type="fixed">
|
||||
<parent link="laser scanner_base_link"/>
|
||||
<parent link="laser_scanner_base_link"/>
|
||||
<child link="base_scan"/>
|
||||
<origin xyz="0 0 0.07" rpy="0 0 0"/>
|
||||
</joint>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user