Array reversed? #307
Unanswered
filipejsbrandao
asked this question in
Q&A
Replies: 1 comment
-
It's to correct for the endianness of the data sent by the controller. I guess I decided to reverse the whole array rather than the bytes of each individual value separately. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @visose
I'm trying to get realtime data from the current TCP position of a UR Robot using robots. The UR docs for the RTDE interface states that the reply standard for "actual_TCP_pose" is [x,y,z,rx,ry,rz]. When I try to convert this into a rhino plane it gets completely off. So I tried to use "actual_que", also a 6D Vector, to reconstruct the robot pose with the kinematics component. The robot was also on a completely different pose as the URSim. But if I reverse the list the position matches the one I'm seeing in URSim and in the robots simulation component. So I did the same to the actualTCPPose and found the plane ends up precisely where I expected it to be. It seems that the return arrays are always reversed.
This lead me to have a look at the ReadOutputs() method an I noticed this in the ReadDataPackage() method:
Array.Reverse(_buffer, (int)_reader.BaseStream.Position, bytes * values.Length);
What is the reason for this?
Beta Was this translation helpful? Give feedback.
All reactions