Gazebo | Ignition | Community
Ask Your Question

Christoph's profile - activity

2018-07-27 08:10:59 -0600 received badge  Nice Question (source)
2016-05-25 22:04:02 -0600 received badge  Famous Question (source)
2015-11-18 13:34:21 -0600 received badge  Famous Question (source)
2015-10-31 12:30:32 -0600 marked best answer Validation between simulation and the real world

Hi all,

this question is maybe more like an open or theoretical one.

As one part of my work with the robot simulation I have to make some tests in the real world as well as in my simulation to validate the usefullness of my work. We want to use the simulation for further development and tests before we try them on our real hardware.

Maybe you have some proposals for me, you have some experience with this topic yourself or know some points that I really shouldn't miss. For this purpose I plan to build a recreation of a simple floor or room in our university in Gazebo as the scope for these tests.

At this point of my work we don't really care about a completely correct physics model or that our pid parameters would work in reality, as long as we have a simulation that somehow behaves like our real robot (for it has e.g different engines for the joints). I was more thinking about something like letting the robots (real and simulation) drive to a defined position and look at the deviation, put an obstacle in their way and look at their behaviour etc.

Thanks for your help,

Christoph

2015-10-31 12:30:32 -0600 marked best answer Real Time Factor going down after insertion of a "simple" test room

Hi all,

after inserting a selfmade model, a floor (around 27 meters x 2,20 meters) with one additional room (around 4 meters x 5 meters), the real time factor is going down to 0.65. The model was created using sketup and exported as a .dae file (see attachement).

Of course I did expect the real time factor to go down a bit, but how much is considered normal with "simple" shapes.

The robot movements are becoming really slow. I am using the ROS move_base node to move to 2d goals.

The computer I use is an i7 @ 3,4GHz with 8GB ram. The graphics card is some nvidia with 1024MB. Could it be that the graphics card doesn't have enough power? Isn't the gazebo client normally not used for visual presentation and user interaction only?

Thanks for your help, Christoph

image description

