You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add the following ROS 2 parameters to control (and disable) unnecessary ROS 2 publications to improve robot performance:
31
-
*`publish_hazard_msgs`: default `true`. If set to false, the robot will not publish the `/hazard_detection` topic. This can noticeably reduce the CPU and RAM usage of the robot.
32
-
*`hazards_pub_fixed_period_ms`: default `15`. This controls whether the robot should publish hazard information even if the hazards are not changing. Set it to `-1` to disable fixed period hazard publications and have hazards be published only when they change. This parameter will be ignored if `publish_hazard_msgs` is set to `false`.
33
-
*`raw_kinematics_min_pub_period_ms`: default `1`. This controls the minimum period at which the robot should publish raw kinematics information. If set to `-1`, it will disable raw kinematics publications. This can noticeably reduce the CPU and RAM usage of the robot. Values higher than `1` can still give some CPU improvement, but won't help RAM usage.
34
-
*`publish_odom_tfs`: default `true`. If set to false, the robot will not publish odometry information in the `/tf` topic. This can reduce the CPU and RAM usage of the robot if not needed. Note: this parameter is not related to `raw_kinematics_min_pub_period_ms`
29
+
* Add ROS 2 parameter `wheels_stop_threshold_sec` to the `/motion_control` node. This parameter controls the amount of time that the robot will keep executing the last provided velocity command (on the `/cmd_vel` topic) before considering it stale and stopping the wheels. Default value is 0.5 seconds.
30
+
* Add the following ROS 2 parameters to the `/robot_state` node to control (and disable) unnecessary ROS 2 publications to improve robot performance:
31
+
*`publish_hazard_msgs`: default `true`. If set to false, the robot will not publish the `/hazard_detection` topic. Disabling this can noticeably reduce the CPU and RAM usage of the robot.
32
+
*`hazards_pub_fixed_period_ms`: default `-1`. This controls whether the robot should publish hazard information even if the hazards are not changing. Set it to `-1` to disable fixed period hazard publications and have hazards be published only when they change. This parameter will be ignored if `publish_hazard_msgs` is set to `false`.
33
+
*`raw_kinematics_min_pub_period_ms`: default `25`. This controls the minimum period at which the robot should publish raw kinematics information. If set to `-1`, it will disable raw kinematics publications. This can noticeably reduce the CPU and RAM usage of the robot. A value of `1` indicates that raw data should be published as soon as they are available. Values higher than `1` will throttle publications and will give some CPU improvement, but won't help RAM usage.
34
+
The following topics are affected by this parameter: `/imu`, `/mouse`, `/wheel_status`, `/wheel_ticks`, `/wheel_vels`.
35
+
If you are not interested in subscribing to these topics, it's recommended to set this parameter's value to `-1`.
36
+
*`publish_odom_tfs`: default `true`. If set to false, the robot will not publish odometry information in the `/tf` topic. This can reduce the CPU and RAM usage of the robot if not needed. Note: this parameter is independent from `raw_kinematics_min_pub_period_ms`
35
37
36
38
As a summary, the best performance can be obtained via
37
39
```
38
40
robot_state:
39
-
ros__parameters:
41
+
ros__parameters:
40
42
publish_hazard_msgs: false
41
43
publish_odom_tfs: false
42
44
raw_kinematics_min_pub_period_ms: -1
43
45
```
44
46
45
47
Note that `publish_odom_tfs: true` is required to interact with the navigation stack.
48
+
49
+
This new version changes the default timing of some ROS 2 topics to improve the CPU performance.
50
+
To restore the previous behavior users can use the following configuration
51
+
52
+
```
53
+
robot_state:
54
+
ros__parameters:
55
+
hazards_pub_fixed_period_ms: 16
56
+
raw_kinematics_min_pub_period_ms: 1
57
+
```
58
+
46
59
47
60
[^1]: ROS 2 is governed by Open Robotics.
48
61
[^2]: The Bluetooth® word mark and logos are registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by iRobot is under license.
0 commit comments