ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The origin must be inside the Visual tag, but i had it outside the tag and iterated the origin which didn't help. I added the origin tag inside visual tag as below and changed the origin to fix the issue.

    <?xml version="1.0"?>
    <robot name="myfirst" xmlns:xacro="http://www.ros.org/wiki/xacro">
      <link name="base_link">
        <visual>
          <geometry>
            <box size="0.5 0.5 0.5"/>
          </geometry>
        </visual>
      </link>

    <joint name="joint1" type="revolute">
     <axis xyz="0 1 0"/>
    <limit effort="1000.0" lower="-0.548" upper="0.548" velocity="0.5"/>
        <parent link="base_link"/>
        <child link="arm2"/>
        <origin xyz="0 0 0.5" rpy="0 0 0" />
      </joint>

    <link name="arm2">

        <visual>
<origin xyz="0 0 0.3" rpy="0 0 0" />
          <geometry>
            <cylinder length="0.6" radius="0.04"/>
          </geometry>
        </visual>
      </link>    
    </robot>