2015-10-31 12:30:30 -0600 marked best answer SDF Model falls completely apart (couldn't find parent link) after todays update (15.04. - gazebo_1.6.2-1~precise_amd64.deb)

Hi everyone!

Today I installed a Gazebo update package trough the Ubuntu update manager (see extract from the term.log below) and after that my sdf model isn't working anymore.

term.log extract
Preparing to replace gazebo 1.6.1-2~precise (using .../gazebo_1.6.2-1~precise_amd64.deb) ...
Unpacking replacement gazebo ...
Processing triggers for desktop-file-utils ...
Setting up gazebo (1.6.2-1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Log ended: 2013-04-15  12:21:46

When I start Gazebo it says that standard files like empty.world are deprecated.

Warning [parser.cc:361] Converting a deprecated SDF source[/usr/share/gazebo-1.6/worlds/empty.world].
Warning [Converter.cc:61]   Version[1.3] to Version[1.4]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Warning [parser.cc:361] Converting a deprecated SDF source[/home/christoph/.gazebo/models/sun/model.sdf].
Set SDF value
Warning [Converter.cc:61]   Version[1.2] to Version[1.4]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Warning [parser.cc:361] Converting a deprecated SDF source[/home/christoph/.gazebo/models/ground_plane/model.sdf].
Set SDF value
Warning [Converter.cc:61]   Version[1.2] to Version[1.4]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]

When I load my sdf file the model falls completely apart with the following messages.

Warning [parser.cc:361] Converting a deprecated SDF source[/home/christoph/.gazebo/models/scitos/model.sdf].
Warning [Converter.cc:61]   Version[1.3] to Version[1.4]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Warning [parser.cc:361] Converting a deprecated SDF source[/home/christoph/.gazebo/models/scitos_arm/model.sdf].
Warning [Converter.cc:61]   Version[1.3] to Version[1.4]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Error [SDF.cc:993] Unable to find value for key[link_name]
Error [SDF.cc:993] Unable to find value for key[link_name]
Exception [Joint.cc:125] Couldn't Find Parent Link[]

Error [Model.cc:153] LoadJoint Failed
Error [SDF.cc:993] Unable to find value for key[link_name]
Error [SDF.cc:993] Unable to find value for key[link_name]
Exception [Joint.cc:125] Couldn't Find Parent Link[]

Error [Model.cc:153] LoadJoint Failed
Error [SDF.cc:993] Unable to find value for key[link_name]
Error [SDF.cc:993] Unable to find value for key[link_name]
Exception [Joint.cc:125] Couldn't Find Parent Link[]

Error [Model.cc:153] LoadJoint Failed
Error [SDF.cc:993] Unable to find value for key[link_name]
Error [SDF.cc:993] Unable to find value for key[link_name]
Exception [Joint.cc:125] Couldn't Find Parent Link[]

Since sdf 1.4 isn't live, I don't know why it wants my model in sdf 1.4 format. I then tried the gzsdf convert (with success) but the only thing that got changed were the version number and that ' were replaced by ... (more)

2015-10-31 12:30:30 -0600 marked best answer ROS urdf_to_graphiz counterpart in Gazebo

Hi all,

is there a tool in gazebo equal to the function of ROS urdf_to_graphiz to get a visual overview of your sdf model?

Thanks for your help,

Christoph

2015-10-31 12:30:28 -0600 marked best answer You must call ros::init() before creating the first NodeHandle

Hi all,

I got some strange and annoying problems after installing Gazebo 1.9 from source to be able to compile the gazebo_ros_pkgs.

I followed the installation instructions as shown in Installing_gazebo_ros_Packages and Compiling_From_Source. At this time the link pointing to the compiling_from_source of version 1.6. wasn't crossed out.

After the installation I was able to compile the gazebo_ros_pkgs in my catkin folder. But I got problems starting my models in Gazebo due to some ROS problems, saying something like:

"Not loading plugin since ROS hasn't been properly initialized".

I wasn't able to fix that. But because I achieved to compile the plugin package I went back to Gazebo 1.8.6 and ROS 1.9.45. Therefore I completely uninstalled all the old Gazebo and ROS versions.

What happens now is - when I try to start my models in Gazebo, using some self made plugins, I got the following error message:

file = /tmp/buildd/ros-groovy-roscpp-1.9.44-0precise-20130325-1240/src/libros/node_handle.cpp
line=151

I got two plugins and both of them worked fine before I made the previously mentioned changes.

The strange thing is, this error message appears only with one of the plugins. And they both initialize ros in the same way.

    public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
    {
        // Start up ROS
        std::string name = "scitos_gazebo_platform_control";
        int argc = 0;
        ros::init(argc, NULL, name);


        // ROS Nodehandle
        this->my_rosnode = new ros::NodeHandle("~");
                    ...

When I try to comment the rosnode or to get an message to the console by only using std::cout the error message stay the same.

Thank you for your help.

Christoph

2015-10-31 12:30:26 -0600 marked best answer Laser scanner implementation

Hey everyone,

I wanted to know how to add and implement a laser scanner / laser scanner plugin to my robot. The data of the scanner shall be passed to rviz by using ROS messages.

I got a Gazebo standalone installation with ROS installed afterwards.

My robot so far consists of a moveable base which I can move around through ROS cmd_vel messages. The control is implemented via a gazebo model plugin. As a first step I added a sensor to my sdf file with the data of our real laser scanner. But now I need the logic for an appropriate gazebo plugin (no point cloud).

Thanks

Christoph

2015-10-31 12:30:22 -0600 marked best answer General Gazebo Questions before starting with a master thesis (robot control strategy, joint control, physics and dynamics, gazebo-ros-components)

Hi everyone!

Because I am planning to write my master thesis using Gazebo and ROS I have some basic questions concerning various topics.

The objective:
My goal is the simulation of a 5dof robot arm, its mobile plattform and some sensors (laser scanner, kinect camera etc.). Based on the existing ROS-modules of our real robot the plattform and the arm should be able to move. The simulation should be used as a hardware independent development environment for our real robot.

What do I have so far:
I got an sdf description file for the arm and its plattform. So far it looks fine. I only set the basic parameter (no physical parameters, no weights, no joint engines etc.). If I start the engine the robot arm falls to the ground observing the set collision (self collide) ranges, which I think is the expected behavior.

My Questions:
(I did some research before and maybe I overlooked something, but I just want to be sure about these things before I start the real work or maybe it becomes apparent that I made some wrong assumptions.)

  1. Do I need to provide all the physical / dynamic parameter of our robot?
    We don't need a completely perfect physical behavior in the first instance. The correct movement of the plattform and the arm would be sufficient. And I fear that we dont have all the parameters needed in our robot documentation. Maybe it is possible to limit the dynamic to a minimum.

  2. What is the best strategy to start the development and control of all related control- / bahavior- / ros-parts (to control the robot)?
    My plan was to work with a few sdf-files and then use a "main" gazebo-plugin for the rest. I know that I somehow have to use diffent gazebo-plugins for sensors and ros-components etc.. Everything needed would be called from that one plugin. Or what is the best way respectively your recommandation?

  3. How to best connect the existing ros-components / ros-logic of our real robot to the gazebo-simulation?
    Can I call them just through the "main" gazebo-plugin like in the question before?

  4. What is the best way to control the joints?
    Do I have to specify a pid-controller for every joint (problem with missing infos) or would it be enough / the better way to control the joints through the physics::JointController Classes / or similar?

  5. What about that realtime-controller everybody is talking?
    Do I need such a controller to control my robot in a reasonable way? Wouldn't the control just work over input for the plugins as there are ros-components for movement and grasping which only wait for e.g. target-coordinates.

Well I think thats it for the time being.

Thank you very much for your answers once before.

Kind regards

Christoph

2015-10-31 12:30:12 -0600 marked best answer gzerr couldn't be resolved (mobile_base plugin)

Hey guys,

I just wanted to control my mobile platform by adapting the code from the [http://gazebosim.org/wiki/Tutorials/1...robot/mobilebase] tutorial. I am using the newest gazebo version.

I compiled the plugin using the CMakeLists.txt and after that imported the project in Eclipse.

When I wanted to rebuild the project, Eclipse threw some error messages regarding the gzerr macro saying the function Instance and the method ColorErr could not be resolved. I also tried to call the function directly with the same results. The only thing I changed is the class name.

Here is the plugin code so far:

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


namespace gazebo
{   
  class PlattformControlPlugin : public ModelPlugin
  {
    public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf) 
    {

      // Store the pointer to the model
      this->model = _parent;

      // Load parameters for this plugin
      if (this->LoadParams(_sdf))
      {
        // Listen to the update event. This event is broadcast every
        // simulation iteration.
        this->updateConnection = event::Events::ConnectWorldUpdateStart(
            boost::bind(&PlattformControlPlugin::OnUpdate, this));
      }
    }

    public: bool LoadParams(sdf::ElementPtr _sdf) 
    {
      if (this->FindJointByParam(_sdf, this->left_wheel_joint_,
                             "left_wheel_hinge") &&
          this->FindJointByParam(_sdf, this->right_wheel_joint_,
                             "right_wheel_hinge"))
        return true;
      else
        return false;
    }

    public: bool FindJointByParam(sdf::ElementPtr _sdf,
                                  physics::JointPtr &_joint,
                                  std::string _param)
    {
      if (!_sdf->HasElement(_param))
      {
        // original plugin code
        gzerr << "param [" << _param << "] not found\n";

        // My call without using the macro
        //common::Console::Instance()->ColorErr("Error", __FILE__, __LINE__, 31)
        //      << "param [" << _param << "] not found\n";
        return false;
      }
      else
      {
        _joint = this->model->GetJoint(
          _sdf->GetElement(_param)->GetValueString());

        if (!_joint)
        {
          gzerr << "joint by name ["
                << _sdf->GetElement(_param)->GetValueString()
                << "] not found in model\n";
          return false;
        }
      }
      return true;
    }

    // Called by the world update start event
    public: void OnUpdate()
    {
      this->left_wheel_joint_->SetForce(0, 0.2);
      this->right_wheel_joint_->SetForce(0, -0.2);
    }

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

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

    private: physics::JointPtr left_wheel_joint_;
    private: physics::JointPtr right_wheel_joint_;
  };

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

I tested the plugin using std::cerr for the moment. And I didn't get my platform moving, because the plugin couldn't find my joints. I tried using the names with and without the namespace of my sdf-file. And in Gazebo I can see those names.

The plugin doesn't get further than to this point:

if (!_sdf->HasElement(_param))
          {
            // original plugin code
            gzerr << "param [" << _param << "] not found\n";

            // My call without using the macro
            //common::Console::Instance()->ColorErr("Error", __FILE__, __LINE__, 31)
            //      << "param [" << _param << "] not found\n";
            return false;
          }

Tia, Christoph

2015-10-31 12:30:12 -0600 marked best answer Bumper or Contact Plugin

Hey everyone,

I am trying to implement some contact sensors for my robot model. I use the drcsim package as an orientation for available plugins.

I am wondering whether to use the gazebo_ros_bumper or the ContactModelPlugin plugin and what is the big difference between those two?

In my case "standard" information about collisions would work for me at the moment, like position of the collision and timing.

Thanks for your help

Christoph

2015-10-31 12:11:59 -0600 marked best answer Modelling environments (simple test environment) for gazebo

Hi all,

for some tests and validation between our real robot and my simulated robot I want to build a simple environment in Gazebo (recreation of a simple floor or room in our university).

Which program or tool would you propose to for this task (without the need of studying a whole book before)?

Thanks for your help,

Christoph

2015-08-28 12:49:03 -0600 marked best answer Controller / PID for controlling joints through multiple values (acceleration, velocity, position)

Hi all,

I am trying to control my simulated robot arm using a ROS action client / action server environment. In this context I'll be given a FollowJointTrajectoryGoal with all the trajectory points and for every trajectory point the required acceleration, velocity and position for all joints.

I am not sure how to set and control all theses values together. Our real robot can directly work with all theses values. To control the wheels of my robot base I use a pid that uses velocity values only.

Thanks for your help,

Christoph

2015-04-11 22:21:08 -0600 received badge  Self-Learner (source)
2015-01-03 18:47:32 -0600 received badge  Famous Question (source)
2015-01-03 18:43:24 -0600 received badge  Favorite Question (source)
2014-11-11 11:11:16 -0600 received badge  Famous Question (source)
2014-10-08 06:06:31 -0600 received badge  Notable Question (source)
2014-08-08 22:51:38 -0600 received badge  Nice Question (source)
2014-08-08 22:51:34 -0600 marked best answer Timing / Synchronisation between Gazebo and ROS

Hi everyone,

I got a question regarding the timing in Gazebo and ROS.

I have a robot which uses Gazebo plugins and some ROS packages. In my plugins I use ros::Time::now() for everything I send outside of Gazebo (normally ros messages) and the ROS packages also (seem to) use ROS time. Only for Gazebo components, like my pid's, I use gazebo simulation time. ROS packages I use are for example move_base and gmapping.

My experiences with Gazebo are, that I have to restart the environment from time to time, when I delete my running robot and want to respawn it. Otherwise Gazebo would crash and I have to restart it anyways.

Now this is what happens and I am aiming at with my question: Sometimes during the simulation process, normally after restarting Gazebo, one of the ROS nodes won't work anymore because of bad/old messages coming from Gazebo. This I don't fully understand because they should use ROS time instead of Gazebo simulation time and it works fine at the first time I spawn my robot. Using the rqt gui I can see the /clock topic getting information from Gazebo, going to one of the ros nodes. I have to use rosparam to set simtime to false. After that it normally works again.

What are your experiences and advice with timing between Gazebo and ROS and how to handle it?

Can I disable simulation time in Gazebo sdf files?

It would be nice to have an equal timing between all those components. An equal simulation time may be nice to have in further developments.

Thanks in advance

Christoph

2014-07-02 10:58:55 -0600 received badge  Famous Question (source)
2014-06-13 19:45:19 -0600 received badge  Teacher (source)
2014-06-13 19:45:19 -0600 received badge  Self-Learner (source)
2014-03-07 13:27:36 -0600 received badge  Famous Question (source)
2014-01-22 17:10:01 -0600 marked best answer Installing Gazebo 1.9 and gazebo_ros_pkgs from source (missing package cmake_modules).

Hi all,

after having some problems with my already working gazebo ros plugins and the new gazebo_ros_pkgs (see my question 3557) I tried to reinstall all components (ros groovy, Gazebo and gazebo_ros_pkgs - all Gazebo parts from source) following the tutorials http://gazebosim.org/wiki/1.9/install and http://gazebosim.org/wiki/Tutorials/1.9/Installing_gazebo_ros_Packages. At the point where I had to build the gazebo_ros_pkgs (with catkin_make) I got the following error message:

CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
  Could not find a configuration file for package cmake_modules.

  Set cmake_modules_DIR to the directory containing a CMake configuration
  file for cmake_modules.  The file will have one of the following names:

    cmake_modulesConfig.cmake
    cmake_modules-config.cmake

Call Stack (most recent call first):
  ros_control/transmission_interface/CMakeLists.txt:31 (find_package)

CMake Error at ros_control/transmission_interface/CMakeLists.txt:37 (find_package):
  Could not find module FindTinyXML.cmake or a configuration file for package
  TinyXML.

  Adjust CMAKE_MODULE_PATH to find FindTinyXML.cmake or set TinyXML_DIR to
  the directory containing a CMake configuration file for TinyXML.  The file
  will have one of the following names:

    TinyXMLConfig.cmake
    tinyxml-config.cmake

CMake Error at /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:156 (message):
  catkin_package() DEPENDS on 'TinyXML' which must be find_package()-ed
  before.  If it is a catkin package it can be declared as CATKIN_DEPENDS
  instead without find_package()-ing it.
Call Stack (most recent call first):
  /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  ros_control/transmission_interface/CMakeLists.txt:40 (catkin_package)

-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

It seemed to me, that I got this error message before as I tried another way of reinstalling gazebo with the pre-compiled binaries. And I am not sure if I am the only one with this error.

I'll directly post my solution.

Cheers, Christoph

2014-01-19 20:38:43 -0600 received badge  Notable Question (source)
2014-01-07 13:39:16 -0600 received badge  Famous Question (source)
2013-12-19 04:11:44 -0600 received badge  Notable Question (source)
2013-12-11 10:48:11 -0600 received badge  Notable Question (source)
2013-12-07 01:40:17 -0600 received badge  Popular Question (source)
2013-11-29 11:59:29 -0600 received badge  Famous Question (source)
2013-11-28 16:44:28 -0600 asked a question Contact sensor generates no contact information using gazebo_ros_bumper plugin

Hi everyone,

I am trying to get the gazebo_ros_bumper plugin to work.

All information I can see are the rising time steps, when I am listening to the topic via rostopic. The states array stays empty.

I used a predifined robot from the gazebo database as an obstacle to avoid colliding with a model in "resting state" like in the attached picture. But this doesn't seem to work either.

image description

This is how I implement the plugin in my SDF model.

<link name="bumper_base"> <pose>-0.075 0 0.05 0 0 0</pose> <inertial> <mass>0.01</mass> </inertial> <collision name="bumper_base_collision"> <pose>0.0 0 0 0 0 0</pose> <geometry> <cylinder> <radius>0.33</radius> <length>0.03</length> </cylinder> </geometry> </collision> <visual name="bumper_base_visual"> <pose>0 0 0 0 0 0</pose> <geometry> <cylinder> <radius>0.33</radius> <length>0.03</length> </cylinder> </geometry> <material> <ambient>0.83 0.55 0.09 1</ambient>
</material> </visual>

   <collision name="bumper_tail_collision">
        <pose>-0.30 0 0   0 0 0</pose>
        <geometry>
            <cylinder>
                <radius>0.18</radius>
                <length>0.03</length>
            </cylinder>
        </geometry>
    </collision>
    <visual name="bumper_tail_visual">
        <pose>-0.30 0 0   0 0 0</pose> 
        <geometry>
            <cylinder>
                <radius>0.18</radius>
                <length>0.03</length>
            </cylinder>
        </geometry>
        <material>
            <ambient>0.83 0.55 0.09 1</ambient>
        </material>
    </visual>


    <sensor name="bumper_front" type="contact">
        <always_on>true</always_on>
        <update_rate>10</update_rate>
        <visualize>true</visualize>
        <pose>0 0 0   0 0 0</pose>
        <topic>bumper_base</topic>
        <contact>
            <collision>bumper_base_collision></collision>
            <topic>bumper_base</topic>
        </contact>

        <plugin name="gazebo_ros_laser" filename="/home/christoph/catkin_workspace_groovy/devel/lib/libgazebo_ros_bumper.so">
            <bumperTopicName>bumper_base</bumperTopicName> 
            <frameName>bumper_base</frameName>
        </plugin> 
    </sensor>
</link>



<!-- Bumper Joint -->
<joint name="bumper_front_joint" type="revolute">
    <pose>0  0  0  0  0  0</pose>
    <parent>base_link</parent>
    <child>bumper_base</child>
    <axis>
        <xyz>1 0 0</xyz>
        <limit>
            <upper>0</upper>
            <lower>0</lower>
        </limit>
    </axis>
</joint>

My plan is to check the size of the state array from the contact message to see if there are any collisions.

Is it correct, that the callback function will recieve messages in the given update_rate even if there aren't any collisions? And is this necessary or is it possible to only get messages when a collision is detected?

Update 1:

I tried to get a collision reaction by building a collision obstacle like in this tutorial: link

But that didn't change anything.

Thanks in advance, Christoph

2013-11-28 16:41:47 -0600 received badge  Popular Question (source)
2013-11-22 03:41:36 -0600 commented answer Real Time Factor going down after insertion of a "simple" test room

Hi! I took a simpler model of my floor and the real time factor went up a bit. Maybe I will try to make it even more simpler. Thanks for your help!

2013-11-19 18:31:36 -0600 received badge  Popular Question (source)