Home | Tutorials | Wiki | Issues
Ask Your Question

Ben B's profile - activity

2018-05-09 02:47:15 -0500 received badge  Nice Answer (source)
2017-08-17 13:19:12 -0500 received badge  Famous Question (source)
2017-05-29 09:20:23 -0500 received badge  Famous Question (source)
2017-02-14 13:20:51 -0500 received badge  Notable Question (source)
2017-02-09 17:14:49 -0500 received badge  Popular Question (source)
2017-02-08 16:07:20 -0500 asked a question roslaunch'ing does not seem to be working with Gazebo 8.

I'm not sure if this is a ROS, Gazebo, or ros_gazebo issue, but I thought I'd see if anyone here has a solution or a good method to trouble shoot.

I've installed Gazebo 8 with ROS, and ros_gazebo in a docker container

Any roslaunch of the gazebo_ros package will open Gazebo, and seemingly start up ROS packages, but it won't actually launch the world file. To replicate, install Gazebo as described above and roslaunch gazebo_ros mud_world.launch. You'll see none of the models in this launch/world file show up.

2017-02-08 15:54:49 -0500 answered a question Is it possible to use ROS (gazebo_ros) with the recent nightly builds of Gazebo8?

Yes -- mostly. I have this building and running. However I am having issues with launch files. I'm doing it in a Docker container running Ubuntu 16.04 and ROS Kinetic.

Install dependencies

apt-get install -y libignition-math3 
apt-get install -y libsdformat5 \
        libgazebo8 \
        gazebo8 \
        libgazebo8-dev \
        ros-kinetic-ros-control \
        ros-kinetic-ros-controllers

Create a catkin workspace. In the source folder, pull the gazebo_ros package:

git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b kinetic-devel

then catkin_make it and source devel/setup.bash

2016-12-17 08:24:52 -0500 received badge  Nice Answer (source)
2016-05-10 17:23:31 -0500 commented question Can you draw a dot marker in gazebo?

I'm not clear on the question. Do you want a cube with a sphere attached?

2016-04-01 12:37:29 -0500 commented question I Cannot endure anymore. Gazebo Team, could you please carefully release your project.

-1. People here are happy to answer specific questions you have -- general complaints are really not constructive. If you have a question on how to do a particular thing: ask. If you have a feature request, make it. If you have a bug report, file it: https://bitbucket.org/osrf/gazebo/issues?status=new&status=open

2016-04-01 12:34:15 -0500 received badge  Critic (source)
2016-03-14 18:53:38 -0500 answered a question do you have a boat/ catamaran simulation model? if not what do you think I should do?

What exactly are you hoping to achieve? Physics simulation or just the appearance of a boat?

I haven't seen a boat model. But, you can create a model by following the build a robot tutorials.

Gazebo has some support for hydrodynamics and wind.

Creating the appearance of a boat should be easy enough. Integrating the wind and hydrodynamics will be significantly tougher.

2016-03-10 14:22:12 -0500 commented question kinematic tag sdf does not work

This issue is still present. Gazebo doesn't seem to load the property from the tag in the SDF, but will respect it when it's checked in the GUI.

2016-03-10 12:44:34 -0500 received badge  Enthusiast
2015-12-01 18:00:26 -0500 received badge  Famous Question (source)
2015-11-20 18:35:46 -0500 received badge  Notable Question (source)
2015-11-04 20:28:14 -0500 commented answer Edit existing building in Gazebo?

