Hi all,
I am using an RTDE interface in python created by RopeRobotics(Python 3 library to communicate with robot), though my question is more about general RTDE communication than the interface presented above.
I know how to send commands to robot that do not require numerical output such as force_mode, servoj, movel etc.
I know how to read the defined values inside the robot (list given in RTDE guide) for example:
Problem Description
The issue of mine is that I am trying to use the defined inside the robot get_invere_kin() function to obtain the TCP pose.
What I try to do is:
Assign input_double_register_0-5 to store value of pose (x,y,z,Rx,Ry,Rz)
Send those values as an input to get_inv_kin() defined inside the robot (prog =""") PROBLEM
I don’t know how to collect the output of this function so that i can store it it in different registers which I can read on my PC. Any suggestions ?
I had to write a functions that reads and writes to the registers in order to do it (because I use specific rtde package in python), I will try in next week (unfortunately i got access to the robot once a week only) and then I will post here if I succeeded or not
@ajp
This is what is the cause of it not working
This doesnt work, for some reason I cant call a variable that will hold a number inside the write_outpu_float_register(1,angles), it would work if i explicitly write write_output_float_register(1,2) but not with angles = 2
Any ideas why thats the case?
That is strange indeed. No obvious reason springs to mind just from looking at the code. Where are you seeing ‘None’?
For this type of problem, I’d recommend that you load the script into a program directly within Polyscope and execute it there. It’s a bit easier to debug that way as if there’s an issue with your code, you should see an error popup, where as you don’t get that running over the client interfaces.
@ajp
Turns out it was an issue with indentation
Here is a working final version.
Really appreciate your help, as always your guidance was able to help me solve the problem