Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
101 stars 21 forks source link

Slow down RobotStatus publication #12

Open gavanderhoorn opened 1 year ago

gavanderhoorn commented 1 year ago

We currently publish RobotStatus at the same rate as JointState.

That's unnecessary, and also different from how MotoROS1 did/does it.

High frequency publications come with drawbacks. They:

  1. increase network traffic
  2. increase load on the Agent
  3. potentially increase latency of other publications
  4. increase load on controller CPU (ie: retrieving the information needed for the message, populating and publishing it are not free)
  5. increase CPU load for subscribers on the ROS 2 side (for topics > 100 Hz this can become quite significant)

With this in mind, combined with the fact the information carried by RobotStatus messages is largely static and/or changes (very) infrequently, we should reduce the publication frequency to something like 10 Hz as it was in motoman_driver.

gavanderhoorn commented 1 year ago

It might be nice to allow this rate to be configured, independently of the rates of the executors.

gavanderhoorn commented 1 year ago

A comment I received on this: in_motion is part of the RobotStatus publications.

Reducing the update rate on robot_status would also complicate tracking motion status at a high frequency.

For certain applications it's advantageous to have access to information about whether or not a robot is in_motion with the minimum amount of a delay possible.

I'm not sure what a good way forward would be here.