differential drive gazebo ros plugin not working

asked 2016-09-05 16:54:53 -0500

Mahmoud Abdul Galil gravatar image

updated 2016-09-05 20:16:41 -0500

Hello, i'm trying to build a simulation situation in which a mobile differential drive robot is controlled via keyboard input to terminal. So far i managed to get the keyboard input up and running. The issue i'm facing is:

1) When spawned, the robot starts to move very slowly even when there's absolutely nothing affecting it 2) The differential drive gazebo ros plugin doesn't seem to be working. because after doing the keyboard command mapping, and publishing the Twist message to the topic which gazebo subscribes too, the robot doesn't respond to the commands given, even though, echoing the velocity command topic and odometry topic too show that the commands are being published on the topic and gazebo publishes odometry on the odom topic. Any idea how can that be solved? Here's a snap shot of my launch files and my config and files:

<launch>
<include file="$(find catbot)/launch/gazebo.launch" />
<rosparam file="$(find catbot)/config/catbot_gazebo_control.yaml" command="load"/>
    <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="catbot" args="joint_state_controller" />
</launch>

<launch>
<include file="$(find gazebo_ros)/launch/empty_world.launch" />
<include file="$(find catbot)/launch/display.launch" />
    <node    name="teleop_node" pkg="catbot_control" type="teleop_node"/>
<node    name="tf_footprint_base" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 base_link base_footprint 40" />
    <node    name="spawn_model" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model catbot" output="screen" />
<node    name="fake_joint_calibration" pkg="rostopic" type="rostopic" args="pub /calibrated std_msgs/Bool true" />
</launch>



<launch>
<arg   name="gui" default="False" />
    <param name="robot_description" textfile="$(find catbot)/robots/catbot.URDF"/>
<param name="use_gui" value="true" />
<node  name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
    <node  name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
        <remap from="/joint_states" to="/catbot/joint_states" />
    </node>
<node  name="rviz" pkg="rviz" type="rviz"/>
</launch>

<robot name="catbot">
<!-- This is a fictitious link, falling right below the center of mass of the robot, and acting as a projection of it on the ground.-->
<link name="base_footprint">
  <inertial>
    <mass value="0.0001"/>
    <origin xyz="0 0 0"/>
    <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
  </inertial>
</link>
<!-- Joint to connect the fictitious link to the actual chassis of the robot -->
<joint name="base_footprint_joint" type="fixed">
  <origin rpy="0 0 0" xyz="0 0 0.125"/>
  <parent link="base_footprint"/>
  <child link="base_link"/>
</joint>
<!-- Actual chassis link of the robot -->
<link name="base_link">
    <inertial>
    <origin
        xyz="-2.0362378638783E-07 0.00916548387168221 -0.0237685771373355"
        rpy="0 0 0" />
    <mass
        value="3" />
    <inertia
        ixx="0.0344425345253922"
        ixy="0"
        ixz="0"
        iyy="0.0252767714510505"
        iyz="-0.00237163573657069"
        izz="0.0487445676935793" />
    </inertial>
    <visual>
    <origin
        xyz="0 0 0"
        rpy="0 0 0" />
    <geometry>
        <mesh
        filename="package://catbot/meshes/base_link.STL" />
    </geometry>
    <material
        name="">
        <color
        rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
    </material>
    </visual>
    <collision>
    <origin
        xyz="0 0 0"
        rpy="0 0 0" />
    <geometry>
        <mesh
        filename="package://catbot/meshes/base_link.STL" />
    </geometry>
    </collision>
</link>
<!-- Right wheel link -->
<link name="right_wheel">
    <inertial ...
(more)
edit retag flag offensive close merge delete