Error in the myrobot file.xacro [closed]

asked 2014-04-21 12:40:41 -0500

Eman gravatar image

updated 2014-04-21 23:58:12 -0500

  • I tried to make a model for 6 wheeled robot.
  • I modified a 4 wheeled robot.xacro file,but when I tried to launch this model on Gazebo,I found the wheels of the robot are separated from the base of the robot.
  • This is the .xacro file :-

<?xml version="1.0"?>


        <robot xmlns:xacro="http://www.ros.org/wiki/xacro" 
                   xmlns:sensor="http://playerstage.sourceforge.net/gazebo /xmlschema/#sensor"
                xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
                xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"

    name="robot1_xacro">
        <include filename="$(find erratic_description)/urdf/erratic_hokuyo_laser.xacro" />

            <!-- BASE LASER ATTACHMENT -->
            <erratic_hokuyo_laser parent="base_link">
                    <origin xyz="0.18 0 0.11" rpy="0 0 0" />
            </erratic_hokuyo_laser>

        <xacro:property name="length_wheel" value="0.05" />
        <xacro:property name="radius_wheel" value="0.05" />
        <xacro:macro name="default_inertial" params="mass">
                   <inertial>
                           <mass value="${mass}" />
                           <inertia ixx="1.0" ixy="0.0" ixz="0.0"
                                    iyy="1.0" iyz="0.0"
                                    izz="1.0" />
                   </inertial>
        </xacro:macro>

        <link name="base_footprint">
            <visual>
                <geometry>
                        <box size="0.001 0.001 0.001"/>
                    </geometry>
                <origin rpy="0 0 0" xyz="0 0 0"/>
            </visual>
            <xacro:default_inertial mass="0.0001"/>
        </link>

        <gazebo reference="base_footprint">
            <material>Gazebo/Green</material>
            <turnGravityOff>false</turnGravityOff>
        </gazebo>

        <joint name="base_footprint_joint" type="fixed">
            <origin xyz="0 0 0" />
            <parent link="base_footprint" />
            <child link="base_link" />
        </joint>


        <link name="base_link">
            <visual>
                <geometry>
                        <box size="0.22 0.380 0.085"/>
                    </geometry>
                <origin rpy="0 0 0" xyz="0 0 0.05"/>
                <material name="blue">
                    <color rgba="0 0 .8 1"/>
                </material>
            </visual>
            <collision>
                <geometry>
                        <box size="0.22 0.380 0.085"/>
                </geometry>
            </collision>
            <xacro:default_inertial mass="10"/>
        </link>

        <link name="right_wheel_1">
            <visual>
                    <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                    </geometry>
                <!-- <origin rpy="0 1.57075 0" xyz="-0.085 0.15 -0.25"/> -->
                <origin rpy="0 1.57075 0" xyz="-0.085 0.15 -0.25"/>
                <material name="black">
                    <color rgba="0 0 0 1"/>
                </material>
            </visual>
            <collision>
                <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                </geometry>
            </collision>
            <xacro:default_inertial mass="1"/>
        </link>

        <link name="right_wheel_2">
            <visual>
                    <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                    </geometry>
                <!-- <origin rpy="0 1.57075 0" xyz="-0.085 0 -0.25"/> -->
                <origin rpy="0 1.57075 0" xyz="-0.085 0 -0.25"/>
                <material name="black"/>
            </visual>
            <collision>
                <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                </geometry>
            </collision>
            <xacro:default_inertial mass="1"/>

        </link>

        <link name="right_wheel_3">
            <visual>
                    <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                    </geometry>
                <!-- <origin rpy="0 1.57075 0" xyz="-0.085 -0.15 -0.25"/> -->

                <origin rpy="0 1.57075 0" xyz="-0.085 -0.15 -0.25"/>
                <material name="black"/>
            </visual>
            <collision>
                <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                </geometry>
            </collision>
            <xacro:default_inertial mass="1"/>
        </link>

        <link name="left_wheel_1">
            <visual>
                    <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                    </geometry>
            <!--    <origin rpy="0 1.57075 0" xyz="-0.355 0.15 -0.25"/> -->
                <origin rpy="0 1.57075 0" xyz="-0.355 0.15 -0.25" />
                <material name="black"/>
            </visual>
            <collision>
                <geometry>
                        <cylinder length="${length_wheel}" radius="${radius_wheel}"/>
                </geometry>
            </collision>
            <xacro:default_inertial mass="1"/>

        </link>

           <link name="left_wheel_2">
            <visual ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Eman
close date 2014-04-28 21:50:17