Shame :( Thanks for the answer though.

2015-11-04 20:27:49 -0500 received badge  Popular Question (source)
2015-11-03 19:40:03 -0500 asked a question Edit existing building in Gazebo?

I've created and exported a building using the building editor*. Is it possible to open that building up in the editor to change it?

*Awesome tool by the way. Thanks guys!

2015-10-31 12:31:07 -0500 marked best answer Can't visualize RaySensor in Gazebo 1.5

Hi all,

I'm working through the tutorials with the aim of learning to write my own ROS plugins to control models.

In the Control Model tutorial, the example has <visualize>true</visualize> for the ray sensor. However, I can't see the ray when I load the world file. Does this happen for everyone?

Also: part 2 of my question on the tutorial is here.

2015-10-31 12:31:04 -0500 marked best answer Control Model Tutorial: Sensor isn't attached

I'm going through the Control Model tutorial. Part of the plugin displays the minimum distance sensed by a ray sensor. Unfortunately, it's perpetually displaying min_range = 9.500. I think the sensor isn't travelling with the box, because when I change the initial pose of the box, the 9.500 value changes to something else and stays put.

My understanding was that having the sensor inside of <joint></joint> tags was supposed to keep it attached. Am I wrong? How do I attach it?

I'm wondering if something in Gazebo is configured wrong because running this tutorial up to and including the gztopic echo /gazebo/default/box/link/my_contact doesn't produce anything other than

$ gztopic echo /gazebo/default/box/link/my_contact
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
2015-10-31 12:30:58 -0500 marked best answer Standalone Gazebo crashes on startup

Following NKoenig's advice from here, I tried to install standalone Gazebo (using these instructions).

The version of gazebo that comes with ROS works fine, but the standalone crashes:

When I run "gazebo" from the command line, I get

Gazebo multi-robot simulator, version 1.3.1
Copyright (C) 2012 Nate Koenig, John Hsu, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 1.3.1
Copyright (C) 2012 Nate Koenig, John Hsu, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345

Msg Connected to gazebo master @ http://localhost:11345

It starts to load. Instead of the usual "world", I see a black square. After waiting a couple more minutes, I see a white sky appear. Waiting a little while longer, I see the usual cloud background. Then the program crashes with no error messages.

Sometimes it crashes earlier and I get this message:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Ogre::InvalidParametersException'
  what():  OGRE EXCEPTION(2:InvalidParametersException): All framebuffer formats with this texture internal format unsupported in GLFrameBufferObject::initialise at /tmp/buildd/ros-fuerte-visualization-common-1.8.4/debian/ros-fuerte-visualization-common/opt/ros/fuerte/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/OgreGLFrameBufferObject.cpp (line 276)

Also noteworthy: starting Gazebo with "sudo gazebo" gives:

gazebo: error while loading shared libraries: liburdfdom_model.so: cannot open shared object file: No such file or directory

Things I've tried:

  • Uninstalling and reinstalling.
  • Running as root
  • Uninstalling ROS using apt-get --purge remove ros-* and reinstalling Gazebo.

I'm running Ubuntu 12.04 with the proprietary NVIDIA drivers for my NVIDIA Corporation NV45GL [Quadro FX 3400/4400] graphics card.

2015-10-31 12:30:58 -0500 marked best answer How to comment an SDF?

Is there a way to add comments that aren't parsed to an SDF?

If so, perhaps this should be added to the SDF 1.3 documentation.

2015-10-31 12:30:44 -0500 marked best answer How does one use /gazebo/spawn_sdf_model ?

I'm trying to delete and respawn an SDF model as a (hopeful) work around to my problem here.

I'd like to use a rosservice so I can call it using a rospy.ServiceProxy.

For now, I'm just trying to get it to run from the command line:

$ rosservice call /gazebo/spawn_sdf_model "model_name: 'joe'
model_xml: '/home/benb/Dropbox/RoboticsResearch/WAMInProgress/tp/AllInOne/Trajectory_Phonebook/ros_stuff/src/iiim_wam_description/wam.sdf'
robot_namespace: ''
initial_pose:
  position: {x: 0.0, y: 0.0, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: 0.0, w: 0.0}
reference_frame: ''"

I've tried using a few things for the model_xml argument:

  • The above is the absolute path to the sdf.
  • I've tried launching it from /home/benb/Dropbox/RoboticsResearch/WAMInProgress/tp/AllInOne/Trajectory_Phonebook/ros_stuff/src/iiim_wam_description/ with the argument model_xml: 'wam.sdf'
  • I've tried using the directory name iiim_wam_description
  • I've tried using the name specified in the model.config, iiim_ros_wam

In all cases, I get the message:

success: False
status_message: GazeboRosApiPlugin SpawnModel Failure: input model_xml not SDF or URDF, or cannot be converted to Gazebo compatible format.

It would be especially helpful if someone could give me pointers on doing this using the rospy ServiceProxy.

2015-10-31 12:30:36 -0500 marked best answer Error loading SDF in Gazebo 1.3.1

I'm trying to load a simple SDF in Gazebo and I'm getting an error.

I'm running Gazebo 1.3.1.

The SDF is copied straight from a tutorial. The code is:

<?xml version='1.0'?>
<sdf version='1.3'>
  <model name="my_robot">
     <static>true</static>
       <link name='chassis'>
        <pose>0 0 .1 0 0 0</pose>

        <collision name='collision'>
          <geometry>
            <box>
              <size>.4 .2 .1</size>
            </box>
          </geometry>
        </collision>

        <visual name='visual'>
          <geometry>
            <box>
              <size>.4 .2 .1</size>
            </box>
          </geometry>
        </visual>
      </link>
  </model>
</sdf>

I tried to launch it using:

gzfactory spawn -f model3.sdf

The error I'm getting is this:

Error [SDF.cc:984] Unable to find value for key[origin]
Error [SDF.cc:738] Missing element description for [origin]
Segmentation fault (core dumped)

Someone else posted about this error here. It was said to be fixed in the bug report, but I don't think it was.

Is there a fix for this? Is there a better way to spawn an SDF?

Verdict: Probably a bug. Filed here . Workaround: Follow the directions given in the answer below or equivalently in the Gazebo Handbook.

2015-10-31 12:30:27 -0500 marked best answer Can Gazebo be told to ignore .svn folders or all hidden folders?

My models are under SVN version control. This means a ".svn" folder is placed in all of the directories. So upon launching Gazeo, I get the error:

Error [InsertModelWidget.cc:254] model.config file is missing in directory["/home/.../WAMDatabase/.svn"].

Is there any way of telling Gazebo to ignore this file so I don't get the error? It's not a huge deal, but it'd make the legitimate errors stand out more.

Update: Bonus: ignoring the backup files created by gedit that end in "~".

2015-10-31 12:30:15 -0500 marked best answer Has anybody gotten the contact sensor example to work in a repo-installed Gazebo 1.5.0

As mentioned in my other question, the Gazebo tutorial for 1.5.0 on the contact sensor isn't working for me. I've now tried it on two separate computers -- one of which has a brand new install of Gazebo 1.5. I've gone up to (and including) the step with gztopic echo /gazebo/default/box/link/my_contact. Nothing shows up. Not when I move the box around, not when I drag other cubes into it. Nothin'.

I was also having problems with the ray sensor. Andrei said it worked fine on his copy which is installed from source. I'm wondering if this is related.

Has anyone gotten this to work on a repo-installed version of Gazebo 1.5.0?

My output for the gztopic list command (while running contact.world):

$ gztopic list
/gazebo/default/pose/info
/gazebo/default/gui
/gazebo/default/log/status
/gazebo/default/response
/gazebo/default/world_stats
/gazebo/default/selection
/gazebo/default/model/info
/gazebo/default/light
/gazebo/default/physics/contacts
/gazebo/default/visual
/gazebo/default/request
/gazebo/default/joint
/gazebo/default/sensor
/gazebo/default/box/link/my_contact
/gazebo/world/modify
/gazebo/default/diagnostics
/gazebo/default/factory
/gazebo/default/model/modify
/gazebo/default/scene
/gazebo/default/physics
/gazebo/default/world_control
/gazebo/server/control

and for echoing the topic:

$ gztopic echo /gazebo/default/box/link/my_contact
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179

Also, I should mention that echoing the /gazebo/default/diagnostics gives what, I think, is expected:

$ gztopic echo /gazebo/default/diagnostics
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
real_time {
  sec: 545
  nsec: 278030788
}
sim_time {
  sec: 543
  nsec: 639000000
}
real_time_factor: 0.99699413700000006

real_time {
  sec: 545
  nsec: 279033152
}
sim_time {
  sec: 543
  nsec: 640000000
}
real_time_factor: 0.99699413900000011
...

Echoing /gazebo/default/physics/contacts gives:

$ gztopic echo /gazebo/default/physics/contacts
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
contact {
  collision1: "box::link::box_collision"
  collision2: "ground_plane::link::collision"
  position {
    x: -0.500000000000538
    y: 0.5000000000027871
    z: -1.3116396857526524e-11
  }
  position {
    x: 0.499999999999462
    y: 0.50000000000861855
    z: -1.3116396854834858e-11
  }
  normal {
    x: 0
    y: 0
    z: 1
  }
  normal {
    x: 0
    y: 0
    z: 1
  }
  depth: 1.3116396857526524e-11
  depth: 1.3116396854834858e-11
  wrench {
    body_1_name: "box::link::box_collision"
    body_2_name: "ground_plane::link::collision"
    body_1_force {
      x: -2.3140274425398203e-05
      y: -0.58800230164949263
      z: 2.9400153497970845
    }
    body_2_force {
      x: 0
      y: 0
      z: 0
    }
    body_1_torque {
      x: 1.1760044495821824
      y: 1.4700192450579339
      z: 0.29401272095006686
    }
    body_2_torque {
      x: 0
      y: 0
      z: 0
    }
  }
  wrench {
    body_1_name: "box::link::box_collision"
    body_2_name: "ground_plane::link::collision"
    body_1_force {
      x: 2.3140281286035522e-05
      y: -0.58800230164948963
      z: 2.940015349797072
    }
    body_2_force {
      x: 0
      y: 0
      z: 0
    }
    body_1_torque {
      x: 1.176004449599322
      y: -1.4700192450442133
      z: -0.29401272095006692
    }
    body_2_torque {
      x: 0
      y: 0
      z: 0
    }
  }
  time {
    sec: 9
    nsec: 22000000
  }
}
time {
  sec: 9
  nsec: 22000000
}
...
2015-10-31 12:30:11 -0500 marked best answer Basic Joint Control Question

Hi everyone,

I'm looking to write a basic joint control plugin. I'm trying to use SetJointPosition to, well, set the joint position. The joint controller can't seem to find the joint. After compiling the plugin, running the code gives me an error:

$ gazebo set_joints.sdf
Gazebo multi-robot simulator, version 1.5.0
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.Gazebo multi-robot simulator, version 1.5.0
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 142.103.111.179
Warning [JointController.cc:190] SetJointPosition [my_joint] not found

the last line appears repeatedly.

I believe I'm doing what the API docs, and Gwen's answer tell me to do.

Is there something else I have to do to make the model aware of the joint?

Here's my minimum (not) working example: The plugin:

#include <boost/bind.hpp>
#include <gazebo.hh>
#include <physics/physics.hh>
#include <common/common.hh>
#include <stdio.h>

namespace gazebo
{   
  class SetJoints : public ModelPlugin
  {
    public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) 
    {
      // Store the pointer to the model
      this->model = _parent;

      this->j2_controller = new physics::JointController(model);

      // Listen to the update event. This event is broadcast every
      // simulation iteration.
      this->updateConnection = event::Events::ConnectWorldUpdateBegin(
          boost::bind(&SetJoints::OnUpdate, this, _1));
    }

    // Called by the world update start event
    public: void OnUpdate(const common::UpdateInfo & /*_info*/)
    {
      // Apply a small linear velocity to the model.
      //this->model->SetLinearVel(math::Vector3(.03, 0, 0));

      double angle(3.0);
      std::string j2name("my_joint");  
      j2_controller->SetJointPosition(j2name,angle);

    }

    // Pointer to the model
    private: physics::ModelPtr model;

    // Pointer to the update event connection
    private: event::ConnectionPtr updateConnection;

    private: physics::JointController * j2_controller;

  };

  // Register this plugin with the simulator
  GZ_REGISTER_MODEL_PLUGIN(SetJoints)
}

