JdeRobot / RoboticsAcademy

Learn Robotics with JdeRobot
https://jderobot.github.io/RoboticsAcademy
GNU General Public License v3.0
313 stars 222 forks source link

[Amazon Warehouse] Add getSimTime() function in HAL module #2606

Closed lu164 closed 2 months ago

lu164 commented 2 months ago

HAL.getSimTime() function returns the simulation time

pawanw17 commented 2 months ago

Hi @lu164 why is this method needed?

jmplaza commented 2 months ago

For an advanced way of Path Planning in OMPL, a way that takes into account control restrictions of the mobile robot. With it OMPL delivers a temporal sequence of linear speed and rotation speeds (V,W) as the output plan.

That plan execution requires indexing in the sequence using time, "real" time. In fast machines, with Gazebo RTF close to 1, the wall clock time and the simulated time are quite similar, but in slow machines they diverge soon. In such slow machines, using the wall clock time results in a wrong plan execution, but using simulated time provides better plan executions and paths.