ROS 2 API for managing the Origin One
The Origin One can be managed either to wait or to prepare for operation. Furthermore, the robot also shows the status of its battery, onboard computers and collision avoidance. These interfaces are meant for managing the robot, before and during operation.
A first important topic that is acquired by the robot, and thus can be set by the user, is to /set_collision_avoidance, by which one may set all ultrasonic sensors to respond to obstacles, only the front sensors, only the rear sensors or disable collision avoidance completely.
Further, the Origin One can be set to LOW_POWER mode using a service /set_low_power_mode, which is a mode during which the Origin is saving power and is not powering most of its sensors and actuators. It will return '0' if the Origin successfully entered low power mode, and a 'non-zero error code' if it did not. The external power ports on the robot are also disabled. In this mode, the Origin will not be able to move. This is useful for saving power when the Origin is not in use, for example when a mission has been scheduled for a later time (as you may also specify a wake-up time when calling the service). In order to prevent all kinds of edge cases the LOW_POWER mode implies that all regular ROS 2 nodes will not be running, apart from a very basic ROS 2 node for calling this service and the service to exit the LOW_POWER mode, i.e., /exit_low_power_mode.
Also, the shutdown sequence of the Origin can be initiated by calling the service /shutdown. This will trigger the same shutdown sequence as manually triggering the shutdown using the onboard button. It is important to realize that the robot cannot be booted, or started, with a service call. If that is desired one should make use of the LOW_POWER related service calls.
Robot management topics
The topics related to managing the robot are summarized in the table below. A more details account per topic is presented later on this page.
Topic | Format | Type | Function |
---|---|---|---|
robot/set_collision_avoidance_mode | origin_msgs/CollisionAvoidanceMode | subscriber | Topic to set the manner of collision avoidance |
robot/battery/info | origin_msgs/BatteryInfo | publisher | Battery Information |
robot/mode_of_operation | std_msgs/UInt8 | publisher | Robot supervisor state |
robot/safety_supervisor/emergency_brake_active | std_msgs/Bool | publisher | Emergency brake status |
robot/safety_supervisor/velocity_limits | origin_msgs/LongitudalVelocityLimits | publisher | Maximum allowed longitudinal velocity setpoints |
origin_system_bringup/network_telemetry/telemetry | origin_msgs/msg/NetworkTelemetry | publisher | Status of the different network interfaces and connections |
The topic /robot/set_collision_avoidance_mode has the following characteristics:
Message type: origin_msgs/CollisionAvoidanceMode
Frame: n/a
Frequency: depends on the publisher
Data: mode
This topic can be used to set which set of ultrasonic sensors should be used for collision avoidance, 0
for all sensors, 1
for only the front sensors and 2
for only the rear sensors. It is recommended to turn off the collision avoidance functionality completely (mode=3
) in outdoor or other uneven environments, due to false positive ultrasonic detections, resulting in the Origin being unable to move or not driving smoothly.
Warning
The /set_collision_avoidance contains a minor bug. If the user desires to set the mode to 0
for the first time after powering on the robot, then the system will respond successful without setting the collision avoidance mode to front & rear. To mitigate this behavior, first set the /set_collision_avoidance to a non-zero value i.e. 1
, 2
or 3
and right thereafter set the mode to 0
.
The correct format to change the status of the collision avoidance is for example to set it to front collision avoidance only: ros2 topic pub /robot/set_collision_avoidance origin_msgs/msg/CollisionAvoidanceMode "{ mode: 1}" --once
.
The topic /robot/battery/info has the following characteristics:
Message type: origin_msgs/BatteryInfo
Frame: n/a
Frequency: 1Hz and on change
Data: voltage, state of charge
The battery voltage goes from 32V to 50V, while the state of charge is in percentage.
The topic /robot/mode_of_operation has the following characteristics:
Message type: std_msgs/UInt8
Frame: n/a
Frequency: 1Hz and on change
Data: mode of operation
The mode of operation indicates whether the robot is booting up or whether it is ready to be operated. The mode is defined according to the table below.
Message | Mode of operation | Information |
---|---|---|
0 | None | The Origin is not ready for use yet, it is still booting |
1 | Jetson | The Origin can be controlled using the /robot/cmd_vel_xxx topic |
The topic /robot/safety_supervisor/emergency_brake_active has the following characteristics:
Message type: std_msgs/Bool
Frame: n/a
Frequency: 1Hz and on change
Data: emergency brake active
The data of this topic is a Boolean indicating whether any of the emergency brakes are active (the remote e-stop or the physical e-stop buttons on the Origin itself). True = emergency brake is active, Origin is unable to move.
The topic /robot/safety_supervisor/velocity_limits has the following characteristics:
Message type: origin_msgs/LongitudalVelocityLimits
Frame: n/a
Frequency: 1Hz and on change
Data: max forward velocity, max backward velocity
The data of this topic is the maximum forward and backward longitudinal velocity setpoints for the Origin. Any command velocities sent beyond these values are saturated. Values can change in real time due to (for instance) ultrasonic collision avoidance that limits the velocity.
The topic /origin_system_bringup/network_telemetry/telemetry has the following characteristics:
Message type: origin_msgs/msg/NetworkTelemetry
Frame: n/a
Frequency: 1Hz and on change
Data: cellular strength and operator, wifi strength and wifi ssid and ip
The data of this topic provides information about the network interfaces, and the network connection status. The table below present the meaning of the enums for cellular strength and Wifi strength.
cellular strength | Wifi strength | Meaning |
---|---|---|
4 | 3 | excellent |
3 | n/a | good |
2 | 2 | fair |
1 | 1 | poor |
0 | 0 | disconnected |
-1 | -1 | unknown |
Robot management services
Service | Format | Request variable | Function |
---|---|---|---|
/origin_system_bringup/set_low_power_mode | origin_msgs/srv/EnterLowPowerMode | schedule_wakeup [Bool] | Service to call for a switch to low power mode. |
/origin_system_bringup/exit_low_power_mode | std_msgs/srv/Trigger | n/a | Service to call to exit low power mode. |
/origin_power_management/shutdown | std_msgs/srv/Trigger | n/a | Service to call to trigger a shutdown. |
The first service call will return an enum for no error (0
) or rejected (1
), while the latter two service calls return a success bool to indicate whether the requested transition has been completed successfully.