ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Using Orocos with Gazebo

asked 2011-05-24 00:04:43 -0500

Jeroen gravatar image

I would like to use Orocos in combination with Gazebo i.e. the control/kinematics is in Orocos and I would like to use Gazebo for the simulation
So now I have the following:
* A ROS-node publishes the joint states and reads the control signal from topics.
* An Orocos-component publishes the control signal and reads the joint states from topics.

So basically I'm using the pr2_mechanism for the ROS-node. My Orocos components are running at 1 kHz in real time. The movement, according to the control signal, in Gazebo is also in real time but how does this relate to the simulation time of Gazebo. The simulation time is about 0.25 of the real time.

So what is the effect of this timing on the physics in simulation, if any?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-05-29 20:02:50 -0500

The Orocos component is not synchronized with the Gazebo simulation. Can you check the frequency of the data that is spit out by gazebo? Having your controller running faster than this usually makes no sense ;)

You could make your controller data driven, which means it will do a new control-loop when new data is available by adding your InputPorts as EventPorts: addEventPort(your_inputport) and making the component NOT periodic. Then the component will only wake up when new data is received. You can find more information here:

This way your controller will be synchronized with gazebo, it will still be realtime but it will probably not run at 1 kHz.

edit flag offensive delete link more

answered 2011-05-27 03:59:38 -0500

KoenBuys gravatar image

What do you want to achieve? A simulated real-time behaviour? Are your inputs event driven?

edit flag offensive delete link more

Question Tools


Asked: 2011-05-24 00:04:43 -0500

Seen: 677 times

Last updated: May 29 '11