ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Sleep time is larger than clock resolution, skipping sleep

asked 2015-02-04 07:06:14 -0500

emresav gravatar image

Hello,

I am using Ubuntu14. Everytime i launch turtlebot(gazebo) in ROS Indigo, i am constantly getting the following warning:

"warning [Time.cc.205] Sleep time is larger than clock resolution, skipping sleep"

Does anyone know why?

Thanks, Emre

edit retag flag offensive close merge delete

Comments

I got the same problem. Any one??

kevin.kuei.0321@gmail.com gravatar image kevin.kuei.0321@gmail.com  ( 2015-09-23 04:38:14 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-09-23 21:52:52 -0500

kevin.kuei.0321@gmail.com gravatar image

I finally found out how to fix it.

you can remove the "acpi=off" in /etc/default/grub and run update-grub, and reboot

you got it!!

edit flag offensive delete link more
0

answered 2015-12-12 18:39:52 -0500

updated 2015-12-12 18:47:07 -0500

I am seeing the same thing with Indigo, Ubuntu 14.04, Gazebo 2.2 in a Hyper-V hosted virtual machine. acpi is not off in the grub config. I think it is to do with the Linux kernel not picking up the virtualised hardware as a high resolution clock.

Kernel patch found here would probably resolve it for those keen enough to re-roll the kernel; http://permalink.gmane.org/gmane.linu...

Another solution would be to grab the gazebo-2.2 code, downgrade the warning to a log or debug message like it probably should be and re-compile. There is a comment above the offending warning in the source that says;

/// \TODO Make this a gzlog
gzwarn << "Sleep time is larger than clock resolution, skipping sleep\n";

So its probably a good call. Recompiling gazebo takes a while though.

Another possible solution is to slow down gazebo's update rate so that the sleep call that generates this warning is longer than the reported cpu's clock resolution. Though I tried this without success.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-02-04 07:06:14 -0500

Seen: 980 times

Last updated: Dec 12 '15