Niryo robot status

The package listens to robot topics to deduce its current state. It manages the status of the robot, the status of the logs and informs about the overheating of the Raspberry PI and the joints out of bounds.

It belongs to the ROS namespace: /niryo_robot_status.

Robot status

Niryo Robot Status Table

Name

Description

Troubleshoot

UPDATE

Robot update in progress

Just wait and be patient :)

REBOOT

The robot is rebooting

SHUTDOWN

The robot is being shutdown

FATAL_ERROR

ROS crash

Please restart the robot

MOTOR_ERROR

Motor voltage error, overheating, overload

Check the error code on Niryo Studio.
Restart the robot and check the wiring.
If the problem persists, contact customer service

COLLISION

Arm collision detected

Restart your movement or switch to learning mode to remove this error.

USER_PROGRAM_ERROR

User program error

Launch a movement or switch to learning mode to remove this error.

UNKNOWN

Node not initialized

BOOTING

ROS a and the Raspberry are booting up

If the startup seems to timeout, restart the robot electrically.
If the problem persists, update the robot with ssh,
change the SD card or contact customer service.

CALIBRATION_NEEDED

New calibration requested

Run a new calibration before processing any movement.

CALIBRATION_IN_PROGRESS

Calibration in progress (Ned2 only)

If the calibration fails or takes longer than 30 seconds.
The status will return to CALIBRATION_NEED.

LEARNING_MODE

Free motion enabled, the torques are disabled

STANDBY

Free motion disabled, the torques are enabled
and no user program is running

MOVING

A single motion or jog is being processed
and no user program is running

RUNNING_AUTONOMOUS

A user program is running and the torques are enabled

RUNNING_DEBUG

A debug procedure is running

A short press on the top button cancels it.

PAUSE

User program error

A short press on the top button resumes the program,
a long press (on Ned2) cancels the program execution.
After 30 seconds, the program stops automatically.

LEARNING_MODE_AUTONOMOUS

A user program is running and the torques are disabled

LEARNING_TRAJECTORY

The robot is generating a trajectory from its motions

ESTOP

The robot is in emergency stop (Ned3pro only)

You must release the emergency stop button

Niryo Robot Status Diagram

Robot status API functions

Robot status ROS wrapper

In order to control the robot more easily than calling each topics & services one by one, a Python ROS Wrapper has been built on top of ROS.

For instance, a script which shutdowns the robot via Python ROS Wrapper will looks like:

from niryo_robot_status.api import RobotStatusRosWrapper

robot_status = RobotStatusRosWrapper()
robot_status.shutdown()

API list

class niryo_robot_status.api.robot_status_ros_wrapper.RobotStatusRosWrapper(service_timeout=1)

Bases: object

prepare_update()
reboot()
shutdown()
exception niryo_robot_status.api.robot_status_ros_wrapper.RobotStatusRosWrapperException

Bases: Exception

Package Documentation

ROS topics

Publishers

Topic Name

Type

Description

/niryo_robot_status/heartbeat

std_msgs/Empty

N/A

/niryo_robot_status/robot_status

niryo_robot_status/RobotStatus

Publish the robot, log, overheating and joints out of bounds status

/rosout

rosgraph_msgs/Log

N/A

Subscribers

Topic Name

Type

Description

/joint_states

sensor_msgs/JointState

Position, velocity and effort of all the joints

/niryo_robot/collision_detected

std_msgs/Bool

Whether a collision is detected or not

/niryo_robot/jog_interface/is_enabled

std_msgs/Bool

Whether the jog interface is enabled or not

/niryo_robot/learning_mode/state

std_msgs/Bool

Whether the robot is in freemotion mode or not

/niryo_robot_arm_commander/is_active

std_msgs/Bool

Indicate whether a command is currently running or not

/niryo_robot_arm_commander/is_debug_motor_active

std_msgs/Bool

N/A

/niryo_robot_arm_commander/learning_trajectory

std_msgs/Bool

Indicates whether a robot is currently learning a trajectory or not

/niryo_robot_hardware_interface/hardware_status

niryo_robot_msgs/HardwareStatus

Status of robot’s hardware devices (joints, tools, end effector panel, calibration, etc…)

/niryo_robot_programs_manager_v2/execute_program/status

actionlib_msgs/GoalStatusArray

