Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ur10_robot_arm:drawing_with_the_ur10 [2021/02/25 08:08] – [Send program to robot] formlab | ur10_robot_arm:drawing_with_the_ur10 [2021/03/03 01:15] (current) – [Troubleshooting] formlab | ||
---|---|---|---|
Line 5: | Line 5: | ||
- Select all | - Select all | ||
- '' | - '' | ||
- | - Save as. Choose '' | + | - Save as. Choose '' |
+ | - //Optional: open saved file in text editor to check that there are only ''< | ||
+ | - //Keep the filename simple and avoid spaces.// | ||
===== Prepare the canvas ===== | ===== Prepare the canvas ===== | ||
- | * Make sure to have a mostly flat surface. The orientation doesn' | + | * **Flat surface**: |
- | * The surface should be fixed well, so it doesn' | + | * **Immovable surface**: |
- | * Measure the width and height of the image area on the surface. Keep this value for later. | + | |
===== Setup the physical robot ===== | ===== Setup the physical robot ===== | ||
Line 32: | Line 34: | ||
- Right click the python script and choose '' | - Right click the python script and choose '' | ||
- | - Change the variable '' | + | - Change the variable '' |
- | - Change the variable '' | + | - Change the variable '' |
- Press ctrl + s to save the file and go back to RoboDK. //Keep in mind that this file is updated in RoboDK, but not in the file explorer. Save the changes to the file explorer if you want to keep them for the future.// | - Press ctrl + s to save the file and go back to RoboDK. //Keep in mind that this file is updated in RoboDK, but not in the file explorer. Save the changes to the file explorer if you want to keep them for the future.// | ||
Line 54: | Line 56: | ||
* P3 should be somewhere on the canvas to the right. | * P3 should be somewhere on the canvas to the right. | ||
- | //Tip: if you're using a spring-loaded pen holder, add a spacer to the spring, so the pen is retracted a little bit. Then almost-touch the canvast with the pen when probing. | + | //Tip: if you're using a spring-loaded pen holder, add a spacer to the spring, so the pen is retracted a little bit. Then almost touch the canvast with the pen when probing. Remove the spacer before drawing. |
// | // | ||
- **Move the physical robot** to one of the 3 points | - **Move the physical robot** to one of the 3 points | ||
Line 70: | Line 72: | ||
* **Save the file**. The file is already stored in a temporary location in the finder. Find the location, or save-as to a new one. | * **Save the file**. The file is already stored in a temporary location in the finder. Find the location, or save-as to a new one. | ||
* **Import in RoboDK**. Load the file back into RoboDK (drag it onto the window, and select '' | * **Import in RoboDK**. Load the file back into RoboDK (drag it onto the window, and select '' | ||
+ | * <WRAP center round alert 60%> | ||
+ | the generated program starts at a different position than RoboDK shows. | ||
+ | Temporary fix: in the program instructions: | ||
+ | </ | ||
* **Connect to the robot**. Open the connection to the robot in RoboDK. After the first time, it seems to work when the connection status is disconnected. | * **Connect to the robot**. Open the connection to the robot in RoboDK. After the first time, it seems to work when the connection status is disconnected. | ||
- | * **Stand clear of the robot arm**. | + | * <wrap hi>**Stand clear of the robot arm** and slow down the motion on the teaching pendant.</ |
- | * **Send program to robot**. Ctrl + click on the robot program (the text file icon with a triangle on the left) and select '' | + | * **Send program to robot**. Ctrl + click on the robot program (the text file icon with a triangle on the left) and select '' |
+ | ===== Troubleshooting ===== | ||
+ | * **After 'Run Python script', | ||
+ | * Use the line <code python> RDK.ShowMessage(" | ||
+ | * To display variables, use this method: <code python> msg_str = " | ||
+ | * It might help to temporary load an older version of the python script, and loading the new one again after that. It sounds impossible, but it helped here before... | ||
Line 85: | Line 96: | ||
- | ==== WRITTEN UNTIL HERE==== | ||
- | |||
- | |||
- | <WRAP center round alert 60%> | ||
- | ERROR: the generated program starts at a different position. | ||
- | temp fix: in the program instructions: | ||
- | TODO: Find a fix for this in the Python program. | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | get real world position of robot into RoboDK | ||
- | * move robot arm | ||
- | * in RoboDK, connect to robot | ||
- | * Click 'Get Position" | ||
- | Set the virtual blackboard to the position of a real drawing surface | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * Ctrl + click on the '' | ||
- | * Set '' | ||
- | * Look at the diagram. Repeat the following steps for each point | ||
- | * Move the physical robot to the next position 1. (Position 1 will become the origin. Note that the connection status changes to disconnected when moving the real robot. | ||
- | * With the reference Frame window still in front, Click '' | ||
- | * When the connection is ready, click '' | ||
- | * In the Reference frame window, click '' | ||
- | * when all 3 points are defined, click '' | ||
- | * Close the Reference Frame window. The selected reference frame has moved to the newly defined position & orientation. |