I am doing a very complex calculation inside a node using some other libraries. The node is...
- doing the calculation in an endless loop
- it is calculating from the last calculation to ROS::Timer::Now()
- Example:
while(true){ do_some_expensive_calculation_and_publish(from=last_calculation_point, to=ROS::Time::Now()); last_calculation_point = ROS::Time::Now(); }
Unfortunately ROS time is running way faster than I can do the calculation. Therefore I would need to slow down ROS/Gazebo somehow in order to get the result of the calculation before the next one should begin. Otherwise it takes longer an longer to get the calculation results since the time since the last calculation increases.
How to do that properly?