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

Timer callbacks not working

asked 2011-03-13 17:33:03 -0500

Bart gravatar image

updated 2014-01-28 17:09:20 -0500

ngrennan gravatar image

Previously working timers in some of my packages/nodes have stopped working. The roscpp_tutorials/Tutorials/Timers example doesn't work either as the timer callbacks never execute. The program aborts normally with ctrl-C from the spin function.

I am using Ubuntu 10.04, Diamondback and an Acer AX3400 (AMD Athlon II). Internet searches haven't uncovered any other examples of this problem. Hints?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2011-03-15 13:43:09 -0500

Bart gravatar image

Yes! Bhaskara, your suggestion was very insightful.

I have been keeping fairly comprehensive notes during development and one of the last things I did before the problem occurred most recently was: "roslaunch erratic_description erratic_laser_wg_world.launch". I then killed the processes with ctrl-C from the terminal, but the nodes still show up in rxGraph as failed. Executing "rosnode cleanup" doesn't seem to fix the timer problem.

Following up on your suggestion, "rosparam get /use_sim_time" showed TRUE. "rosparam set /use_sim_time false" corrected the timer problem.

Thanks again for your suggested solution to an issue that could have continued to tease me for quite some time. (and may your karma points increase substantially)

edit flag offensive delete link more
7

answered 2011-03-15 01:42:15 -0500

bhaskara gravatar image

Did you possibly have the /use_sim_time parameter set to True, and no simulator or publisher to /clock running?

edit flag offensive delete link more
1

answered 2011-03-14 16:28:05 -0500

Straszheim gravatar image

updated 2011-03-14 16:29:16 -0500

I can't reproduce this on 10.04 or 10.10 with diamondback:

% ./bin/timers
[ INFO] [1300163272.915589903]: Callback 1 triggered
[ INFO] [1300163273.015990217]: Callback 1 triggered
[ INFO] [1300163273.115590082]: Callback 1 triggered
[ INFO] [1300163273.216186940]: Callback 1 triggered
[ INFO] [1300163273.315749665]: Callback 1 triggered
edit flag offensive delete link more
0

answered 2011-03-14 16:39:37 -0500

Bart gravatar image

This is going to be a difficult problem to troubleshoot because the timers are working today after restarting my computer. The timers are working on both the tutorial program and my other roscpp programs that use timers. They are working for both rosmake and Eclipse development. I had this particular problem once before, but it went away quickly enough that it wasn't an issue.

I will try to keep a better record of what changes/activities have taken place when/if it happens next time, but for now I can't provide adequate background information to assist others to duplicate the problem unless they have experienced it independently.

Thanks for trying.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-03-13 17:33:03 -0500

Seen: 3,238 times

Last updated: Mar 15 '11