Gazebo | Ignition | Community
Ask Your Question
0

DRCSIM clock is published more than 1khz....

asked 2013-03-23 20:14:06 -0600

Luis Filipe Rossi gravatar image

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...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-23 22:54:14 -0600

cga gravatar image

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

edit flag offensive delete link more

Comments

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.

Luis Filipe Rossi gravatar imageLuis Filipe Rossi ( 2013-03-24 20:13:06 -0600 )edit

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.

Luis Filipe Rossi gravatar imageLuis Filipe Rossi ( 2013-03-24 20:13:07 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-23 20:14:06 -0600

Seen: 227 times

Last updated: Mar 23 '13