Cant move a joint on a simple robot!

752 views
Skip to first unread message

Thiago Motta

unread,
Feb 3, 2014, 12:43:39 PM2/3/14
to moveit...@googlegroups.com
Hello everyone

My previous post was crashing my browser, so I had to create a new one. Sorry for that.

Ive been doing some simple tests with Moveit and a 2-joint robot (a RRbot) and so far Im able to move the base of the robot and the upper joint, but somehow Im not able to move the middle joint.
I followed this tutorial http://gazebosim.org/wiki/Tutorials/1.9/Using_A_URDF_In_Gazebo to test the robot, which works fine. I can also load the xacro file at MoveIt Setup Assitant and configure the robot just fine. The problem start at the generated file. No matter what configuration was chosen, I simply cant make the middle joint work.

What am I doing wrong?

Im annexing the file created by MoveIt Setup Assistant. The rest of the files used is at https://github.com/ros-simulation/gazebo_ros_demos.git
So far this is what Im doing with the Setup Assistant:
-Load xacro at  /home/adminubuntu/catkin_ws/src/gazebo_ros_demos/rrbot_description/urdf/rrbot.xacro
-Regenerate Default Collision Matrix
-Create a virtual_joint, with world as Child Link and odom_combonined as Parent Frame, with type planar.
-Created a Planning Group with joints [joint1-Revolute, join2-Revolute, fixed-Fixed], with kdl_kinematics_plugin/KDLKinematicsPlugin and default for the rest of the parameters.
-No Robot Pose
-Tried to create an End Effector for each one of the joints.
-No passive Joints.

Once the package is generated, I simply load it at Rviz.
The result of this, as described above, is an axis to manipulate the upper joint OR the base, but never the middle joint.

What configuration should I use to manipulate all joints?

rrbot_moveit.zip

Sachin Chitta

unread,
Feb 3, 2014, 1:02:34 PM2/3/14
to Thiago Motta, moveit-users
I don't have your URDF so its not clear what's going on but in your SRDF group the second joint is named "fixed". If your second joint is defined as a fixed joint in the urdf, it can't move.

Sachin

Thiago Motta

unread,
Feb 3, 2014, 1:14:35 PM2/3/14
to moveit...@googlegroups.com, Thiago Motta
Where did you see the second joint as fixed?

And this is the Xacro used:
<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- Constants for robot dimensions -->
  <xacro:property name="PI" value="3.1415926535897931"/>
  <xacro:property name="width" value="0.1" /> <!-- Square dimensions (widthxwidth) of beams -->
  <xacro:property name="height1" value="2" /> <!-- Link 1 -->
  <xacro:property name="height2" value="1" /> <!-- Link 2 -->
  <xacro:property name="height3" value="0.2" /> <!-- Link 3 -->
  <xacro:property name="camera_link" value="0.05" /> <!-- Size of square 'camera' box -->
  <xacro:property name="axel_offset" value="0.05" /> <!-- Space btw top of beam and the each joint -->

  <!-- Import all Gazebo-customization elements, including Gazebo colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/rrbot.gazebo" />
  <!-- Import Rviz colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/materials.xacro" />

  <!-- Base Link -->
  <link name="link1">
    <collision>
      <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height1}"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height1}"/>
      </geometry>
      <material name="orange"/>
    </visual>

    <inertial>
      <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
      <mass value="1"/>
      <inertia
      ixx="1.0" ixy="0.0" ixz="0.0"
      iyy="1.0" iyz="0.0"
      izz="1.0"/>
    </inertial>
  </link>

  <joint name="joint1" type="continuous">
    <parent link="link1"/>
    <child link="link2"/>
    <origin xyz="0 ${width} ${height1 - axel_offset}" rpy="0 0 0"/>
    <axis xyz="0 1 0"/>
    <dynamics damping="0.7"/>
  </joint>

  <!-- Middle Link -->
  <link name="link2">
    <collision>
      <origin xyz="0 0 ${height2/2 - axel_offset}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height2}"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 ${height2/2 - axel_offset}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height2}"/>
      </geometry>
      <material name="black"/>
    </visual>

    <inertial>
      <origin xyz="0 0 ${height2/2 - axel_offset}" rpy="0 0 0"/>
      <mass value="1"/>
      <inertia
      ixx="1.0" ixy="0.0" ixz="0.0"
      iyy="1.0" iyz="0.0"
      izz="1.0"/>
    </inertial>
  </link>

  <transmission name="tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="joint1"/>
    <actuator name="motor1">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