The SDF:

<?xml version="1.0" ?>
<sdf version="1.3">

  <world name="default">
    <!-- Ground Plane -->
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>

   <model name="box">
   <static>false</static>
      <link name="base_link">
        <pose>0 0 0.5 0 0 0</pose>
        <inertial>
          <pose>0 0 0.5 0 0 0</pose>
          <inertia>
            <ixx>1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>1</iyy>
            <iyz>0</iyz>
            <izz>1</izz>
          </inertia>
          <mass>1</mass>

        </inertial>

        <collision name="collision">
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </collision>

        <visual name="visual">
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </visual>
      </link>

      <link name="top_link">
        <pose> 0 0 1.3 0 0 0 </pose>
        <inertial>
          <pose>0 0 0.5 0 0 0</pose>
          <inertia>
            <ixx>1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>1</iyy>
            <iyz>0</iyz>
            <izz>1</izz>
          </inertia>
          <mass>1</mass>

        </inertial>


        <collision name="collision">
          <geometry>
            <box>
              <size>.5 .5 .5</size>
            </box>>
          </geometry ...
(more)
2015-10-31 12:28:17 -0500 marked best answer What is the tbb/task.h header for, and where can I get it?

Trying to compile a plugin that sets joint positions, I get this error:

$ make
[100%] Building CXX object CMakeFiles/set_joints.dir/set_joints.cc.o
In file included from /usr/include/gazebo-1.7/gazebo/transport/transport.hh:3:0,
                 from /usr/include/gazebo-1.7/gazebo/gazebo_core.hh:23,
                 from /usr/include/gazebo-1.7/gazebo/gazebo.hh:20,
                 from /home/benjaminblumer/Dropbox/RoboticsResearch/WAMDatabase/WAM Model/set_joints.cc:10:
