Robotics StackExchange | Archived questions

Control loop missed its desired rate

Hello, I have a problem when I build the navigation stack (devel indigo) that i did never face when I installed it with using sudo apt-get install ros-indigo-navigation, the problem is that the control loop is missing its desired rate of 5hz, the local costmap size is 3m by 3m and its resolution is 0.05. Here is the warning that i am getting:

[ WARN] [1524125112.095931256]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.2046 seconds
[ INFO] [1524125112.491546356]: Got new plan
[ WARN] [1524125114.698599014]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.2072 seconds
[ INFO] [1524125115.491465052]: Got new plan
[ WARN] [1524125116.108928896]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.2176 seconds
[ INFO] [1524125116.491496231]: Got new plan
[ WARN] [1524125116.808921642]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.3176 seconds
[ WARN] [1524125117.296804175]: Control loop missed its desired rate of 5.0000Hz... the loop actually took 0.2054 seconds
[ INFO] [1524125117.491502162]: Got new plan
[ INFO] [1524125118.491515789]: Got new plan

As I stated before this never happened before with the same exact configurations. Also this problem disappears when I restart the robot and the it drives perfectly, and appears again after few restarts and the robots starts to have "unsmooth movements". Thank you in advance.

Edit: now even when I returned to using the debs this problem still occurs.

Asked by starter on 2018-04-19 03:15:39 UTC

Comments

Have you made sure to compile it with optimisations turned on (ie: CMAKE_BUILD_TYPE=Release)?

Asked by gvdhoorn on 2018-04-19 03:53:28 UTC

Yes, still the same exact problem.

Asked by starter on 2018-04-19 03:55:59 UTC

how it is supposed to compile navigation stack with optimisation flags? we just do sudo apt-get install ros-kinetic-navigation, dont we?

Asked by june2473 on 2019-12-04 02:57:48 UTC

The OP mentioned he had built navigation from source, before installing the Debian packages.

If you installed using apt, you don't need to build anything yourself.

Asked by gvdhoorn on 2019-12-04 03:37:04 UTC

ok, got it! thanks

Asked by june2473 on 2019-12-04 23:21:30 UTC

Answers

This happens when processing takes more time than the one set by the controller frequency. As a result the calculated velocities do no match the preset publish frequencies and you notice jerks in movement. Could you monitor your CPU usage? If you see this happen after running for a while, it might be the case that your CPU usage is higher due to other processes.

Asked by robotchicken on 2018-04-26 20:40:01 UTC

Comments

Actually i found the problem and it was that in the amcl parameters i set transform_tolerance too low so it does not match the TF publishing frequency and that causes the delay in the controller loop. So i solved the problem by setting the transform_tolerance to 0.3 and everything works fine.

Asked by starter on 2018-04-27 03:20:43 UTC

@starter yes it should be the issue. I also solved my issue with your comment thanks

Asked by saikishor on 2019-01-18 11:20:32 UTC