Commit c3e803e5 authored by Dominique Piche's avatar Dominique Piche

add details to user guide

parent c5d72abc
......@@ -8,7 +8,7 @@ When the robot is disabled, brakes are applied to the three lowest joints. In or
The robot should be plugged to the power supply using the robot power cable (black with green ends), and it should be plugged to the computer using the ethernet cable. The power supply is powered using the switch on its back, and the robot is powered by hitting the reset button on the power supply. The red button on the power supply is the emergency stop, which instantly disables the robot.
Before using the robot for the first time, the computer needs to be configured with a static IP address. On Mac, this is done by going to System Preferences, Network, Ethernet, Configure IPv4 (see image below, left). On Windows, this is done by going to Control Panel, Network and Sharing Center, Change adapter settings, right click on Ethernet, Properties, Internet Protocol Version 4 (IPv4), Properties (see image below, right).
Before using the robot for the first time, the user's computer needs to be configured with a static IP address. On Mac, this is done by going to System Preferences, Network, Ethernet, Configure IPv4 (see image below, left). On Windows, this is done by going to Control Panel, Network and Sharing Center, Change adapter settings, right click on Ethernet, Properties, Internet Protocol Version 4 (IPv4), Properties (see image below, right).
<img src="https://i.imgur.com/qYucy8D.png" style="zoom:50%;" /> <img src="https://i.imgur.com/hWMY0zZ.png" style="zoom:80%;" />
......@@ -41,7 +41,7 @@ There are certain places where the robot is in a singularity, in which case it c
The web interface is the easiest way to control the robot. The robot can be manually moved using the Joints Jog panel, which allows to move each joint separately, and the Cartesian Jog panels, which allows to move the robot linearly. In practice, the Joints Jog panel in rarely used, as it is hard to predict the joints rotations corresponding to a given position. The Cartesian Jog panel is used because it is more intuitive. Simple series of commands can be sent to the robot using the Program panel on the right, but it does not allow for loops or conditional expressions, which limit the extend to which it can be used.
The check box 1 (see image above) is used to create a connection with the robot. Once the connection is created, the robot can be activated using the check box 2, which enable the motors. Once the motors are activated, the joints should not be forced. The check box 3 is used for the homing procedure of the robot, which lets the robot know its current position and which has to be done every time after the motors are enabled. During this procedure, every joint in moved by a few degrees. Thus, it is important to make sure that the robot has some place to move prior to enabling this check box.
The check box 1 (see image above) is used to create a connection with the robot (choose Control as the connection type). Once the connection is created, the robot can be activated using the check box 2, which enables the motors. Once the motors are activated, the joints should not be forced. The check box 3 is used for the homing procedure of the robot, which lets the robot know its current position and which has to be done every time after the motors are enabled. During this procedure, every joint is moved by a few degrees. Thus, it is important to make sure that the robot has some place to move prior to enabling this check box.
![](https://i.imgur.com/Ss9DSsY.png)
......@@ -57,7 +57,7 @@ In the Cartesian Jog panel, the movements can be given in the WRF coordinates or
Because we rotated the TRF earlier, as long as the orientation of the robot is not changed, moving the robot linearly along the *x*, *y* and *z* axes in relation to the TRF axes or the WRF axes makes no difference. Thus, rotating the TRF beforehand makes for a slightly more intuitive control.
The complete list of commands which can be sent to the robot can be found in the Programming Manual by the manufacturer (see [here](https://www.mecademic.com/Documentation/Meca500-R3-Programming-Manual.pdf)). The commands most often used are presented below.
The complete list of commands which can be sent to the robot can be found in the Programming Manual by the manufacturer (see [here](https://www.mecademic.com/Documentation/Meca500-R3-Programming-Manual.pdf)). The commands most often used are shown below.
**SetTRF**(*x, y, z, α, β, γ*)
......@@ -104,6 +104,12 @@ robot = MecaRobot()
robot.deactivate()
```
When instantiating a `MecaRobot` object, the `simulation_mode` argument can be set to `True ` so that the actual robot does not move, but a simulation of the movements is shown on the web interface. In order to see the simulation, the web interface needs to be connected to the robot in monitoring mode (check box 1., then choose Monitoring as the connection type). The `enable_log` argument can also be set to `True`, in which case every communication with the robot will be written in the `log.txt`.
If for some reason the process is stopped before the robot could be deactivated (for example if an exception is raised), then the robot will need to be manually deactivated using the web interface before it is possible to run another process with Python. To do so, connect to the robot (1. on the image below, then select Control), disable the error mode (2.), deactivate the robot (3.) and close the connection (4.).
![](https://i.imgur.com/vrh1Bir.png)
#### Examples
The following examples are all on the project repository, in the Example folder.
......@@ -128,9 +134,9 @@ robot.wait_for('3012')
robot.deactivate()
```
The `MecaRobot.run()` method is used to send a proprietary command the robot. It takes a `string` of the proprietary command name, followed by a `list`of the proprietary arguments if more than one argument is needed (ex. `run('MovePose', [x,y,a,α,β,γ])`), an `int` if only one argument is needed (ex. `run('Delay', t)`) or nothing if no argument is needed (ex. `run('GetPose')`).
The `MecaRobot.run()` method is used to send a proprietary command the robot. It takes a string of the proprietary command name, followed by a list of the proprietary arguments if more than one argument is needed (ex. `run('MovePose', [x,y,a,α,β,γ])`), an int if only one argument is needed (ex. `run('Delay', t)`) or nothing if no argument is needed (ex. `run('GetPose')`).
The `MecaRobot.wait_for()`method allows to wait for a specific response from the robot before continuing the program. It takes a `string` of the response code. Here, we wait for an End of block response (EOB), which the robot sends when all of the movements commands have been executed. This is to make sure that the program is complete before we deactivate the robot. The complete list of responses from the robot is presented in the Programming Manual by the manufacturer (see [here](https://www.mecademic.com/Documentation/Meca500-R3-Programming-Manual.pdf)). The responses more often used are
The `MecaRobot.wait_for()`method allows to wait for a specific response from the robot before continuing the program. It takes a string of the response code. Here, we wait for an End of block response (EOB), which the robot sends when all of the movements commands have been executed. This is to make sure that the program is complete before we deactivate the robot. The complete list of responses from the robot is shown in the Programming Manual by the manufacturer (see [here](https://www.mecademic.com/Documentation/Meca500-R3-Programming-Manual.pdf)). The responses more often used are
- 3004 - End of movement : sent when the robot has stopped moving.
- 3012 - End of block : sent when all of the movement commands have been completed and the robot has stopped moving.
......@@ -179,7 +185,7 @@ The `robot.run('MovePose', [175,0,200,0,-30,0])` line sends the robot to the pos
The following code moves the robot in a straight line by steps. The result is shown [here]( https://www.youtube.com/watch?v=nqhlYZ2ciQg).
```
```python
robot = MecaRobot()
robot.start_tracking()
......@@ -187,7 +193,7 @@ robot.run('MovePose', [200,0,200,0,0,0])
robot.linear_sequence(direction_vector=np.array([1,0,0]), total_distance=100, step=5, delay=0.1)
robot.wait_for('3012', 'Did not receive EOB')
robot.wait_for('3012')
robot.stop_tracking()
robot.deactivate()
......@@ -225,4 +231,4 @@ robot.stop_tracking()
robot.deactivate()
```
This shows an example of a `linear_sequence` about an arbitrary axis, setting (0, 1, 1) as the `direction_vector`.
\ No newline at end of file
This shows an example of a `linear_sequence` about an arbitrary axis, setting (0, 1, 1) as the `direction_vector`. The `direction_vector` is automatically normalized. When in tracking mode, the `linear_sequence` method relies on End of movements responses from the robot to track the position. To ensure these responses are not from earlier movement commands, the responses buffer is automatically cleared prior to the sequence. However, if the user is sure that the buffer is empty (for example right after another linear_sequence), this step can be skipped by setting `do_clear_buffer=False` to save about 2 seconds.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment