Home | Tutorials | Wiki | Issues
Ask Your Question
0

I am simulating a robot arm, at the end of which a freely moving cylinder is supposed to be attached.

asked 2016-05-24 11:06:37 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to simulate, a robotic arm, which is controlled by the arm_controller , this robotic arm is similar to the chapter 18 of the Programming Robots with Ros book.

The problem is I wanted the link at the end (hand) to act freely due to gravity and it does not act freely, instead its position keeps fixed relative to the link it is attached with.

I have removed the transmittion information for this hand in the URDF file and also from the controllers.YAML

controllers.YAML is below

arm_controller:
  type: "position_controllers/JointTrajectoryController"
  joints:
    - hip
    - shoulder
    - elbow

Following is my URDF file

<?xml version="1.0"?>
<robot name="cougarbot">
  <link name="world"/>
  <link name="base_link">
    <visual>
      <geometry>
        <cylinder length="0.05" radius="0.1"/>
      </geometry>
      <material name="silver">
        <color rgba="0.75 0.75 0.75 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.025"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.05" radius="0.1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.025"/>
    </collision>
    <inertial>
      <mass value="1.0"/>
      <origin rpy="0 0 0" xyz="0 0 0.025"/>
      <inertia ixx="0.0027" iyy="0.0027" izz="0.005" ixy="0" ixz="0" iyz="0"/>
    </inertial>
  </link>
  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
  </joint>
  <link name="torso">
    <visual>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <material name="silver">
        <color rgba="0.75 0.75 0.75 1"/>
      </material>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </collision>
    <inertial>
      <mass value="1.0"/>
      <origin rpy="0 0 0" xyz="0 0 0.25"/>
      <inertia ixx="0.02146" iyy="0.02146" izz="0.00125" ixy="0" ixz="0" iyz="0"/>
    </inertial>
  </link>
  <joint name="hip" type="continuous">
    <axis xyz="0 0 1"/>
    <parent link="base_link"/>
    <child link="torso"/>
    <origin rpy="0 0 0" xyz="0.0 0.0 0.05"/>
  </joint>
  <link name="upper_arm">
    <visual>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <material name="silver"/>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </collision>
    <inertial>
      <mass value="0.2"/>
      <origin rpy="0 0 0" xyz="0 0 0.2"/>
      <inertia ixx="0.01396" iyy="0.01396" izz="0.00125" ixy="0" ixz="0" iyz="0"/>
    </inertial>
  </link>
  <joint name="shoulder" type="continuous">
    <axis xyz="0 1 0"/>
    <parent link="torso"/>
    <child link="upper_arm"/>
    <origin rpy="0 1.5708 0" xyz="0.0 -0.1 0.15"/>
  </joint>
  <link name="lower_arm">
    <visual>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <material name="silver"/>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.2" radius="0.05"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </collision>
    <inertial>
      <mass value="0.2"/>
      <origin ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-24 16:14:38 -0500

chapulina gravatar image

When simulating your arm in Gazebo, the wrist joint connecting the lower arm to the hand is acting as a constraint on the movement, only allowing it to rotate in one axis (Y axis). It sounds like you would like a "ball joint" behavior, which is a constraint on all translation DOF, but all the rotation DOF can rotate freely.

URDF doesn't seem to support ball joints. You could try to fake it by adding more joints and pseudo-links as mentioned here.

edit flag offensive delete link more

Comments

Thank you so much for responding so early and so quickly. I really appreciate that. But even when we have one degree freedom, it should fall down to the ground by rotating on this axis. There might be some other problem?

Abdullah gravatar imageAbdullah ( 2016-05-24 16:38:28 -0500 )edit

Oh ok sorry, then I completely misinterpreted what you were saying. What version of Gazebo are you using?

chapulina gravatar imagechapulina ( 2016-05-24 16:41:49 -0500 )edit

Continuous joints are revolute joints without limits. Perhaps you are looking for behaviors of a prismatic joint?

hsu gravatar imagehsu ( 2016-05-24 16:48:53 -0500 )edit

I recently installed Gazebo, and I do not know the version. I really appreciate your interest.

Abdullah gravatar imageAbdullah ( 2016-05-24 16:50:25 -0500 )edit

Dear Hsu, Thank you so much for the help, the thing is , the problem is not about the degree of freedoms, there is one degree of freedom and its ok, and it can rotate around y-axis. The problem is that the link hand is not falling down because of gravity. Is it because I am using position based control?

Abdullah gravatar imageAbdullah ( 2016-05-24 16:52:23 -0500 )edit

Yes, the position based control (e.g. https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L300) will negate dynamics (i.e. ignore gravity or external forces)

hsu gravatar imagehsu ( 2016-05-25 18:38:49 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-24 11:06:37 -0500

Seen: 1,747 times

Last updated: May 24 '16