Get the trajectory of the end efector as a list of timestamp-poses

Is it possible to log the UR5 or UR10 end efector trajectory after executing a .urp? I’m interested in having a list of timestamp-poses at a given frequency (e.g. 100Hz) where the pose of the end efector defines the translation and rotation of the end efector wrt some reference (e.g. the robot base).

Hi @eduardo.fernandez

directly from the URP - File it is not possible to derive the correspondent TCP poses.

Do you want to have this data being recorded directly on the robot or is connection via ethernet and using one of our client interfaces also viable?

Connection via ethernet is possible, currently I’m trying to save the trajectory of the TCP using modbus, and configuring it on the robot to access the registers 400-405. I’m using pymodbus on my end to create a client and query the tool pose with client.read_holding_registers. Is it possible to do something similar using URScript or other alternative?

The Actual_TCP_pose information is also stored in various other interfaces than modbus. You can find more details here. (Overview of client interfaces)

Through UR Script you can use the get_actual_tcp_pose() - function and send the data via a socket connection. Alternatively you can also store it one of the general purpose registers and access those via RTDE / Profinet / Ethernetip.

Thank you for your answer. I would also like to know if I can read the tcp pose and the corresponding robot timestamp. If I do this with 2 queries to MODBUS registers I may get values that do not correspond. Is there a way to get matching values?
Also, regarding the TCP pose, can you confirm if it’s provided in right-handed convention (Right-hand rule - Wikipedia)?

With what timestamp are you comparing the ones you get from Modbus? And by what kind of margin are you off?

Yes - we are using the Right Hand rule.

I’m not yet getting timestamps from Modbus, once I read a TCP position in my host PC I use the host PC timestamp mark the TCP, but that’s not accurate. So I was thinking on using a similar modbus request to get the timestamp, e.g.:

                    response = client.read_holding_registers(400, 6, slave=255) # Get the pose of the TCP
                    response2 = client.read_holding_registers(2048, 6, slave=255) # Get the timestamp

But since the register reading requests are different I have no guarantee that response and response2 correspond to the same timestamp. I want to compare the timestamps withe the ones from a camera that I’ve mounted on the robot, but I first I need to get the timestamp that correspond to the TCP pose that I’m reading, and I don’t know how to do that.

Hi there!

I’m struggling with this topic. I just want to read the TCP pose and timestamp from a UR5 or UR10 robot, making sure that the timestamp corresponds to the same instant the pose was read, and save that information to a csv file. But is it really possible to ensure that the timestamp corresponds to the pose from get_actual_tcp_pose()?
I’m wondering if it is possible do that in a program running in the UR controller, like:

  • Start program that records time and poses
  • Start main robot program (moving the robot along the trajectory)
  • Stop recording poses and timestamp (when the main program finishes)
  • Copy the csv file in the robot controller from the UR controller
    Is that possible? Maybe this is better done with threads in the main program?