Clearing input float registers in rtde_control_loop.urp

I am using the example program rtde_control_loop.urp in my application.

I am having a problem when an improper value is written to the input_float_registers that causes the robot to crash, those values still seem to be present in those registers when I restart the program. I don’t seem to be able to clear those registers when I initialize the program. My only solution at the moment is to reboot the robot.

Is there any way to clear these registers in the urp program? Is there any workaround for this?

The inputs are inputs and are immutable by the robot. The robot runtime can only read the inputs. Thats the point of inputs.

AFAIK - your external application needs to handle the clearing of those inputs.

Maybe your external application can monitor the program running status of the robot and reset the inputs sent to the robot to some safe init value when the program stops?

That actually is what my program does when it shuts down gracefully: it sets these inputs to [0,0,0,0,0,0] which is recognized as a special code to not move. The problem is when something happens such that the robot crashing to exit the Polyscope program. It never receives the safe code in this case and if I try to start the Polyscope program again it has those bad inputs still unless I reboot the robot.

when your external application recognizes that the program has stopped with the special code; the external application should re-set the input

its a chicken/egg problem. you have to init the variables somewhere