Universal Robots Forum

Reading Recieved Buffer

Hi Everyone,

I’m currently working on a way to read the position of the robot through my PC. The issue I believe I’m having is reading out the buffer of data from the robot. I was wondering if there is documentation for this data so it can be converted to useable data, or proper methods for getting the data from the robot. Thanks!

I’m currently opening the socket, moving the robot to a position and trying to read the position using the command get_actual_tool_flange_pose(). I then read the buffer and that’s where I’m not understanding the data coming in.

Hello @sjackson,

Which interface/port are you using to stream the data? Here is an example my colleague posted a while back that does the similar action using the secondary client interface. It might point you in the right direction: How to process package from robot controller

1 Like

I’m not using a stream connection, from my current understanding of my system. I’m connecting each time I send a command. I open the port (to be more clear from my previous post), 0, and send a movej or movel command. After the command, I want to wait until the robot is approximately in the proper pose before I move on to my next command.

As of right now, I’m getting a return from the get_actual_tool_flange_pose()\n as a syntax error.

I’ve been looking into the example you gave above, but I am not sure I’ll be able to utilize that method until I understand why I’m getting the syntax error in my initial sending of the command.

Okay, my issue was that I had a complete misunderstanding of what was happening in the architecture. Your answer is exactly what I needed to do.

I was thinking I could poll the robot, but in reality, the robot is constantly sending the information. As of right now I am able to grab the proper information with the data you have given me. Thanks a bunch.

1 Like