Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Make Tool look at point

#1
Hello,

I'm new to RoboDK and robots in general, and I got problems with orientation and rotation of the tool.
My task is to build a "simple scanner" for inspection.
A Sensor is attached to a UR5e and I want to move the sensor to a number of points, to look at the target from different angles. Therefore, I need to move the arm to certain position and then orient the sensor, so that the (e.g.) X-Axes of the Tool Frame points at a fixed point. Moving to the point is no problem, but the rotation of the Tool gives me a headache. I tried calculating the necessary rotation angles, but they are somehow wrong.

I attached my current script. Does anyone know where my error lies in calculating the rotation, or is there a better approach to keeping a fixed focus on a point? I want to script the movement via python because in later stages of the project, I want to send trigger impulses when a point is reached and continue when the measurement is finished.

Thank you for your help
#2
Can you attach the file again? I see no attachment.
#3
对不起,我的坏。我认为我idn't click "Add Attachment"


Attached Files
.zip TestStation.zip(Size: 3.02 MB / Downloads: 106)
#4
I suggest you create a RoboDK program to handle the movements and then include python scripts inside the program to trigger the impulses.

If you really need it to be all inside a python script, you can read a position from the API and increment its values directly instead of re-calculating all the math behind the scene.
#5
Are there examples you recommend for these approaches?
Is there a build in function to handle the orientation of the robot? The sensor we are using has a very narrow field of view and I need it to look exactly at the desired point. Therefore, manually adjusting each orientation is not an option. That is why I tried to calculate the orientation.

I come from a programming background and have a lot of experience with python, so this was more intuitive for me.
#6
If I understand correctly, you want to move the camera around an object and have the camera precisely pointing toward the object at all time?

I suggest you create a TCP that is offset to the center of rotation of the needed movement and then use linear moves between targets to re-orient the camera where you need.

See the attached example.


Attached Files
.rdk Example.rdk(Size: 3.08 MB / Downloads: 113)




Users browsing this thread:
1 Guest(s)