Commit 614c4560 authored by Dominique Piche's avatar Dominique Piche
parents 7593fb42 32d03709
......@@ -12,5 +12,35 @@ The MecaRobotForDosimetry adapts the MecaRobot class for scintillation dosimetry
The robot allows for a simulation mode, in which the actual robot does not move but we can still see the animation on the web interface. It is possible to add a 3D model of the tool fixed at the end of the robot so we can see it on the simulation (here the mPSD_holder).
The robot allows for a simulation mode, in which the actual robot does not move but we can still see the animation on the web interface. It is possible to add a 3D model of the tool fixed at the end of the robot so we can see it on the simulation (here the mPSD_holder.stl), as well as a 3D model of the environnement (here to source_catheter_holder.stl).
## Usage
The robot takes a set of proprietary commands, which can be found [here](https://mecademic.com/Documentation/Meca500-R3-Programming-Manual.pdf).
The following codes instantiates a MecaRobot object, moves it to form a square, and disables it.
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.run('MovePose',[200,0,150,0,90,0])
robot.run('MoveLinRelTRF',[0,-50,0,0,0,0])
robot.run('MoveLinRelTRF',[-100,0,0,0,0,0])
robot.run('MoveLinRelTRF',[0,100,0,0,0,0])
robot.run('MoveLinRelTRF',[100,0,0,0,0,0])
robot.run('MoveLinRelTRF',[0,-50,0,0,0,0])
robot.wait_for('3012', 'Did not receive EOB')
robot.deactivate()
The result is shown [here](https://www.youtube.com/watch?v=oYra652iN-g). Once a MecaRobot object is instanciated, the robot is enabled, homed and sent to its initial position. The run method takes a proprietary command with its arguments (which can be either a digit or a list) and sends it to the robot. For instance, the MovePose commands moves the robot to the position (x,y,z,α,β,γ) in relation to the base of the robot, where α, β and γ are Euler angles following the mobile xyz convention. Similarly, the MoveLinRelTRF command moves the robot relative to its current position. The wait_for method allows to wait for a specific response from the robot before continuing the program. 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 deactivate command sends the robot back to its initial position before closing the connection.
The demo.py code shows a use of the MecaRobotForDosimetry class. The result is shown [here](https://youtu.be/T6YLrUir5cE).
## Documentation
The complete documentation can be found in the documentation.md file.
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTYzMjgyNzRdfQ==
-->
\ No newline at end of file
This diff is collapsed.
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