[ros-users] Gazebo Vehicle Simulation

David Ferguson dhf at andrew.cmu.edu
Mon May 3 19:53:06 UTC 2010


I am trying to write create a gazebo simulation of a 4 wheeled vehicle
(think golf cart). I am having an issue with trying to create forces in the
simulation. I want to apply a torque the rear wheels (equivalent to pressing
the gas pedal). I can't figure out however how to use the gazebo plugin
which is supposed to apply the force. In the .h file for the plugin it says
to use it as such:

  This is a controller that collects data from a ROS topic and applies
wrench to a body accordingly.

  Example Usage:
  <model:physical name="box_model">
    <body:empty name="box_body">
    <controller:gazebo_ros_force name="box_force_controller"

To test it I essentially copied the tutorial showing how to use the iface
plugin (sets a models position). My urdf file is below:

<robot name="object_model"
http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" >
  <!-- urdf requires at least one joint and one link, so here's the joint
  <joint name="my_mug_joint" type="floating" >
    <!-- axis is in the parent link frame coordintates -->
    <axis xyz="0 0 0" />
    <parent link="world" />
    <child link="object_link" />
    <!-- initial pose of my_mug joint/link in the parent frame coordiantes
    <origin xyz="0 0 0" rpy="0 0 0" />
  <!-- one floating link -->
  <link name="object_link">
      <mass value="1"/>
      <origin xyz="0 0 0.0"/>
      <inertia ixx="0.05" ixy="0" ixz="0" iyy="0.05" iyz="0" izz="0.05"/>
      <origin rpy="0 0 0" xyz="0 0 0.0"/>
        <box size="1.0 1.0 1.0"/>
      <origin rpy="0 0 0" xyz="0 0 0.0"/>
        <box size="1.0 1.0 1.0"/>

  <gazebo reference="object_link">
        <controller:gazebo_ros_force name="box_force_controller"

I then have a python script publishing a wrench message to the box_force
topic however no matter what settings I use it never seems to actually
affect the box in the simulation. Am I going about this completely wrong? Is
there a flag I'm not setting?

Thanks in advance for any help,

David Ferguson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100503/503e6ce0/attachment-0002.html>

More information about the ros-users mailing list