Home | Tutorials | Wiki | Issues
Ask Your Question

peshala's profile - activity

2015-10-31 12:30:49 -0500 marked best answer What is the difference between a Plugin and a Sensor

Hello all,

In http://gazebosim.org/wiki/Tutorials/1.4/usingtheros_plugins it says that "The imu sensor and the imu plugin are different because the ros plugin use a model plugin and not a sensor plugin."

What exactly is different between a plugin and a sensor? Can't we create camera plugin or camera sensor with the same behavior?


2015-10-31 12:30:25 -0500 marked best answer How to GDB a plugin with gazebo standalone and ROS

Hi all,

I am running Gazebo 1.7.1 and my plugin does not get loaded with the following error.

Error [Plugin.hh:126] Failed to load plugin .......

undefined symbol: _ZTIN6gazebo9RayPluginE

I tried GDBing gazebo with $gdb gazebo and (gdb) run to find the error but it is not working. How should you GDB a plugin correctly?

===================================== Question Edit

I ran the gzclient and gzserver separately with GDB. The gzserver gave the following backtrace:

#0  0x0000000000000000 in ?? ()
#1  0x000000000042ce89 in boost::detail::shared_count::~shared_count() ()
#2  0x00007fff9150fcfa in ros::SerializedMessage ros::serialization::serializeMessage<rosgraph_msgs::log_<std::allocator<void> > >(rosgraph_msgs::Log_<std::allocator<void> > const&) () from /opt/ros/groovy/lib/libroscpp.so
#3  0x00007fff9150ec6d in boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<ros::serializedmessage, ros::serializedmessage="" (*)(rosgraph_msgs::log_<std::allocator<void=""> > const&), boost::_bi::list1<boost::reference_wrapper<rosgraph_msgs::log_<std::allocator<void> > const> > >, ros::SerializedMessage>::invoke(boost::detail::function::function_buffer&) ()
   from /opt/ros/groovy/lib/libroscpp.so
#4  0x00007fff914c7f36 in ros::TopicManager::publish(std::string const&, boost::function<ros::serializedmessage ()=""> const&, ros::SerializedMessage&) ()
   from /opt/ros/groovy/lib/libroscpp.so
#5  0x00007fff9150cab3 in ros::ROSOutAppender::logThread() ()
   from /opt/ros/groovy/lib/libroscpp.so
#6  0x00007ffff5d2fce9 in thread_proxy ()
   from /usr/lib/libboost_thread.so.1.46.1
#7  0x00007ffff6897e9a in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff50d8cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()`

any ideas?

Thank you

2015-10-31 12:30:21 -0500 marked best answer gazebo standalone ROS plugin crashes

Hello all,

I am using gazebo 1.7.1 standalone with Ros-Groovy and I want to write a plugin that works with ROS.

Actually, I wanted to recreate the plugin found @ simulator_gazebo/gazebo_plugins/src/gazebo_ros_p3d.cpp and I followed the tutorial at http://gazebosim.org/wiki/Tutorials/1.5/ros_enabled_model_plugin even though it states "This tutorial may not work with Gazebo Quantal and Ros-Groovy"

When my model (with the plugin) is inserted, standalone gazebo crashes with gazebo: symbol lookup error: ../my_gazebo_plugins/lib/libmy_gazebo_ros_p3d.so: undefined symbol: _ZN2tf7resolveERKSsS. (gdb gazebo is not working)

According to the tutorial, I have created rospack.cmake, CMakeLists.txt, and GAZEBO_PLUGIN_PATH is appended. My manifest.xml includes only <depend package="roscpp"/> Also I am still using the rosbuild not catkin.

What am I missing?

Thanks in advance


2015-10-31 12:30:18 -0500 marked best answer system plugin to publish /clock from gazebo 1.7.1 standalone to ROS


I have not installed simulator_gazebo in ros-groovy and currently working with gazebo standalone 1.7.1. I need to publish /clock as in simulator_gazebo. I figured that it was done by the gazebo_ros_api_plugin. However, gazebo_ros_api_plugin do much more than publishing /clock and I isolated the following parts for my purpose. But, still it seems something is missing as /clock is not advertised. Any help would be appreciated.

