Ask Your Question

shenhaobin's profile - activity

2012-10-18 21:47:41 -0500 received badge  Famous Question (source)
2012-10-18 21:47:41 -0500 received badge  Popular Question (source)
2012-10-18 21:47:41 -0500 received badge  Notable Question (source)
2012-08-25 01:26:07 -0500 received badge  Famous Question (source)
2012-08-25 01:26:07 -0500 received badge  Notable Question (source)
2012-08-15 17:12:23 -0500 received badge  Famous Question (source)
2012-04-06 03:17:34 -0500 received badge  Notable Question (source)
2012-03-06 02:43:05 -0500 received badge  Popular Question (source)
2011-11-28 23:57:51 -0500 received badge  Popular Question (source)
2011-09-16 09:07:57 -0500 marked best answer how to make a joint rotate a specified angle

The URDF simply describes the kinematic and dynamic properties of your robot mechanism. If you want to make a joint rotate a specific angle, you need to write a controller that commands the joint to do something. The controller will probably monitor the joint position, and command joint efforts or velocities. See the robot mechanism controllers wiki page for examples of controllers that run in the pr2 controller infrastructure.

2011-09-04 14:11:33 -0500 asked a question how to make a joint rotate a specified angle

Hello,everyone! I am a novice in gazebo. I want to simulate my robot arm in gazebo. Here is part of my urdf file.


<?xml version="1.0" ?>
<robot name="jixiebi">
    <link name="arm1">
        <visual>
            <geometry>
                <mesh filename="arm - arm1-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0.00039 -0.00037 0.0"/>
            <material name="arm1_color">
                <color rgba="0.752941 0.752941 0.752941 1"/>
            </material>
        </visual>
        <collision>
            <geometry>
                <mesh filename="arm - arm1-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0.00039 -0.00037 0.0"/>
        </collision>
        <inertial>
            <mass value="1.04075"/>
            <inertia ixx="0.004368" ixy="-0.00001" ixz="0.000002" iyy="0.004367" iyz="-0.000001" izz="0.002456"/>
            <origin rpy="0 0 0" xyz="0.000393 -0.000373 -0.074418"/>
        </inertial>
    </link>
    <joint name="arm1-arm2" type="continuous">
        <limit effort="1000.0" lower="-3.1415926" upper="3.1415926" velocity="0.5"/>
        <dynamics damping="0.0" friction="0.0"/>
        <parent link="arm1"/>
        <child link="arm2"/>
        <origin rpy="0 0 0" xyz="0 0 0.173"/>
        <axis xyz="0 0 1"/>
    </joint>
    <link name="arm2">
        <visual>
            <geometry>
                <mesh filename="arm - arm2-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <material name="arm2_color">
                <color rgba="0.752941 0.752941 0.752941 1"/>
            </material>
        </visual>
        <collision>
            <geometry>
                <mesh filename="arm - arm2-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0.0"/>
        </collision>
        <inertial>
            <mass value="1.26789"/>
            <inertia ixx="0.003947" ixy="-0.000001" ixz="-0.000617" iyy="0.006723" iyz="-0.000004" izz="0.005568"/>
            <origin rpy="0 0 0" xyz="-0.100667 0.000085 -0.013708"/>
        </inertial>
    </link>
    <joint name="arm2-arm3" type="continuous">
        <limit effort="1000.0" lower="-3.1415926" upper="3.1415926" velocity="0.5"/>
        <dynamics damping="0.0" friction="0.0"/>
        <parent link="arm2"/>
        <child link="arm3"/>
        <origin rpy="0 0 0" xyz="0.084 0 0.107"/>
        <axis xyz="1 0 0"/>
    </joint>
    <link name="arm3">
        <visual>
            <geometry>
                <mesh filename="arm - arm3-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <material name="arm3_color">
                <color rgba="0.752941 0.752941 0.752941 1"/>
            </material>
        </visual>
        <collision>
            <geometry>
                <mesh filename="arm - arm3-1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
        </collision>
        <inertial>
            <mass value="0.65756"/>
            <inertia ixx="0.002035" ixy="-0.000006" ixz="-0.000239" iyy="0.002506" iyz="-0" izz="0.001401"/>
            <origin rpy="0 0 0" xyz="0.156093 0.000249 0.270754"/>
        </inertial>
    </link>
    <gazebo reference="arm1">
        <material>Gazebo/White</material>
        <turnGravityOff>false</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo>
    <gazebo reference="arm1-arm2">
        <stopKd value="1.0"/>
        <stopKp value="1000000.0"/>
        <fudgeFactor value="0.5"/>
    </gazebo>
    <gazebo reference="arm2">
        <material>Gazebo/White</material>
        <turnGravityOff>true</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo> 
    <gazebo reference="arm2-arm3">
        <stopKd value="1.0"/>
        <stopKp value="1000000.0"/>
        <fudgeFactor value="0.5"/>
    </gazebo>
    <gazebo reference="arm3">
        <material>Gazebo/White</material>
        <turnGravityOff>true</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo>  
