I’m controlling the robot using the InterpreterMode (via port 30020) and receiving status and messages via the Secondary Client interface (port 30012), which works well - at least with the URSim 5.12 VirtualBox image.
I want to be able to get notified on errors (error code and message as it is displayed in the popups within the URSim application).
I read and interprete everything that comes in via 30012 ( I also tried the other ports 30001, 30002, …) but as it seems I only get RobotState packages (ID 16) and only 2 RobotMessage packaes (ID 20):
- the version package (sub package ID 3)
- a package with sub package ID 12, which is undocumented
and nothing else.
If I produce an error that is popped up and causes the running program to be stopped, by e.g. drive the robot into a singularity, I can see the robot state bits are changing (ProgramRunning true → false, ProtectiveStopped false → true) that makes it possible to detect that something went wrong but I never receive any robot messages (ID 20) that I would expect like subpackage types
- ROBOT_MESSAGE_TYPE_SAFETY_MODE (ID 5)
- ROBOT_MESSAGE_TYPE_ERROR_CODE (ID 6)
- ROBOT_MESSAGE_TYPE_RUNTIME_EXCEPTION (ID 10)
As I’ve read in another post, it might be that these kind of messages are only transmitted via the RTDE-Ports (30003/30013) - is that correct? (it would imply that I have to rework the data interpretation as the format is different to the Primary/Secondary Client interfaces).
I’ve also read a thread with a user experience which indicates that the messages sent by the robot differ between the simulation and a real device, could that be the cause of not receiving the expected data?
How can I get the text of the popup message of the URSim app/robot control panel to transport it to the controlling instance (Client) for a proper error handling?
Thanks,
Stefan
Addition:
Checking with the RTDE interface, it also turned out that the expected package RTDE_TEXT_MESSAGE (ID 77) is not sent if I produce an error by trying to move the robot to an unreachable position.
Does this point againt to a difference between URSim and a real device concerning sending error messages?