Hi,
I’m trying to output the actual_TCP_pose (VECTOR6D variable type) into my python terminal so that I can see exactly where the TCP is at all moments while it moves. I’m not that big a programming buff, but I’m having trouble trying to convert it into list setting so that I can print the list out. This should be plausible as I am able to continuously output actual_executable_time (a DOUBLE variable type). Any help or comment on how to do this would be much appreciated.
Thank you, I’ve put my python code down below:
#!/usr/bin/env python
import sys
sys.path.append(’…’)
import rtde.rtde as rtde
import rtde.rtde_config as rtde_config
ROBOT_HOST = ‘192.168.100.101’
ROBOT_PORT = 30004
config_filename = ‘something.xml’
conf = rtde_config.ConfigFile(config_filename)
output_names, output_types = conf.get_recipe(‘output’)
input_names, input_types = conf.get_recipe(‘input’)
con = rtde.RTDE(ROBOT_HOST, ROBOT_PORT)
con.connect()
setup recipes
con.send_output_setup(output_names, output_types)
inputs = con.send_input_setup(input_names, input_types)
#start data synchronization
if not con.send_start():
sys.exit()
input print out (SET)
#inputs.input_double_register_24 = 556.044
#print(“inputs : %.13f”%inputs.input_double_register_24)
#on.send(inputs)
keep_running = True
output print out (REAL-TIME)
while keep_running:
output1 = con.receive()
output2 = [0,0,0,0,0,0]
output2 = con.receive()
print("outputs in ms : %.13f"%output1.actual_execution_time)
print("outputs TCP pose : %.13f"%output2.actual_q)
con.send_pause()
con.disconnect()