Also, how do you run the gzclient with this plugin? I tried with gzclient -g libmy_gazebo_ros_clock.so and it didnt work.

Thank you

#include <my_gazebo_plugins gazebo_ros_clock.h="">

namespace gazebo

    this->world_created_ = false;

// Destructor
    // Finalize the controller
    delete this->rosnode_;

    // shutdown ros queue
    delete this->gazebo_callback_queue_thread_;

/// \brief ros queue thread for this node
void SystemClock::gazeboQueueThread()
    ROS_DEBUG_STREAM("Callback thread id=" << boost::this_thread::get_id());
    static const double timeout = 0.001;
    while (this->rosnode_->ok())

void SystemClock::Load(int argc, char** argv)
    // setup ros related
    if (!ros::isInitialized())
        ROS_ERROR("Something other than this gazebo_ros_api plugin started ros::init(...), command line arguments may not be parsed properly.");

    this->rosnode_ = new ros::NodeHandle("~");

    /// \brief setup custom callback queue
    gazebo_callback_queue_thread_ = new boost::thread(&SystemClock::gazeboQueueThread,this);

    // below needs the world to be created first
    this->load_gazebo_ros_clock_plugin_event_ = event::Events::ConnectWorldCreated(boost::bind(&SystemClock::LoadGazeboClockPlugin,this,_1));

void SystemClock::LoadGazeboClockPlugin(std::string _worldName)
    // make sure things are only called once
    if (this->world_created_)

    // set flag to true and load this plugin
    this->world_created_ = true;

    this->world = physics::get_world(_worldName);
    if (!this->world)
        ROS_FATAL("cannot load gazebo ros api server plugin, physics::get_world() fails to return world");

    this->gazebonode_ = transport::NodePtr(new transport::Node());

    // publish clock for simulated ros time
    pub_clock_ = this->rosnode_->advertise<rosgraph_msgs::clock>("/clock",10);
    // set param for use_sim_time if not set by user alread
    this->rosnode_->setParam("/use_sim_time", true);

    this->time_update_event_   = event::Events::ConnectWorldUpdateStart(boost::bind(&SystemClock::publishSimTime,this));

/// \brief
void SystemClock::publishSimTime(const boost::shared_ptr<msgs::worldstatistics const=""> &msg)
    common::Time currentTime = msgs::Convert( msg->sim_time() );
    rosgraph_msgs::Clock ros_time_;
    //  publish time to ros
void SystemClock::publishSimTime()
    common::Time currentTime = this->world->GetSimTime();
    rosgraph_msgs::Clock ros_time_;
    //  publish time to ros

// Register this plugin with the simulator


2015-10-31 12:26:16 -0500 marked best answer IMU sensor plugin in drcsim

hi all,

where does the .cpp code exist for this imu plugin. This is from

drcsim / ros / atlas_description / urdf / atlas.gazebo 

  <gazebo reference="imu_link">
    <sensor name="imu_sensor" type="imu">


2015-10-31 12:26:15 -0500 marked best answer How to convert a .urdf file to .sdf 1.4 format

Hello all,

gzsdf print pr2.urdf > pr2.sdf gives errors in gazebo 1.7.1

Error [parser.cc:719] XML Element[turnGravityOff], child of element[link] not defined in SDF. Ignoring.[link]
Error [parser.cc:710] Error reading element <link>
Error [parser.cc:710] Error reading element <model>
Error [parser.cc:369] Unable to read element <sdf>
Error [parser.cc:291] parse as old deprecated model file failed.

why does gzsdf fail?

Thank you

2015-10-31 12:12:27 -0500 marked best answer Parameters for ROS Gazebo block laser plugin

Hello all,

Can somebody tell me the parameters for ROS Gazebo block laser plugin? I am using ROS-Groovy with gazebo 1.7.1 standalone.

Seems the following syntax is no longer valid

      <maxAngle> 15</maxAngle>


      <verticalMaxAngle>  0</verticalMaxAngle>


