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 ...