/usr/include/gazebo-1.7/gazebo/transport/Connection.hh:20:22: fatal error: tbb/task.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/set_joints.dir/set_joints.cc.o] Error 1
make[1]: *** [CMakeFiles/set_joints.dir/all] Error 2
make: *** [all] Error 2

What is the tbb library and how should I install it? I'm using Ubuntu 12.04 64 bit with Gazebo 1.7.1.

2015-10-31 12:12:55 -0500 marked best answer Setting GAZEBO_PLUGIN_PATH crashes Gazebo

Hi all,

So I have a model of a WAM Arm. I wrote a plugin that moves its joints through a list of joint positions.

When I:

  • don't have the GAZEBO_PLUGIN_PATH set
  • cd into the directory of the model
  • then run Gazebo

I can insert the model from the "insert" menu. It then executes the joint movements.

If I try running Gazebo from outside that directory, I can still insert the model, but it won't go through the movements.

Then, if I try setting the GAZEBO_PLUGIN_PATH to the model directory, inserting the model results in an errorless crash.

Any thoughts?

2015-10-31 12:12:08 -0500 marked best answer 1.4 update resetting the ~/.gazebo/models folder

It's possible I've just forgotten where I put the model I was working with a couple weeks ago, but I think it was in the ~/.gazebo/models/ folder.

  1. Would 1.4 have reset the contents of this folder?

  2. If so, is there a way of recovering it?