</robot>

Sachin Chitta

unread,
Feb 3, 2014, 1:19:42 PM2/3/14
to Thiago Motta, moveit-users
Your URDF has only a single joint defined - joint1. There are no other joints in your urdf.

Your SRDF file has a joint named "fixed" defined for the group:

  <group name="test2">
        <joint name="joint1" />
        <joint name="fixed" />
        <joint name="joint2" />
    </group>
 
Not sure where "fixed" and "joint2" are defined in your urdf.

Sachin


Thiago Motta

unread,
Feb 3, 2014, 1:33:44 PM2/3/14
to moveit...@googlegroups.com, Thiago Motta
Sorry, that was a test file..

The original file can be found at: https://github.com/ros-simulation/gazebo_ros_demos/tree/master/rrbot_description/urdf   Under the name of rrbot.xacro, but I tried to simplify by removing the camera and the laser.

The Xacro Im using atm is this one:


<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <!-- Constants for robot dimensions -->
  <xacro:property name="PI" value="3.1415926535897931"/>
  <xacro:property name="width" value="0.1" /> <!-- Square dimensions (widthxwidth) of beams -->
  <xacro:property name="height1" value="2" /> <!-- Link 1 -->
  <xacro:property name="height2" value="1" /> <!-- Link 2 -->
  <xacro:property name="height3" value="1" /> <!-- Link 3 -->

  <xacro:property name="camera_link" value="0.05" /> <!-- Size of square 'camera' box -->
  <xacro:property name="axel_offset" value="0.05" /> <!-- Space btw top of beam and the each joint -->

  <!-- Import all Gazebo-customization elements, including Gazebo colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/rrbot.gazebo" />
  <!-- Import Rviz colors -->
  <xacro:include filename="$(find rrbot_description)/urdf/materials.xacro" />

  <!-- Used for fixing robot to Gazebo 'base_link' -->
  <link name="world"/>

  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="link1"/>
  </joint>
  <joint name="joint2" type="continuous">
    <parent link="link2"/>
    <child link="link3"/>
    <origin xyz="0 ${width} ${height2 - axel_offset*2}" rpy="0 0 0"/>

    <axis xyz="0 1 0"/>
    <dynamics damping="0.7"/>
  </joint>

  <!-- Top Link -->
  <link name="link3">
    <collision>
      <origin xyz="0 0 ${height3/2 - axel_offset}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height3}"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 ${height3/2 - axel_offset}" rpy="0 0 0"/>
      <geometry>
    <box size="${width} ${width} ${height3}"/>

      </geometry>
      <material name="orange"/>
    </visual>

    <inertial>
      <origin xyz="0 0 ${height3/2 - axel_offset}" rpy="0 0 0"/>

      <mass value="1"/>
      <inertia
      ixx="1.0" ixy="0.0" ixz="0.0"
      iyy="1.0" iyz="0.0"
      izz="1.0"/>
    </inertial>
  </link>

  <transmission name="tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="joint1"/>
    <actuator name="motor1">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

  <transmission name="tran2">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="joint2"/>
    <actuator name="motor2">

      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

</robot>

Thiago Motta

unread,
Feb 3, 2014, 1:35:06 PM2/3/14
to moveit...@googlegroups.com, Thiago Motta
Fixed, if I got it right, should refer to the world_frame
Reply all
Reply to author
Forward
0 new messages