Hi,
I am implementing a robot control program via RTDE remote client.
I am writing into input_double_register_[24 to 31] as stated in the RTDE guide for input variables, since registers 0 to 23 are used internally ( Real-Time Data Exchange (RTDE) Guide - 22229 ). Through these registers I am passing joint values and other stuff.
For the Polyscope I am trying to access these values with a .script file but found no function for reading these double registers in the ur-script manual for SW 5.9 or later versions ( https://s3-eu-west-1.amazonaws.com/ur-support-site/77195/99405_UR10e_User_Manual_en_Global.pdf ). There are only functions for reading float registers (in the range of 0 to 23) but according to the RTDE guide there is no way to write into float registers.
A similar post is reporting some precision loss when handling double values withing the Polyscope, which implies that even though one is sending double values, they are interpreted as float values internally, if I am correct? ( RTDE precision lost from DOUBLE to FLOAT precision ). I tried sending double values into input_double_register_[24-31] and reading them from (not documented) float registers 24-31, but that did not work, as expected since these float registers do not exist.
How do you access the input_double_register values from a script command?
short example:
1.) set protocol version to V2
2.) asked to get actual_q and actual_qd in 500Hz
3.) requested access to input_double_register_24
4.) send a data package with the content: [Header] - [40 B4 24 9E C2 8E 24 62] representing 90degree in radian
5.) Define a function to assign this register to all the joints
def q_from_input_float_registers(register_index):
q = [0, 0, 0, 0, 0, 0]
q[0] = read_input_float_register(register_index)
q[1] = read_input_float_register(register_index)
q[2] = read_input_float_register(register_index)
q[3] = read_input_float_register(register_index)
q[4] = read_input_float_register(register_index )
q[5] = read_input_float_register(register_index )
return q
end
6.) Call this function inside the control loop
While True
q = q_from_input_float_registers(24)
velocity = 1
acceleration = 0.25
textmsg(“Target q:”)
textmsg(q)
movej(q, a=acceleration, v=velocity)
textmsg("movej done")
sync()
end
Best regards,
Max