What are the values of robot safety_status in RTDE

I am using the RTDE protocol to communicate with a UR5e via a python script, and I would like to be able to read the safety status of the robot. RTDE has an output variable called safety_status but there is no explanation of what the numerical values of this variable mean in any of the RTDE documentation that I can find (links below), all that is listed is that the variable safety_status is the Safety Status and that it’s an INT32.

https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/

There are two sources that I can find that list values for a variable called safety status, but they are contradictory and are not specifically RTDE documentation.

The first is the spreadsheet linked at the bottom of the following article that describes primary and secondary client interfaces, and Realtime interface, but specifically does NOT describe the RTDE interface.

https://www.universal-robots.com/articles/ur/interface-communication/remote-control-via-tcpip/

The Spreadsheet lists the following values for a “SafetyStatusTypes”

The Second source is in a C++ api for interfacing with RTDE, whos listed values differ from the ones listed in the excel file slightly

Does anyone know of some documentation of SafetyStatus that is specific to RTDE? Or any other resources that make it clear what the values are?

I would also appreciate it if UR could update the documentation at the top of this post with the values of safety_status (along with some other status variables such as robot_mode and runtime_state), I think that would eliminate a lot of confusion.

1 Like

I believe the spreadsheet from the “primary” realtime client interface are the correct values.

We had also found the same mappings in the UR ROS driver code on GitHub, Universal_Robots_ROS2_Driver/ur_dashboard_msgs/msg/SafetyMode.msg at main · UniversalRobots/Universal_Robots_ROS2_Driver · GitHub