Ask Your Question

DiffDrive odometry source is missing

asked 2016-06-05 15:10:47 -0500

M_wasiel13 gravatar image

updated 2016-06-07 07:03:57 -0500

Hello, When i launch my simulation I get two warnings:

[ WARN] [1465156368.902100026, 1017.888000000]: DiffDrive(ns = //): missing <odometrySource> default is 1
[ WARN] [1465156368.902473604, 1017.888000000]: GazeboRosDiffDrive Plugin (ns = ) missing <publishTf>, defaults to 1

I try to run gazebo+ ros with pioneer robot. I don't know how to solve this issue.

That's how i use DiffDrive plugin pioneer.gazebo files:

    <plugin name="gazebo_ros_control" filename="">
    <plugin filename="" name="differential_drive_controller">
      <torque>5</torque><br />

And here i attached my launch files:

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find gazebo_worlds)/worlds/"/>
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)"/>
    <arg name="use_sim_time" value="$(arg use_sim_time)"/>
    <arg name="headless" value="$(arg headless)"/>
  <!-- No namespace here as we will share this description. 
       Access with slash at the beginning -->
  <!-- Load the URDF into the ROS Parameter Server -->
  <param name="robot_description"
     command="$(find xacro)/ '$(find pioneer_description)/urdf/pioneer3dx.xacro'" />
  <!-- BEGIN PIONEER 1-->
  <include file="$(find pioneer_description)/launch/one_pioneer.launch" >
      <arg name="init_pose" value="-x 0 -y -55 -z 0" />
    <param name="/use_sim_time" value="true"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find gazebo_worlds)/maps/FactoryWorld.yaml" >
    <param name="frame_id" value="/map" />
    <param name="robot_description"
    command="$(find xacro)/ '$(find pioneer_description)/urdf/pioneer3dx.xacro'" />

  <!-- Show in Rviz   -->
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find pioneer_description)/launch/pioneer.rviz"/>


And one_pioneer.launch:

  <arg name="init_pose"/>

  <!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="$(arg init_pose) -urdf -model -param /robot_description"/>

  <!-- send fake joint values -->
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
    <param name="use_gui" value="FALSE"/>
    <remap from="robot_description" to="/robot_description"/>
  <!-- Combine joint values -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>
  <!-- The odometry estimator, throttling, fake laser etc. go here -->
  <!-- All the stuff as from usual robot launch file -->  

I think this is a really simple problem but i have no knowledge how to solve that issue.

Below I alsso attached all logs from gazebo etc. starting:

 [ INFO] [1465156365.861468958, 1017.888000000]: Camera Plugin (robotNamespace = /), Info: Using the 'robotNamespace' param: '/'
    [ INFO] [1465156366 ...
edit retag flag offensive close merge delete


I don't see the warnings. A little update ? :)

F.Brosseau gravatar image F.Brosseau  ( 2016-06-06 02:06:39 -0500 )edit

Please format xml (launch files, urdf) and error messages with the Preformatted text button (the one with 101010 on it). Just select the text you want to format, then press the button (or ctrl+k). Otherwise your question is rather hard to read. Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-06-06 02:12:31 -0500 )edit

Hi, The description has been updated. I hope now it is more clear. Waiting for your response because I think this warning causes my problems with work of base_local_planner

M_wasiel13 gravatar image M_wasiel13  ( 2016-06-07 07:05:58 -0500 )edit

Do you have an error ? These two warnings just tell you that you don't use the odometrySource and publishTf tags so it will use default values. Values for odometrySource are WORLD or ENCODER. You can set it by adding <odometrysource>WORLD</odometrysource> for example.

F.Brosseau gravatar image F.Brosseau  ( 2016-06-07 07:13:02 -0500 )edit

If you have a problem with a ros node and simulation, maybe you can use rqt_graph tool to see if all topics are correctly mapped.

F.Brosseau gravatar image F.Brosseau  ( 2016-06-07 07:20:21 -0500 )edit

No i don't have an error. In rqt_graph everything seems ok. According to your description I can conclude that such warning are not a problem. Am I right?

M_wasiel13 gravatar image M_wasiel13  ( 2016-06-07 17:09:21 -0500 )edit

Also I add description "<odometrysource>WORLD</odometrysource>" to my pioneer.gazebo file and warnings are still the same.

M_wasiel13 gravatar image M_wasiel13  ( 2016-06-07 17:15:20 -0500 )edit

These warnings are not a problem.

Sorry my bad, I made a mistake. It's odometrySource.

You can check what are the parameters of the plugins by checking the source code : git_gazebo

F.Brosseau gravatar image F.Brosseau  ( 2016-06-08 02:01:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-23 07:48:48 -0500

you are missing tags in your libgazebo_ros_diff_drive plugin:

<odometrySource>world</odometrySource> <!-- 'encoder' instead of 'world' is also possible -->

here is a full example of a correct definition:

  <!-- differential drive -->
    <plugin name="differential_drive_controller" filename="">
edit flag offensive delete link more


This indeed fixes the issue but what is the meaning of the value? I cannot find any documentation for it.

Felix Widmaier gravatar image Felix Widmaier  ( 2018-06-13 08:46:30 -0500 )edit

Where we can find the documentation of libgazebo_ros_diff_drive plugin? I asking for the documentation where we can find the description of all the available tags for this plugin. Thanks.

Elric gravatar image Elric  ( 2018-12-11 03:06:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-06-05 15:10:47 -0500

Seen: 4,481 times

Last updated: Sep 23 '17