Hello everyone.
I’m facing an issue with reading from the registers through the RTDE Python package.
I maneged to send new values but not reading them.
This is how my control_loop_configuration.xml file is setup:
<rtde_config>
-
*
-
<field name="target_q" type="VECTOR6D"/>*
-
<field name="target_qd" type="VECTOR6D"/>*
-
<field name="output_int_register_0" type="INT32"/>*
-
*
-
*
-
<field name="input_double_register_0" type="DOUBLE"/>*
-
<field name="input_double_register_1" type="DOUBLE"/>*
-
<field name="input_double_register_2" type="DOUBLE"/>*
-
<field name="input_double_register_3" type="DOUBLE"/>*
-
<field name="input_double_register_4" type="DOUBLE"/>*
-
<field name="input_double_register_5" type="DOUBLE"/>*
-
*
-
*
-
<field name="input_int_register_0" type="INT32"/>*
-
*
</rtde_config>
This is how I’m trying the read the value in my control loop (example_control.loop.py) look
while keep_running:
-
receive the current state*
-
state = con.receive()*
-
state.target_q()*
-
if state is None:*
-
break*
-
do something…*
-
if move_completed and state.output_int_register_0 == 1:*
-
move_completed = False*
-
new_setp = setp1 if setp_to_list(setp) == setp2 else setp2*
-
list_to_setp(setp, new_setp)*
-
print("New pose = " + str(new_setp))*
-
# send new setpoint*
-
con.send(setp)*
-
watchdog.input_int_register_0 = 1*
-
elif not move_completed and state.output_int_register_0 == 0:*
-
print("Move to confirmed pose = " + str(state.target_q))*
-
move_completed = True*
-
watchdog.input_int_register_0 = 0*
-
kick watchdog*
-
con.send(watchdog)*
When running the code I get this message from my Python IDE:
“TypeError: ‘list’ object is not callable”
The message is listed when I ask for a int or float value.
I am supposed to setup recipies for output values like it is done for the input values ?
If yes, can some please guide me on how to ?
Hoping someone in here can elaborate and help me through this challenge I’m facing in my mechanical engineering bachelors project.
Best regards Mads