Robot manipulator starts spinning

asked 2021-10-10 07:52:54 -0600

vidu98 gravatar image

updated 2021-10-10 08:11:25 -0600

gvdhoorn gravatar image

I'm using O'Reilly's(programming robots with ROS) book as a reference to build a robot manipulator After I load the launch file manipulator starts spinning

below are my yaml and URDF files

yaml file

arm_controller:
  type: "position_controllers/JointTrajectoryController"
  publish_rate: 50
  joints:
    - hip
    - shoulder
    - elbow
    - wrist
gazebo_ros_control:
  pid_gains:
    hip: {p: 1.0, i: 0.0, d: 1.0}    
    shoulder: {p: 1.0, i: 0.0, d: 1.0}
    elbow: {p: 1.0, i: 0.0, d: 1.0}
    wrist: {p: 1.0, i: 0.0, d: 1.0}

URDF file

<?xml version="1.0"?>
<robot name="manipulator1">
  <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>
    <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>
    <collision>
      <geometry>
        <cylinder length="0.05" radius="0.1"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.025"/>
    </collision>
  </link>
  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
  </joint>
  <link name="torso">
    <visual>
      <geometry>
        <cylinder length="0.5" 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.25"/>
    </visual>
    <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>
    <collision>
      <geometry>
        <cylinder length="0.5" radius="0.05"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.25"/>
    </collision>
  </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.4" radius="0.05"/>
      </geometry>
      <material name="silver"/>
      <origin rpy="0 0 0" xyz="0 0 0.2"/>
    </visual>
    <inertial>
      <mass value="1.0"/>
      <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>
    <collision>
      <geometry>
        <cylinder length="0.4" radius="0.05"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.2"/>
    </collision>
  </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 ...
(more)
edit retag flag offensive close merge delete