</robot>

I have a c++ program that can calculate the value of the angle to rotate when you specify a goal position. So my ... (more)

2011-09-01 04:05:48 -0500 marked best answer why my robot arm rotate by itself?

It's possible the dynamic damping is way too large. Try setting it to 0

    <dynamics damping="0.0" friction="0.0"/>

Given that the gravity effects are turned off, the arms should not move when you start up simulation.

Also, try setting <selfCollide> tags to false in case your collision geometries are in collision with each other

    <selfCollide>false</selfCollide>

Friction has no effect at this time.

2011-08-30 15:03:22 -0500 commented answer why my robot arm rotate by itself?
yes,it works. But now it has another problems. When I give the arm2-11 link a force, three links rotate in mid-air. I think this maybe cause by the gravity disable. So how to deal with the problem?
2011-08-29 20:15:45 -0500 commented answer why my robot arm rotate by itself?
But they must keep static in first running just like there is a friction between arm1-11 and arm2-11. So I went to know is there any label to achieve this effect. But the site on how to use controllers label is too simply. My email is hb.shen@siat.ac.cn. if necessary, I can send my stl files to you.
2011-08-29 20:09:39 -0500 commented answer why my robot arm rotate by itself?
hi, thanks for your replying! I have reviewed the web site which you linked above, but I still don't know how to solve this problem. My idea is very simple. I just went to arm2-11 rotate around arm1-11 when I give it a force.
2011-08-29 02:28:35 -0500 asked a question why my robot arm rotate by itself?

hi,everyone. I went to simulate my robot arm in gazebo.Here is my urdf file.


