Gazebo | Ignition | Community
Ask Your Question

Robot won't move diff drive nor arm

asked 2017-02-15 03:52:35 -0500

der.sonic gravatar image

ROS Kinetic, Gazebo 7.0, Ubuntu 16.04

We have a custom designed mobile platform with 2 differential drive wheels, 4 caster wheels, and 6 DOF arm on top of that base. After running the launch file, gazebo is loaded without any errors, saying that all required plugins and controllers were loaded, all topics are published. When I send manual Twist to base or Position to arm, nothing moves. Although there is a constant slight drift in mobile base position (probably due to wrongly specified friction parameters). I'll provide snippets from various files I am using.
In robot urdf file I have things like this: Wheel joint

  <joint name="Cassis_Left_wheel" type="continuous">
    <parent link="Cassis"/>
    <child link="Left_wheel"/>
    <origin rpy="3.14159 0 1.57079" xyz="-3.84092 4.53357 0.0975"/>
    <axis xyz="1 0 0"/>
    <limit effort="1.0" lower="0.0" upper="0.0" velocity="0.0"/>

Arm joint

  <joint name="Cassis_M_link1" type="revolute">
    <parent link="Cassis"/>
    <child link="M_link1"/>
    <origin rpy="3.14159 0 1.57079" xyz="-3.41592 4.16774 0.93378"/>
    <axis xyz="0 0 1"/>
    <limit effort="1.0" lower="-3.14" upper="3.14" velocity="0.0"/>

Wheel transmission

  <transmission name="Cassis_Left_wheel_trans">
    <joint name="Cassis_Left_wheel">
    <actuator name="motor_left">

Arm joint transmission

  <transmission name="Cassis_M_link1">
    <joint name="Cassis_M_link1">
    <actuator name="base_motor">

Gazebo control plugin

    <plugin name="gazebo_ros_control" filename="">
        <!-- <robotNamespace>/telega</robotNamespace> -->

My launch file is this

    <!-- Load the Telega sdf model into parameter server -->
    <param name="robot_description" textfile="$(find telega_description)/sdf/Mobile_platform.urdf" />
    <rosparam command="load" file="$(find telega_pkg)/src/robot_parameters.yaml" />
    <!-- Turn on joint state publisher gui control -->
    <param name="use_gui" value="True" />

    <!-- Start Gazebo with an empty world -->
    <!-- Defines Rviz custom config file for telega -->
    <arg name="rvizconfig" default="$(find telega_pkg)/src/telega.rviz" />
    <include file="$(find gazebo_ros)/launch/empty_world.launch" />

    <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

    <!-- Spawn a Telega in Gazebo, taking the description from the parameter server -->
    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
          args="-param robot_description -urdf -model Mobile_platform" />
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />

And finally my robot_parameters.yaml file

  type: "joint_state_controller/JointStateController"
  publish_rate: 50  

  type: "position_controllers/JointPositionController"
  joint: "Cassis_M_link1" 
  pid: {p: 100.0, i: 0.01, d: 10.0}

  type: "position_controllers/JointPositionController"
  joint: "M_link1_M_link2"
  pid: {p: 100.0, i: 0.01, d: 10.0}

  type: "position_controllers/JointPositionController"
  joint: "M_link2_M_link3"
  pid: {p: 100.0, i: 0.01, d: 10.0}

  type: "position_controllers/JointPositionController"
  joint: "M_link3_M_link4"
  pid: {p: 100.0, i: 0.01, d: 10.0}

  type: "position_controllers/JointPositionController"
  joint: "M_link4_M_link5"
  pid: {p: 100.0, i: 0.01, d: 10.0}

wrist3_position_controller ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-15 13:07:30 -0500

nkoenig gravatar image

I can offer some debugging tips.

  1. Are you sure your joints are correctly specified? You can visualize joints in the Gazebo GUI.
  2. Similarly, are the collision and inertia elements correct? You can also visualize these in Gazebo.
  3. Can you move the joints using Gazebo graphical joint controller (pull out panel on the right side of the GUI)?

If everything looks good up to this point, then I would assume something is wrong with the ros control parameters.

edit flag offensive delete link more


The problem was in joint's effort and velocity variables, they were too low. I've change them for all joints to be 100 and 10, and now I can move every joint by publishing on the corresponding topics. Second problem was because joint_state_controller publishes states only for joints that have transmission and hardware interface tags. Adding that to caster wheel joints fixes the problem. Small side note, transmission tags are not necessary when you run separate joint state publisher node.

der.sonic gravatar imageder.sonic ( 2017-02-15 22:49:30 -0500 )edit

Question Tools

1 follower


Asked: 2017-02-15 03:52:35 -0500

Seen: 2,769 times

Last updated: Feb 15 '17