fix: fix by gemini
This commit is contained in:
parent
4c1356ea0d
commit
dcdde583ee
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" ?>
|
||||
<robot name="myrobot" xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||
|
||||
|
||||
<xacro:arg name="laser_visual" default="false"/>
|
||||
|
||||
<xacro:property name="PI" value="3.1415926535897931"/>
|
||||
<xacro:property name="base_link_l" value="0.4" />
|
||||
@ -17,25 +18,24 @@
|
||||
<xacro:property name="laser_scanner_base_link_mass" value="0.5" />
|
||||
|
||||
<material name="blue">
|
||||
<color rgba="0 0 0.8 1"/>
|
||||
<color rgba="0 0 0.8 1"/>
|
||||
</material>
|
||||
<material name="black">
|
||||
<color rgba="0 0 0 1"/>
|
||||
<color rgba="0 0 0 1"/>
|
||||
</material>
|
||||
<material name="white">
|
||||
<color rgba="1 1 1 1"/>
|
||||
<color rgba="1 1 1 1"/>
|
||||
</material>
|
||||
<material name="orange">
|
||||
<color rgba="1 0.65 0 1"/>
|
||||
<color rgba="1 0.65 0 1"/>
|
||||
</material>
|
||||
<material name="red">
|
||||
<color rgba="1 0 0 1"/>
|
||||
<color rgba="1 0 0 1"/>
|
||||
</material>
|
||||
<material name="green">
|
||||
<color rgba="0 1 0 1"/>
|
||||
<color rgba="0 1 0 1"/>
|
||||
</material>
|
||||
|
||||
|
||||
<gazebo reference="left_wheel">
|
||||
<mu1>0.1000</mu1>
|
||||
<mu2>0.1000</mu2>
|
||||
@ -55,7 +55,6 @@
|
||||
<maxVel>0.1</maxVel>
|
||||
<fdir1>1 0 0</fdir1>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<gazebo reference="left_caster">
|
||||
<mu1>0.0</mu1>
|
||||
@ -106,7 +105,6 @@
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<gazebo reference="base_scan">
|
||||
<material>Gazebo/FlatBlack</material>
|
||||
<sensor type="ray" name="lds_lfcd_sensor">
|
||||
@ -133,14 +131,13 @@
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_kaser.so">
|
||||
<plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_laser.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>
|
||||
@ -151,272 +148,140 @@
|
||||
<robotBaseFrame>base_footprint</robotBaseFrame>
|
||||
<publishWheelTF>false</publishWheelTF>
|
||||
<publishTf>true</publishTf>
|
||||
<publishWheelJointState>true</publish WheelJointState>
|
||||
<publishWheelJointState>true</publishWheelJointState>
|
||||
<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>
|
||||
<wheelSeparation>0.45</wheelSeparation>
|
||||
<wheelDiameter>0.1</wheelDiameter>
|
||||
<wheelAcceleration>1</wheelAcceleration>
|
||||
<wheelTorque>10</wheelTorque>
|
||||
<rosDebugLevel>na</rosDebugLevel>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
<xacro:macro name="cube_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.02" iyz="0.0" izz="0.041" />
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
<xacro:macro name="cube_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.02" iyz="0.0" izz="0.041" />
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="cylinder_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
|
||||
iyy="0.0001" iyz="0.0"
|
||||
izz="0.0001" />
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
<xacro:macro name="cylinder_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
|
||||
iyy="0.0001" iyz="0.0"
|
||||
izz="0.0001" />
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="sphere_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}" />
|
||||
<inertia ixx="1.2e-05" ixy="0.0" ixz="0.0"
|
||||
iyy="1.2e-05" iyz="0.0"
|
||||
izz="1.2e-05" />
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
<xacro:macro name="sphere_inertial" params="mass">
|
||||
<inertial>
|
||||
<mass value="${mass}" />
|
||||
<inertia ixx="1.2e-05" ixy="0.0" ixz="0.0"
|
||||
iyy="1.2e-05" iyz="0.0"
|
||||
izz="1.2e-05" />
|
||||
</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>
|
||||
<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>
|
||||
|
||||
<gazebo reference="${prefix}_wheel">
|
||||
<material>Gazebo/${material}</material>
|
||||
</gazebo>
|
||||
<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"/>
|
||||
</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}"/>
|
||||
</link>
|
||||
|
||||
<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>
|
||||
<gazebo reference="${prefix}_wheel">
|
||||
<material>Gazebo/${material}</material>
|
||||
</gazebo>
|
||||
|
||||
|
||||
<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"/>
|
||||
|
||||
<joint name="base_joint" type="fixed">
|
||||
<parent link="base_footprint"/>
|
||||
<child link="base_link"/>
|
||||
<origin xyz="0 0 0.050" rpy="0 0 0"/>
|
||||
<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_w*0.5} -${base_link_h*0.25}"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint>
|
||||
</xacro:macro>
|
||||
|
||||
<link name="base_link">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="${base_link_w} ${base_link_l} ${base_link_h}"/>
|
||||
</geometry>
|
||||
<material name="orange"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="${base_link_w} ${base_link_l} ${base_link_h}"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
|
||||
<!-- <inertial>
|
||||
<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> -->
|
||||
|
||||
<!-- 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>
|
||||
<xacro:macro name="caster" params="prefix reflect material">
|
||||
<link name="${prefix}_caster">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<material name="red"/>
|
||||
<origin rpy="1.57075 0 0" xyz="0 -0.025 0"/>
|
||||
<material name="red"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="${material}"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin rpy="1.57075 0 0" xyz="0 -0.025 0"/>
|
||||
</collision>
|
||||
<xacro:cylinder_inertial mass="${wheel_mass}"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
</link>
|
||||
|
||||
<gazebo reference="right_wheel">
|
||||
<material>Gazebo/Red</material>
|
||||
<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>
|
||||
|
||||
<joint name="wheel_right_joint" type="continuous">
|
||||
<parent link="base_link"/>
|
||||
<child link="right_wheel"/>
|
||||
<origin xyz="0.0 -0.2 -0.025"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint> -->
|
||||
<link name="base_footprint"/>
|
||||
|
||||
<joint name="base_joint" type="fixed">
|
||||
<parent link="base_footprint"/>
|
||||
<child link="base_link"/>
|
||||
<origin xyz="0 0 0.050" rpy="0 0 0"/>
|
||||
</joint>
|
||||
|
||||
<!-- <link name="left_wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
</geometry>
|
||||
<material name="green"/>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0.025 0"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="${wheel_length}" radius="${wheel_radius}"/>
|
||||
</geometry>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0.025 0"/>
|
||||
</collision>
|
||||
<xacro:cylinder_inertial mass="${wheel_mass}"/>
|
||||
</link>
|
||||
|
||||
<gazebo reference="left_wheel">
|
||||
<material>Gazebo/Green</material>
|
||||
</gazebo>
|
||||
|
||||
<joint name="wheel_left_joint" type="continuous">
|
||||
<parent link="base_link"/>
|
||||
<child link="left_wheel"/>
|
||||
<origin xyz="0.0 0.2 -0.025"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
</joint> -->
|
||||
|
||||
|
||||
<xacro:caster prefix="right" reflect="1" material="Gray"/>
|
||||
<xacro:caster prefix="left" reflect="-1" material="Gray"/>
|
||||
|
||||
|
||||
<!--
|
||||
<link name="right_caster">
|
||||
<link name="base_link">
|
||||
<visual>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
<box size="${base_link_w} ${base_link_l} ${base_link_h}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="white"/>
|
||||
<material name="orange"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
<box size="${base_link_w} ${base_link_l} ${base_link_h}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
<xacro:rigid_inertial mass="${base_link_mass}" ixx="0.01" iyy="0.02" izz="0.041"/>
|
||||
</link>
|
||||
<gazebo reference="right_caster">
|
||||
<material>Gazebo/Gray</material>
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Orange</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>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
<material name="gray"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="${caster_radius}"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0"/>
|
||||
</collision>
|
||||
<xacro:sphere_inertial mass="${caster_mass}"/>
|
||||
</link>
|
||||
<gazebo reference="left_caster">
|
||||
<material>Gazebo/Gray</material>
|
||||
</gazebo>
|
||||
|
||||
<joint name="base_to_left_caster" type="fixed">
|
||||
<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> -->
|
||||
|
||||
<!-- imu -->
|
||||
<xacro:wheel prefix="right" reflect="-1" material="red"/>
|
||||
<xacro:wheel prefix="left" reflect="1" material="green"/>
|
||||
<xacro:caster prefix="right" reflect="1" material="white"/>
|
||||
<xacro:caster prefix="left" reflect="-1" material="white"/>
|
||||
|
||||
<joint name="imu_joint" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
@ -425,7 +290,6 @@
|
||||
</joint>
|
||||
<link name="imu_link"/>
|
||||
|
||||
<!-- laser scanner base link-->
|
||||
<link name="laser_scanner_base_link">
|
||||
<visual>
|
||||
<geometry>
|
||||
@ -442,21 +306,22 @@
|
||||
</collision>
|
||||
<xacro:cylinder_inertial mass="${laser_scanner_base_link_mass}"/>
|
||||
</link>
|
||||
|
||||
<joint name="base_link_to_laser_scanner_base_link" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="laser_scanner_base_link"/>
|
||||
<origin xyz="0 0 ${base_link_h*0.5}"/>
|
||||
</joint>
|
||||
|
||||
<gazebo reference="laser_scanner_base_link">
|
||||
<material>Gazebo/Blue</material>
|
||||
</gazebo>
|
||||
|
||||
<!-- laser scanner -->
|
||||
<link name="base_scan">
|
||||
<visual>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://turtlebot_3description/meshes/sensor/lds.stl" scale="0.001 0.001 0.001"/>
|
||||
<mesh filename="package://turtlebot3_description/meshes/sensors/lds.stl" scale="0.001 0.001 0.001"/>
|
||||
</geometry>
|
||||
<material name="black"/>
|
||||
</visual>
|
||||
@ -472,17 +337,19 @@
|
||||
<mass value="0.114" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
|
||||
iyy="0.001" iyz="0.0"
|
||||
izz="0.001" />
|
||||
iyy="0.001" iyz="0.0"
|
||||
izz="0.001" />
|
||||
</inertial>
|
||||
</link>
|
||||
</link>
|
||||
|
||||
<joint name="scan_joint" type="fixed">
|
||||
<parent link="laser_scanner_base_link"/>
|
||||
<child link="base_scan"/>
|
||||
<origin xyz="0 0 0.07" rpy="0 0 0"/>
|
||||
</joint>
|
||||
<gazebo reference="base_scan">
|
||||
<material>Gazebo/Black</material>
|
||||
</gazebo>
|
||||
<joint name="scan_joint" type="fixed">
|
||||
<parent link="laser_scanner_base_link"/>
|
||||
<child link="base_scan"/>
|
||||
<origin xyz="0 0 0.07" rpy="0 0 0"/>
|
||||
</joint>
|
||||
|
||||
<gazebo reference="base_scan">
|
||||
<material>Gazebo/Black</material>
|
||||
</gazebo>
|
||||
|
||||
</robot>
|
||||
Loading…
x
Reference in New Issue
Block a user