Ask Your Question
0

Using diff drive to drive a new robot

asked 2013-07-24 00:31:27 -0500

mozcelikors gravatar image

updated 2014-04-20 14:06:47 -0500

ngrennan gravatar image

Hello,

I'm trying to make a model of my own robot and plugins. However, I can't drive the robot. Moreover,the information is not being published into /gz/cmd_vel or /gazebo/cmd_vel or /gz/odom topics.

Here is the header of my model.sdf

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="myrobot">
    <link name="chassis">
      <pose>0 0 .1 0 0 0</pose>

Here are the plugins of my model.sdf

<plugin name="modelplugin" filename="libmyrobot_sonar_model_plugin.so"/>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
            <alwaysOn>true</alwaysOn>
            <updateRate>10</updateRate>
            <leftJoint>left_wheel_hinge</leftJoint>
            <rightJoint>right_wheel_hinge</rightJoint>
            <wheelSeparation>0.5380</wheelSeparation>
            <wheelDiameter>0.2410</wheelDiameter>
            <torque>20</torque>
            <commandTopic>cmd_vel</commandTopic>
            <odometryTopic>odom</odometryTopic>
            <odometryFrame>odom</odometryFrame>
            <robotBaseFrame>base_footprint</robotBaseFrame>
            <robotNamespace>gz</robotNamespace>
 </plugin>
    ...

I don't understand these parameters, anything else except <robotbaseframe> seems right for my robot. Can anybody explain what should I write in robotBaseFrame tag.

What should I to drive the robot? Do I need any other plugin? Any answer will be much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-06-24 05:20:51 -0500

keshav_sarraf gravatar image

-update rate -> frequency in (Hz) of publishing by the plugin
-leftJoint -> specify the name of the joint connecting left wheel of your differential drive robot to the chassis
-wheelSeparation -> distance between the 2 wheels in a diff drive robot -commandTopic ->name of the
-topic on which you can publish the linear and angular velocity of the robot
-odometryTopic -> Topic on which you can subscribe to the
-odometry data. robotNameSpace -> (generally the name of the robot... i am not sure)

edit flag offensive delete link more

Comments

Hi! Can you confirm that the wheelSeparation is specified in meters?

Sidd gravatar image Sidd  ( 2015-08-19 13:05:46 -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

3 followers

Stats

Asked: 2013-07-24 00:31:27 -0500

Seen: 2,721 times

Last updated: Jun 24 '14