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

Ros2 Stopwatch

asked 2020-05-14 11:36:51 -0500

pfedom gravatar image

Hi guys,

I want to implement a timer thats working like a stopwatch to check if my joy_node is continously sending messages. Everytime it gets called the timer starts and if it doesnt get called again in a certain time I can start another event, for example to make sure the robot stops. If the function gets called again (because the joy_node keeps sending messages) the timer just resets and the stop event doesnt get called.

Is there a timer function for doing this in ROS 2? (eloquent)

Sorry if the answer is obvious and I didnt find it.

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-05-14 12:14:29 -0500

tfoote gravatar image

This is commonly called a watchdog timer. I don't think that we have a specific timer to implement this.

I would also recommend that you look at the Deadline QoS documented here: https://design.ros2.org/articles/qos_...

edit flag offensive delete link more

Comments

Thank you! I tried a bit with "Deadline" but ended up with a new question about how to use it properly. https://answers.ros.org/question/3524...

pfedom gravatar image pfedom  ( 2020-05-16 07:41:55 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-14 11:36:51 -0500

Seen: 287 times

Last updated: May 14 '20