2015-04-09 20:48:38 -0500 marked best answer A simple question on changing bounce properties

Hi all,

I'm trying to model a ball. I'm not having any luck with making it bounce. I try to set the restitution coefficient in my URDF code, but when I look at the properties of the ball in Gazebo (ball1 -> ball -> link -> collision -> surface) the restitution_coefficient is still equal to zero.

I'm running Fuerte (which should correspond to Gazebo 1.0.2) on Ubuntu 12.04.

The URDF:

 <robot name="my_ball">
  <link name="ball">
    <inertial>
      <origin xyz="0 0 0" /> 
      <mass value="0.0027" />
      <inertia  ixx="0.00000072" ixy="0.0"  ixz="0.0"  iyy="0.00000072"  iyz="0.0"  izz="0.00000072" />
    </inertial>
    <visual>
      <origin xyz="0 0 0"/>
      <geometry>
        <sphere radius=".040" />
      </geometry>
    </visual>
    <collision>
      <origin xyz="0 0 0"/>
      <geometry>
        <sphere radius=".040" />
      </geometry>
      <surface>
           <bounce restitution_coefficient = "1"/>
      </surface>
    </collision>

  </link>
  <gazebo reference="ball">
    <material>Gazebo/Orange</material>
    <kd value = "100">
    <kp value = "999999">
        <mu1>1</mu1>
    <mu2>1</mu2>
  </gazebo>
