Problem with propellers rotating around middle of robot.

asked 2020-01-15 11:53:34 -0500

I am making a quadcopter and the propellers are rotating around the center of the robot. I am trying to get the propellers to be stationary and just rotate in place. I have added some pictures of before and during rotation to show the problem. Below is the code I am using. Any help would be appreciated.

image description

image description

<?xml version="1.0"?>

<robot name="drone">

<material name="magenta">
    <color rgba="1 .1 .85 1"/>
</material>

<link name="dummy">

</link>

<link name="base_link">
    <inertial>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <mass value="1" />
        <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
    </inertial>
    <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <box size="0.5 0.5 0.5"/>
        </geometry>
    </collision>
    <visual>
        <origin rpy="0.0 0 0" xyz="0 0 0"/>
        <geometry>
            <box size="0.2 0.2 0.1"/>
        </geometry>
        <material name="magenta"/>
    </visual>
</link>

<link name="propeller_M1_link">
    <inertial>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0422"/>
        <mass value="0.1" />
        <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
    </inertial>
    <collision>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0422"/>
        <geometry>
            <cylinder radius="0.06" length="0.0324"/>
        </geometry>
        <material name="magenta"/>
    </collision>
    <visual>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0422"/>
        <geometry>
            <cylinder radius="0.06" length="0.0324"/>
        </geometry>
        <material name="magenta"/>
    </visual>
</link>

<link name="arm_M1_link">
    <inertial>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <mass value="0.18" />
        <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
    </inertial>
    <collision>
        <origin rpy="0 0 0" xyz="0.175 0 0"/>
        <geometry>
            <box size="0.15 0.05 0.05"/>
        </geometry>
        <material name="magenta"/>
    </collision>
    <visual>
        <origin rpy="0 0 0" xyz="0.175 0 0"/>
        <geometry>
            <box size="0.15 0.05 0.05"/>
        </geometry>
        <material name="magenta"/>
    </visual>
</link>
 <link name="motor_M1_link">
    <inertial>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0255"/>
        <mass value="0.1" />
        <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
    </inertial>
    <collision>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0255"/>
        <geometry>
            <cylinder radius="0.006" length="0.001"/>
        </geometry>
        <material name="magenta"/>
    </collision>
    <visual>
        <origin rpy="0.0 0 0" xyz="0.25 0 0.0255"/>
        <geometry>
            <cylinder radius="0.006" length="0.001"/>
        </geometry>
        <material name="magenta"/>
    </visual>
</link>
<link name="propeller_M2_link">
    <inertial>
        <origin rpy="0 0 0" xyz="-0.25 0 0.0422"/>
        <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
        <mass value="0.1"/>
    </inertial>
    <collision>
        <origin rpy="0 0 0" xyz="-0.25 0 0.0422"/>
        <geometry>
            <cylinder radius="0.06" length="0.0324"/>
        </geometry>
        <material name="magenta"/>
    </collision>
    <visual ...
(more)
edit retag flag offensive close merge delete