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

expcectedCycleTime in Ros2

asked 2020-04-22 05:32:11 -0500

pfedom gravatar image

Hi! I am migrating a ros1 melodic program to Ros2 eloquent at the moment and I was wondering if there is a function similar to "expectedCycleTime". I use ros rate to create a loop cycle. Now i want to get dynamic access to the Rate that is set.

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-22 18:41:25 -0500

tfoote gravatar image

updated 2020-04-22 18:42:02 -0500

You can get the period of the Rate object using the period() method which is the the inverse of the "expectedCycleTime". The API was changed to be clearer about exactly what that datatype is returning. A cycle time is not clearly a rate.

API docs: http://docs.ros2.org/eloquent/api/rcl...

edit flag offensive delete link more

Comments

Thank you for the quick help!

pfedom gravatar image pfedom  ( 2020-04-23 04:00:10 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-22 05:32:11 -0500

Seen: 235 times

Last updated: Apr 22 '20