<robot name="jixiebi1">
  <link name="base_link">
    <visual>
      <geometry>
        <box size="1.5 1 0.2"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
      <material name="blue">
        <color rgba="0 0 .8 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="1.5 1 0.2"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
    </collision>
    <inertial>
      <mass value="200"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
    </inertial>
  </link>
  <joint name="base_link-arm1-11" type="fixed">
    <parent link="base_link"/>
    <child link="arm1-11"/>
    <origin rpy="0 0 0" xyz="0 0 0.2"/>
  </joint>
    <link name="arm1-11">
        <visual>
            <geometry>
                <mesh filename="arm - arm1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <material name="arm1-11_color">
                <color rgba="0.752941 0.752941 0.752941 1"/>
            </material>
        </visual>
        <collision>
            <geometry>
                <mesh filename="arm - arm1.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0"/>
        </collision>
        <inertial>
            <mass value="1.04075"/>
            <inertia ixx="0.004368" ixy="-0.00001" ixz="0.000002" iyy="0.004367" iyz="-0.000001" izz="0.002456"/>
            <origin rpy="0 0 0" xyz="0.000393 -0.000373 -0.074418"/>
        </inertial>
    </link>
    <joint name="arm1-11-arm2-11" type="continuous">
        <limit effort="1000.0" lower="-3.1415926" upper="3.1415926" velocity="0.5"/>
        <dynamics damping="1000.0" friction="1000.0"/>
        <parent link="arm1-11"/>
        <child link="arm2-11"/>
        <origin rpy="0 0 0" xyz="0 0 0.172"/>
        <axis xyz="0 0 1"/>
    </joint>
    <link name="arm2-11">
        <visual>
            <geometry>
                <mesh filename="arm - arm2.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0.0"/>
            <material name="arm2-11_color">
                <color rgba="0.752941 0.752941 0.752941 1"/>
            </material>
        </visual>
        <collision>
            <geometry>
                <mesh filename="arm - arm2.STL"/>
            </geometry>
            <origin rpy="0 0 0" xyz="0 0 0.0"/>
        </collision>
        <inertial>
            <mass value="1.26789"/>
            <inertia ixx="0.003947" ixy="-0.000001" ixz="-0.000617" iyy="0.006723" iyz="-0.000004" izz="0.005568"/>
            <origin rpy="0 0 0" xyz="-0.100667 0.000085 -0.013708"/>
        </inertial>
    </link>
    <gazebo reference="base_link">
        <material>Gazebo/GrassFloor</material>
        <turnGravityOff>false</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo>
    <gazebo reference="arm1-11">
        <mu1>100</mu1>
        <mu2>100</mu2>
        <material>Gazebo/White</material>
        <turnGravityOff>true</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo>
    <gazebo reference="arm2-11">
        <mu1>100</mu1>
        <mu2>100</mu2>
        <material>Gazebo/White</material>
        <turnGravityOff>true</turnGravityOff>
        <selfCollide>true</selfCollide>
    </gazebo>
</robot>

When I ran the urdf file, I found the arm2-11 link turn around arm1-11 link. I went to know is there any way to make the arm2-11 link static in begin running.

2011-08-09 19:44:13 -0500 commented answer Converting SolidWorks stuff to URDF. STL and Meshlab problems
hi! Have you resolved the problems? I also encounter this problem today and can't find any way to figure out.
2011-08-09 11:09:16 -0500 marked best answer Why import my own robot model goes to mess?

simmechanics_to_urdf is desiged to save a lot of work when creating a URDF file for a complex robot, but it does not do everything. Definitely check out this tutorial. Also, before moving into gazebo, I would ensure that your model looks right and moves correctly in rviz first.

2011-08-05 13:25:43 -0500 commented answer Why import my own robot model goes to mess?
how to import my model to the rviz? And if the model would not look right in rviz, how to correct it?
2011-08-05 02:24:25 -0500 received badge  Student (source)
2011-08-03 21:56:29 -0500 received badge  Editor (source)
2011-08-03 21:55:52 -0500 asked a question Why import my own robot model goes to mess?

I want to create my own robot model and simulate that with C or C++ code through gazebo. First I create my own robot model by Solidwork software and export the model to xml and STl files by using the plug-in SimMechanics Link. Then I transformed urdf fil from the xml file by the simmechanics_to_urdf packet. my code likes below:

rosrun simmechanics_to_urdf convert.py jixiebi.xml xml > jixiebi.urdf

After that, I copy all of the STL files to the catalog of /simulator_gazebo/gazebo_worlds/Media/models. Finally,I run the below code

rosrun gazebo spawn_model -file `pwd`/jixiebi.urdf -urdf -z 1 -model my_jixiebi

and now I can see my model. But the model goes to mess. I guess it's the coordinate error, but I don't know how to deal with. I know the urdf has origin tag but I find it's very difficult to fix all link's and joint's coordinate correctly. What's worse, my model has hundreds of links and joints. So, here is my questions.

  1. Is there any wrongs in my process?
  2. How to deal with my problem?
  3. If the mess model problem could figure out, the next step is how to do?

Thanks a lot and look forward to your answer.