N/A

/niryo_robot_rpi/estop_status

std_msgs/Bool

N/A

/niryo_robot_rpi/pause_state

niryo_robot_arm_commander/PausePlanExecution

Publish the current execution state launched when button is pressed”

/niryo_robot_user_interface/is_client_connected

std_msgs/Bool

Check whether a pyniryo client is connected or not

/ping_pyniryo

std_msgs/Bool

Check whether a pyniryo2 client is running or not

/rosout_agg

rosgraph_msgs/Log

N/A

ROS Services

Service Name

Type

Description

/niryo_robot_status/advertise_shutdown

niryo_robot_msgs/AdvertiseShutdown

Notify of a shutdown request

/niryo_robot_status/get_loggers

roscpp/GetLoggers

N/A

/niryo_robot_status/ping_ros_wrapper

niryo_robot_msgs/Ping

N/A

/niryo_robot_status/set_logger_level

roscpp/SetLoggerLevel

N/A

ROS Parameters

Parameter Name

Default value

Simulation value

Unit

Description

/niryo_robot_status/check_nodes_frequency

0.2

N/A

N/A

N/A

/niryo_robot_status/initialisation_params

[‘/niryo_robot_arm_commander/initialized’, ‘/niryo_robot_poses_handlers/initialized’, ‘/niryo_robot_programs_manager/initialized’, ‘/niryo_robot_programs_manager_v2/initialized’, ‘/niryo_robot_tools_commander/initialized’]

N/A

N/A

N/A

/niryo_robot_status/log_level

INFO

N/A

N/A

N/A

/niryo_robot_status/node_logs

[‘/niryo_robot_hardware_interface’, ‘/move_group’, ‘/controller_spawner’, ‘/niryo_robot_programs_manager’, ‘/niryo_robot_programs_manager_v2’, ‘/niryo_robot_rpi’, ‘/niryo_robot_user_interface’, ‘/niryo_robot_poses_handlers’, ‘/niryo_robot_tools_commander’, ‘/niryo_robot_arm_commander’]

N/A

N/A

N/A

/niryo_robot_status/vital_nodes_common

[‘/controller_spawner’, ‘/move_group’, ‘/niryo_robot_arm_commander’, ‘/niryo_robot_hardware_interface’, ‘/niryo_robot_poses_handlers’, ‘/niryo_robot_programs_manager’, ‘/niryo_robot_programs_manager_v2’, ‘/niryo_robot_rpi’, ‘/niryo_robot_status’, ‘/niryo_robot_tools_commander’, ‘/niryo_robot_user_interface’, ‘/robot_state_publisher’, ‘/rosapi’, ‘/rosout’, ‘/tf2_web_republisher’]

N/A

N/A

N/A

/niryo_robot_status/vital_nodes_real

[‘/niryo_robot_vision’, ‘/niryo_robot_modbus’]

N/A

N/A

N/A

ROS Action

Namespace: None

The RobotStatus message

int8 UPDATE=-7
int8 REBOOT=-6
int8 SHUTDOWN=-5
int8 FATAL_ERROR=-4     # Node crash
int8 MOTOR_ERROR=-3     # Electrical/overload or disconnected motor error
int8 COLLISION=-2
int8 USER_PROGRAM_ERROR=-1
int8 UNKNOWN=0
int8 BOOTING=1          # Robot is booting
int8 REBOOT_MOTOR=2
int8 CALIBRATION_NEEDED=3
int8 CALIBRATION_IN_PROGRESS=4
int8 LEARNING_MODE=5
int8 STANDBY=6          # Torque ON
int8 MOVING=7           # Moving with NiryoStudio interface or ros topics without user program
int8 RUNNING_AUTONOMOUS=8   # User program is running
int8 RUNNING_DEBUG=9    # Debug program is running
int8 PAUSE=10           # User program paused
int8 LEARNING_MODE_AUTONOMOUS=11    # User program is running + Learning mode activated
int8 LEARNING_TRAJECTORY = 12
int8 ESTOP = 13

int8 robot_status
string robot_status_str
string robot_message

int8 FATAL=-3
int8 ERROR=-2
int8 WARN=-1
int8 NONE=0

int8 logs_status
string logs_status_str
string logs_message

bool out_of_bounds
bool rpi_overheating