Free moving joint

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
pedro
Posts: 3
Joined: Wed Jun 05, 2019 7:09 pm

Free moving joint

Post by pedro » Wed Jun 05, 2019 7:40 pm

How can I create a robot with free moving joints?

I am implementing a robot with a rope attached to the base. In the file description, instead of making it a soft body, I am trying to create several rigid bodies attached to each other in order to save some processing time. However, regardless of the joint type that I specify, the rope is rock solid.

Here is a snippet of the urdf

Code: Select all

  <link name="base_link">
    <inertial>
      <mass value="0.5"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="0.0023" ixy="0.0" ixz="0.0" iyy="0.0023" iyz="0.0" izz="0.004"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="base.obj" scale=".1 .1 .1"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <cylinder radius=".3" length=".3"/>
      </geometry>
    </collision>
  </link>
  <link name="rope">
    <visual>
      <geometry>
        <cylinder length="0.3" radius="0.01"/>
      </geometry>
      <origin xyz="0 0 -0.15"/>
      <material name="red">
        <color rgba="0 0 .8 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.3" radius="0.01"/>
      </geometry>
      <origin xyz="0 0 -0.15"/>
    </collision>
    <inertial>
      <mass value="0.05"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>
  <link name="rope2">
    <visual>
      <geometry>
        <cylinder length="0.3" radius="0.01"/>
      </geometry>
      <origin xyz="0 0 -0.45"/>
      <material name="red">
        <color rgba="0.8 0 0 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.3" radius="0.01"/>
      </geometry>
      <origin xyz="0 0 -0.45"/>
    </collision>
    <inertial>
      <mass value="0.05"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>
  <joint name="base_to_rope" type="floating">
    <axis xyz="1 0 0"/>
    <origin xyz="0.0 0.0 0.0"/>
    <parent link="base_link"/>
    <child link="rope"/>
    <dynamics damping="0.0001" friction="0.0001"/>
    <limit effort="200.0" lower="-30" upper="30" velocity="10"/>
  </joint>
  <joint name="rope_to_rope" type="floating">
    <axis xyz="1 0 0"/>
    <origin xyz="0.0 0.0 0.0"/>
    <parent link="rope"/>
    <child link="rope2"/>
    <dynamics damping="0.0001" friction="0.0001"/>
    <limit effort="1.0" lower="-30" upper="30" velocity="10"/>
  </joint>

usamarafiq93
Posts: 4
Joined: Mon Jun 10, 2019 3:46 pm

Re: Free moving joint

Post by usamarafiq93 » Mon Jun 10, 2019 8:37 pm

Hey,
How are you accessing joint configuration from URDF file. I am new to this and I am trying to make my base joint static. This base joint is obtained from URDF.

Thank you.

pedro
Posts: 3
Joined: Wed Jun 05, 2019 7:09 pm

Re: Free moving joint

Post by pedro » Wed Jun 12, 2019 6:48 pm

usamarafiq93 wrote:
Mon Jun 10, 2019 8:37 pm
Hey,
How are you accessing joint configuration from URDF file. I am new to this and I am trying to make my base joint static. This base joint is obtained from URDF.

Thank you.
A joint is a connection between two links. If you mean that you want the connection of any two links to be static (no movement), you can use the type "fixed" in the URDF.

pedro
Posts: 3
Joined: Wed Jun 05, 2019 7:09 pm

Re: Free moving joint

Post by pedro » Wed Jun 12, 2019 8:04 pm

I got it to work through the python script instead of the URDF file. Creating new joints of the type point2point between the tiny rigid rope pieces using createConstraints got the job done! ;)

Post Reply