Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" ?>
- <!-- =================================================================================== -->
- <!-- | This document was autogenerated by xacro from diff_wheeled_robot.xacro | -->
- <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
- <!-- =================================================================================== -->
- <robot name="differential_wheeled_robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
- <!-- Wheels -->
- <!-- in kg-->
- <!-- Defining the colors used in this robot -->
- <material name="Black">
- <color rgba="0.0 0.0 0.0 1.0"/>
- </material>
- <material name="Red">
- <color rgba="0.8 0.0 0.0 1.0"/>
- </material>
- <material name="White">
- <color rgba="1.0 1.0 1.0 1.0"/>
- </material>
- <material name="Blue">
- <color rgba="0.0 0.0 0.8 1.0"/>
- </material>
- <!-- PROPERTY LIST -->
- <!--All units in m-kg-s-radians unit system -->
- <!-- Main body radius and height -->
- <!-- Main Body Cylinder base -->
- <!-- in kg-->
- <!-- caster wheel radius and height -->
- <!-- caster wheel mass -->
- <!-- in kg-->
- <!-- caster wheel radius and height -->
- <!-- caster wheel mass -->
- <!-- in kg-->
- <!-- Wheels -->
- -->
- <!-- in kg-->
- <!-- Hokuyo Laser scanner -->
- <!-- Macro for calculating inertia of cylinder -->
- <!-- BASE-FOOTPRINT -->
- <!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin -->
- <link name="base_footprint">
- <inertial>
- <mass value="0.0001"/>
- <origin xyz="0 0 0"/>
- <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
- </inertial>
- <visual>
- <origin rpy="0 0 0" xyz="0 0 0"/>
- <geometry>
- <box size="0.001 0.001 0.001"/>
- </geometry>
- </visual>
- </link>
- <gazebo reference="base_footprint">
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <joint name="base_footprint_joint" type="fixed">
- <origin rpy="0 0 0" xyz="0 0 0.04"/>
- <parent link="base_footprint"/>
- <child link="base_link"/>
- </joint>
- <!-- BASE-LINK -->
- <!--Actual body/chassis of the robot-->
- <link name="base_link">
- <inertial>
- <mass value="5"/>
- <origin xyz="0 0 0"/>
- <!--The 3x3 rotational inertia matrix. -->
- <inertia ixx="0.0282916666667" ixy="0" ixz="0" iyy="0.0282916666667" iyz="0" izz="0.05625"/>
- </inertial>
- <visual>
- <origin rpy="0 0 0" xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.15"/>
- </geometry>
- <material name="White"/>
- </visual>
- <collision>
- <origin rpy="0 0 0 " xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.15"/>
- </geometry>
- </collision>
- </link>
- <gazebo reference="base_link">
- <material>Gazebo/White</material>
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <!--fb : front, back ; lr: left, right -->
- <link name="front_right_wheel">
- <visual>
- <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.04"/>
- </geometry>
- <material name="Black"/>
- </visual>
- <collision>
- <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.04"/>
- </geometry>
- </collision>
- <inertial>
- <mass value="2.5"/>
- <origin xyz="0 0 0"/>
- <inertia ixx="0.00108333333333" ixy="0" ixz="0" iyy="0.00108333333333" iyz="0" izz="0.002"/>
- </inertial>
- </link>
- <gazebo reference="front_right_wheel">
- <mu1 value="1.0"/>
- <mu2 value="1.0"/>
- <kp value="10000000.0"/>
- <kd value="1.0"/>
- <fdir1 value="1 0 0"/>
- <material>Gazebo/Grey</material>
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <joint name="front_right_wheel_joint" type="continuous">
- <parent link="base_link"/>
- <child link="front_right_wheel"/>
- <origin rpy="0 0 0" xyz="0.0 0.15 0.0"/>
- <axis rpy="0 0" xyz="0 1 0"/>
- <limit effort="100" velocity="100"/>
- <joint_properties damping="0.0" friction="0.0"/>
- </joint>
- <!-- Transmission is important to link the joints and the controller -->
- <transmission name="front_right_wheel_joint_trans">
- <type>transmission_interface/SimpleTransmission</type>
- <joint name="front_right_wheel_joint"/>
- <actuator name="front_right_wheel_joint_motor">
- <hardwareInterface>EffortJointInterface</hardwareInterface>
- <mechanicalReduction>1</mechanicalReduction>
- </actuator>
- </transmission>
- <!--fb : front, back ; lr: left, right -->
- <link name="front_left_wheel">
- <visual>
- <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.04"/>
- </geometry>
- <material name="Black"/>
- </visual>
- <collision>
- <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
- <geometry>
- <cylinder length="0.02" radius="0.04"/>
- </geometry>
- </collision>
- <inertial>
- <mass value="2.5"/>
- <origin xyz="0 0 0"/>
- <inertia ixx="0.00108333333333" ixy="0" ixz="0" iyy="0.00108333333333" iyz="0" izz="0.002"/>
- </inertial>
- </link>
- <gazebo reference="front_left_wheel">
- <mu1 value="1.0"/>
- <mu2 value="1.0"/>
- <kp value="10000000.0"/>
- <kd value="1.0"/>
- <fdir1 value="1 0 0"/>
- <material>Gazebo/Grey</material>
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <joint name="front_left_wheel_joint" type="continuous">
- <parent link="base_link"/>
- <child link="front_left_wheel"/>
- <origin rpy="0 0 0" xyz="0.0 -0.15 0.0"/>
- <axis rpy="0 0" xyz="0 1 0"/>
- <limit effort="100" velocity="100"/>
- <joint_properties damping="0.0" friction="0.0"/>
- </joint>
- <!-- Transmission is important to link the joints and the controller -->
- <transmission name="front_left_wheel_joint_trans">
- <type>transmission_interface/SimpleTransmission</type>
- <joint name="front_left_wheel_joint"/>
- <actuator name="front_left_wheel_joint_motor">
- <hardwareInterface>EffortJointInterface</hardwareInterface>
- <mechanicalReduction>1</mechanicalReduction>
- </actuator>
- </transmission>
- <!--Caster front -->
- <link name="caster_front_link">
- <visual>
- <origin rpy="1.57079632679 0 0" xyz="0 0.02 0"/>
- <geometry>
- <sphere radius="0.025"/>
- </geometry>
- <material name="Black"/>
- </visual>
- <collision>
- <geometry>
- <sphere radius="0.025"/>
- </geometry>
- <origin rpy="1.57079632679 0 0" xyz="0 0.02 0"/>
- </collision>
- <inertial>
- <mass value="0.5"/>
- <origin xyz="0 0 0"/>
- <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
- </inertial>
- </link>
- <joint name="caster_front_joint" type="fixed">
- <parent link="base_link"/>
- <child link="caster_front_link"/>
- <origin rpy="-1.57079632679 0 0" xyz="0.115 0.0 0.007"/>
- </joint>
- <gazebo reference="caster_front_link">
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <!--Caster back -->
- <link name="caster_back_link">
- <visual>
- <origin rpy="1.57079632679 0 0" xyz="0.02 0.02 0 "/>
- <geometry>
- <sphere radius="0.025"/>
- </geometry>
- <material name="Black"/>
- </visual>
- <collision>
- <geometry>
- <sphere radius="0.025"/>
- </geometry>
- <origin rpy="1.57079632679 0 0" xyz="0 0.02 0 "/>
- </collision>
- <inertial>
- <mass value="0.5"/>
- <origin xyz="0 0 0"/>
- <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
- </inertial>
- </link>
- <joint name="caster_back_joint" type="fixed">
- <parent link="base_link"/>
- <child link="caster_back_link"/>
- <origin rpy="-1.57079632679 0 0" xyz="-0.135 0.0 0.009"/>
- </joint>
- <gazebo reference="caster_back_link">
- <turnGravityOff>false</turnGravityOff>
- </gazebo>
- <!-- SENSORS -->
- <!-- hokuyo -->
- <link name="hokuyo_link">
- <visual>
- <origin rpy="0 0 0" xyz="0 0 0"/>
- <geometry>
- <box size="0.05 0.05 0.05"/>
- </geometry>
- <material name="Blue"/>
- </visual>
- </link>
- <joint name="hokuyo_joint" type="fixed">
- <origin rpy="0 0 0" xyz="0.125 0 0.0325"/>
- <parent link="base_link"/>
- <child link="hokuyo_link"/>
- </joint>
- <gazebo reference="hokuyo_link">
- <material>Gazebo/Blue</material>
- <turnGravityOff>false</turnGravityOff>
- <sensor name="head_hokuyo_sensor" type="ray">
- <pose>0.025 0 0 0 0 0</pose>
- <visualize>false</visualize>
- <update_rate>40</update_rate>
- <ray>
- <scan>
- <horizontal>
- <samples>720</samples>
- <resolution>1</resolution>
- <min_angle>-1.570796</min_angle>
- <max_angle>1.570796</max_angle>
- </horizontal>
- </scan>
- <range>
- <min>0.10</min>
- <max>10.0</max>
- <resolution>0.001</resolution>
- </range>
- </ray>
- <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_head_hokuyo_controller">
- <topicName>/scan</topicName>
- <frameName>hokuyo_link</frameName>
- </plugin>
- </sensor>
- </gazebo>
- <!-- Differential drive controller -->
- <gazebo>
- <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller_front">
- <rosDebugLevel>Debug</rosDebugLevel>
- <publishWheelTF>True</publishWheelTF>
- <publishTf>1</publishTf>
- <publishWheelJointState>true</publishWheelJointState>
- <alwaysOn>true</alwaysOn>
- <updateRate>100.0</updateRate>
- <leftJoint>front_left_wheel_joint</leftJoint>
- <rightJoint>front_right_wheel_joint</rightJoint>
- <wheelSeparation>0.3</wheelSeparation>
- <wheelDiameter>0.08</wheelDiameter>
- <broadcastTF>1</broadcastTF>
- <wheelTorque>30</wheelTorque>
- <wheelAcceleration>1.8</wheelAcceleration>
- <commandTopic>cmd_vel</commandTopic>
- <odometryFrame>odom</odometryFrame>
- <odometryTopic>odom</odometryTopic>
- <robotBaseFrame>base_link</robotBaseFrame>
- </plugin>
- </gazebo>
- <!--
- <gazebo>
- <plugin name="kobuki_controller" filename="libgazebo_ros_kobuki.so">
- <publish_tf>1</publish_tf>
- <left_wheel_joint_name>front_left_wheel_joint</left_wheel_joint_name>
- <right_wheel_joint_name>front_right_wheel_joint</right_wheel_joint_name>
- <wheel_separation>.30</wheel_separation>
- <wheel_diameter>0.08</wheel_diameter>
- <torque>30.0</torque>
- <velocity_command_timeout>0.6</velocity_command_timeout>
- </plugin>
- </gazebo>
- -->
- <!--
- <gazebo>
- <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so" />
- <plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state_publisher">
- <jointName>front_right_wheel_joint, front_left_wheel_joint</jointName>
- <updateRate>10.0</updateRate>
- <alwaysOn>true</alwaysOn>
- </plugin>
- </gazebo>
- -->
- </robot>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement