xarm_ros icon indicating copy to clipboard operation
xarm_ros copied to clipboard

sleep_sec ROS topic

Open swiz23 opened this issue 4 years ago • 3 comments

What does this ROS topic do?

swiz23 avatar Dec 23 '20 23:12 swiz23

Hi, this is to tell the controller to sleep for some time (in seconds) before executing next command.

penglongxiang avatar Dec 24 '20 08:12 penglongxiang

So you publish to the topic once in the beginning of your program to tell the controller how long to sleep between any number of future commands? Or you publish to the topic after any command you want it to sleep at?

What's the advantage of this over rospy.sleep(), time.sleep(), or the cpp equivalent?

swiz23 avatar Dec 24 '20 16:12 swiz23

So you publish to the topic once in the beginning of your program to tell the controller how long to sleep between any number of future commands? Or you publish to the topic after any command you want it to sleep at?

What's the advantage of this over rospy.sleep(), time.sleep(), or the cpp equivalent?

It is the later case. Use this topic only where sleep is needed. The advantage would be perhaps its accuracy, sometimes the sleep() function in user PC may get pre-empted by OS (especially Windows) and have unpredictable delay. This sleep instruction is performed inside controller box's real-time system.

penglongxiang avatar Dec 25 '20 10:12 penglongxiang