2015-06-26 09:35:24 -0500 received badge  Famous Question (source)
2015-06-07 17:11:05 -0500 received badge  Famous Question (source)
2014-11-13 01:42:55 -0500 marked best answer Z Offset of the grid in gazebo

Hi all,

I just noticed that there is an z offset of the grid in gazebo. When a model is inserted this is clearly visible. image description

When I get a laser pointcloud using a tilting laser there is a similar offset visible and the robot appears to be floating; I guess there is a connection between this and the above. image description This is from rviz in ROS.

Is this a bug?

+++++ Edit +++++

world file <sdf version="1.4"> <world name="3D_odom_test">

    <!-- ground plane -->

    <!-- sun -->

    <!-- rover -->

</world> </sdf>

2014-11-12 19:59:35 -0500 received badge  Famous Question (source)
2014-09-22 02:41:20 -0500 received badge  Popular Question (source)
2014-09-22 02:41:20 -0500 received badge  Notable Question (source)
2014-07-09 14:27:59 -0500 received badge  Famous Question (source)
2014-07-04 09:49:33 -0500 received badge  Notable Question (source)
2014-07-04 09:49:33 -0500 received badge  Popular Question (source)
2014-06-26 21:34:50 -0500 answered a question How do I make a URDF file based on an sdf file?

Please see the discussion in here

2014-05-27 21:20:57 -0500 answered a question Can we convert a .sdf file to .urdf. I need to use the file in MoveIt. But it accepts only .urdf files.

No we can't. Have a look at link

I think the only way is to start with URDF and convert it to SDF.

Some additional Info that might be useful

  • Gazebo will continue to support URDF info.
  • Also, xacro helps you to systematically develop your robot using macros, which I think is not there in SDF. So, it is not a bad idea that you start with URDF
2014-05-22 01:03:37 -0500 received badge  Notable Question (source)
2014-05-21 02:20:54 -0500 asked a question How to set SDF 1.4 surface properties in URDF

Hi all,

Can anybody tell me how to set the following SDF 1.4 parameters,






using a URDF (or xacro) file.

By the way, why does link gives a somewhat different set of parameters?

Thank you in advance.

2014-05-21 01:52:04 -0500 commented question A simple question on changing bounce properties

@Ben B which URDF code worked finally?

2014-05-21 00:35:43 -0500 commented answer contact forces oscillating for a basic box shape on ground plane

@scpeters for accuracy purposes I changed the solver type from quick to world. But, then gazebo crashes. http://answers.gazebosim.org/question/6237/ode-with-solver-type-world-crashes/ any thoughts on that?

2014-05-21 00:33:24 -0500 received badge  Notable Question (source)
2014-05-20 04:14:38 -0500 commented question gps sensor in gazebo 1.9
2014-05-20 00:13:36 -0500 asked a question ODE with solver type "world" crashes

Hi all,

With the following:

    <physics type="ode">
        <gravity>0 0 -9.8</gravity>

Gazebo 1.9 crashes when a simple box is placed on the ground plane. Reducing the number of iterations did not solve the problem.

link explains a similar problem but does not answer the question fully.

Any help would be appreciated.

Thank you

2014-05-19 23:53:19 -0500 commented question Ode "world" VS "quick" method in Gazebo ROS Fuerte

I experience the same with a simple box on the ground; Gazebo 1.9 crashes. Cannot figure out why. https://bitbucket.org/osrf/gazebo/issue/351/opende-with-solver-type-world-contacts seems still open

2014-05-18 20:57:56 -0500 commented question Why my car jumps off the ground when it moves from steep road to flat road? (video)

my initial thought was that the car settles like floating on the ground at the very end of the video. so may be the collision and visual properties are not aligned properly for the final flat road. can you check on that.

2014-05-14 12:30:02 -0500 received badge  Popular Question (source)
2014-05-09 19:43:54 -0500 commented question Question about the difference between installing Gazebo by sudo apt-get install gazebo and from source?

you could still use the .deb packages but download the source just for you reference (without need to compile it)

