0
$\begingroup$

Gazebo Answers logo

Hello,

I was creating a TCP/IP connection between my ROS node and Simulink to monitor and control the DRC Robot.

I was sending a TCP/IP message every time the simulation clock is published, and as Matlab is able block simulation to wait a message, i can "synchronize" my Simulink application with the clock callback (as long my IPC latency is small).

However i was noticing that Simulink simulation was counting time much faster than it should.

In order to understand what was going on i created a simple counter at my C++ ROS node that count up every time clock is published. Printing that value i noticed that it is growing up much faster than 1000/simulation_second (I believe about 3 times faster). The value carried by the clock structure is indeed correct.

Any help on that? Can we count that the clock will be published at 1khz (as stated at the user guide)? Or should i monitor its value...


Originally posted by Luis Filipe Rossi on Gazebo Answers with karma: 43 on 2013-03-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

If you were running the BDI simulation its clock runs at 3kHz. Make sure dt is 0.001 and update rate is 1000 in the world file. If update rate is 0 the simulation runs faster than real time. Chris


Originally posted by cga with karma: 223 on 2013-03-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Luis Filipe Rossi on 2013-03-24:
Thank you that solves my doubt. I decreased the update rate to 100 (0.1 max real time factor) so i my Simulink application is able to control the robot with no problem. Is slow but great for proof of concept.

Comment by Luis Filipe Rossi on 2013-03-24:
Thank you that solves my doubt. I decreased the update rate to 100 (0.1 max real time factor) so i my Simulink application is able to control the robot with no problem. Is slow but great for proof of concept.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.