</robot>

I'm loading the ball using:

rosrun gazebo spawn_model -file `pwd`/ballmodel.urdf -urdf -z 10 -x 1 -y -2 -model ball1

I've also tried a few different tags for the restitution coefficient including:

<surface>
...
<bounce restitution_coefficient="0.5" threshold="0.00"/>
...
</surface>

And:

<surface>
...
  <bounce>
       <restitution_coefficient="1"/>
   </bounce>
...
</surface>

and:

<surface>
...    
   <bounce>
       <restitution_coefficient> 1 </restitution_coefficient>
    </bounce>
</surface>
2015-04-09 04:29:09 -0500 received badge  Nice Question (source)
2015-02-13 18:30:17 -0500 edited question Can't find model database when roslaunch'd, but can find it when Gazebo is run by itself.

I have a robot model (wam), launch file, and world file. When I run Gazebo by itself, I see the robot model show up in the "insert" menu and I can drop it in without problem. However, when I try to roslaunch my launch file, I get Error [parser.cc:528] Unable to find uri[model://wam_description] . Not only that, but all of a sudden I can no longer see the robot in the "insert" menu (I can't see any of my robots. Only the .gazebo folder and the online database).

Any advice on how to get this roslaunch working?

I'm using Gazebo 4 and am running ROS Indigo.

I have a catkin workspace in ~/path/ros_stuff.

In ros_stuff, I have a number of gazebo model directories, but the relevant ones are: wam_gazebo and wam_description.

Within wam_gazebo I have:

launch/
  wam.launch
worlds/
  wam.world
CMakeLists.txt
package.xml

Within wam_description I have:

meshes/
  ... a bunch of stl files.
CMakeLists.txt
package.xml
model.config
wam.sdf

in my .bashrc:

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/path/ros_stuff/src/
source /opt/ros/indigo/setup.bash
source ~/path/ros_stuff/devel/setup.bash

Edit: I can succesfully roslaunch gazebo_ros empty_world.launch but my model directory (ros_stuff) still doesn't show up in the "insert" menu.

Bug confirmed. Workaround: Others have no confirmed this bug in the ticket that Jose posted. As a workaround until it's fixed, one can copy their models to the ~/.gazebo folder and they'll show up even when roslaunch is used.

2015-02-13 03:03:38 -0500 received badge  Famous Question (source)
2015-02-13 03:00:00 -0500 commented question Can't find model database when roslaunch'd, but can find it when Gazebo is run by itself.

William, this happens even when I roslaunch the standard empty_world.