2014-05-09 15:57:25 -0500 received badge  Popular Question (source)
2014-05-08 23:02:47 -0500 answered a question How to get the distance between two objects (meshes)


One way of doing is writing a plugin similar to p3d (LINK) and iterating through all the models in the simulation world and getting the relative position between your robot and all those models.

Hope it helps!

2014-05-08 22:49:26 -0500 answered a question Accurate bumper simulation


You can use the ros bumper plugin: link

An example at link text

Hope it helps!

2014-05-08 22:38:02 -0500 asked a question contact forces oscillating for a basic box shape on ground plane

Hi all,

In my simulation I have a simple box on the ground plane with the following parameters:

Dimensions: 1[m]x1[m]x1[m]
Moment of Inertia: ixx=0.166666667 iyy=0.166666667 izz=0.166666667
Mass: 1[kg]

As seen from this youtube video the contact forces are oscillating for this simple setup. Using the ros bumper plugin it was confirmed on rviz (youtube video) as well. When the moment of inertia was changed to deafult values (ixx=1.0 iyy=1.0 izz=1.0) there was no such oscillations as seen by:C:\fakepath\gazebo-stable.jpg

According to ODE wiki ODE engine has an accuracy issue. So, does that mean I cannot use it for example, calculating collision forces, torques in simulation?

Can anyone let me know some examples where collision forces have been used apart from ros bumper plugin.

Thank you in advance.


ps: I am using ros hydro with gazebo 1.9

2014-05-08 01:19:56 -0500 commented question reference frame for gazebo_ros_bumper

@nkoenig is this done to reduce to computational cost?

2014-05-01 01:47:41 -0500 asked a question reference frame for gazebo_ros_bumper

Hi all,

Why the following part commented out in gazebo_ros_bumper.cpp

  if (myFrame)
    frame_pose = myFrame->GetWorldPose();  //-this->myBody->GetCoMPose();
    frame_pos = frame_pose.pos;
    frame_rot = frame_pose.rot;
    // no specific frames specified, use identity pose, keeping
    // relative frame at inertial origin
    frame_pos = math::Vector3(0, 0, 0);
    frame_rot = math::Quaternion(1, 0, 0, 0);  // gazebo u,x,y,z == identity
    frame_pose = math::Pose(frame_pos, frame_rot);

So, it seems we always use the world frame.

Some discussion on this was found here but it does not answer my question.

Thanks in advance

2014-04-30 02:16:52 -0500 answered a question Gazebo as ROS node doesn't publish topics (odom, joint_states and tf) correctly


According to this remapping of gazebo topics is not yet possible.

Note that /odom, /joint_states and /tf are not published from gazebo. To publish /joint_states in your preferred namespace you can spawn the joint_state_controller from spawner node in controller_manager while changing the namespace as follows:

<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/robot1" args="joint_state_controller"

Also, remember to change the namespace in the plugin inside URDF/SDF file:

  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">

To publish /tf you need the robot_state_publisher. Do remapping:

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
  <remap from="/joint_states" to="/robot1/joint_states" />

So, for the multiple robots you may want to repeat the above again.

You can also wanna try

<group ns="robot1"> include robot1 stuff here </group>

check this, too


2014-04-16 23:14:59 -0500 commented answer Joint effort limits and realistic behavior

@nkoenig does gazebo impose any limits on joints? for e.g. in the gazebo gui, right most panel, we cannot apply force greater than 1000Nm. For a heavy platform, how can we apply high values?

2014-04-10 10:33:16 -0500 received badge  Famous Question (source)
2014-01-09 00:32:52 -0500 received badge  Famous Question (source)
2013-12-21 02:04:29 -0500 received badge  Notable Question (source)
2013-12-20 20:55:18 -0500 marked best answer Can we lock or freeze a moving joint?

Hi all,

I want the wheels of a mobile robot to lock, say on some given command, so that there is no need to run the wheel controllers, and upon an unlock command to go back to usual behavior. I saw in DRC http://gazebosim.org/wiki/DRC/UserGuide#Freeze that there is a freeze functionality. So, I was wondering whether this is possible or not.

Thank you