Commit 1730bbd2 authored by Dominique Piche's avatar Dominique Piche

add series of examples

parent ce117592
# see video here : https://www.youtube.com/watch?v=rDP0AhEjZ5w
import sys
sys.path.append('../')
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.run('MovePose', [200,0,150,0,0,0])
robot.run('MoveLinRelTRF', [0,50,0,0,0,0])
robot.run('MoveLinRelTRF', [0,0,100,0,0,0])
robot.run('MoveLinRelTRF', [0,-100,0,0,0,0])
robot.run('MoveLinRelTRF', [0,0,-100,0,0,0])
robot.run('MoveLinRelTRF', [0,50,0,0,0,0])
robot.wait_for('3012', 'Did not receive EOB')
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=LHJngSrj8yo
import sys
sys.path.append('../')
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.run('MovePose', [200,0,200,0,0,0])
robot.run('MoveLinRelTRF', [0,0,0,90,0,0])
robot.run('MoveLinRelTRF', [0,0,0,-180,0,0])
robot.run('MoveLinRelTRF', [0,0,0,90,0,0])
robot.wait_for('3012', 'Did not receive EOB')
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=MpAwk2QsRN0
import sys
sys.path.append('../')
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.run('MovePose', [175,0,200,0,-30,0])
robot.run('MoveLinRelWRF', [0,0,0,0,0,60])
robot.run('MoveLinRelWRF', [0,0,0,0,0,-120])
robot.run('MoveLinRelWRF', [0,0,0,0,0,60])
robot.wait_for('3012', 'Did not receive EOB')
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=nqhlYZ2ciQg
import numpy as np
import sys
sys.path.append('../')
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.start_tracking()
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.stop_tracking()
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=R3J4kVuSwXI
import numpy as np
import sys
sys.path.append('../')
from MecaRobot.meca_robot import MecaRobot
robot = MecaRobot()
robot.start_tracking()
robot.run('MovePose', [200,0,150,0,0,0])
robot.linear_sequence(direction_vector=np.array([0,1,1]), total_distance=75, step=75)
robot.linear_sequence(direction_vector=np.array([0,-1,1]), total_distance=75, step=75, do_clear_buffer=False)
robot.linear_sequence(direction_vector=np.array([0,-1,-1]), total_distance=75, step=75, do_clear_buffer=False)
robot.linear_sequence(direction_vector=np.array([0,1,-1]), total_distance=75, step=75, do_clear_buffer=False)
robot.stop_tracking()
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=vwFc-xDRFb8
import numpy as np
import sys
sys.path.append('../')
from MecaRobot.meca_robot_for_dosimetry import MecaRobotForDosimetry
robot = MecaRobotForDosimetry(scintillators_positions=np.array([[5, 0, -200], [5, 0, -250], [5, 0, -300]]),
source_position=np.array([250,0,-90]))
robot.start_tracking()
robot.move_position_relative_to_source(np.array([-60,0,0]))
robot.linear_sequence(direction_vector=np.array([1,0,0]), total_distance=50, step=5, delay=0.1)
robot.run('Delay', 1)
robot.move_position_relative_to_source(np.array([-60,0,0]))
robot.wait_for('3012', 'Did not receive EOB')
robot.stop_tracking()
robot.deactivate()
\ No newline at end of file
# see video here : https://www.youtube.com/watch?v=k-IdHareEhg
import numpy as np
import sys
sys.path.append('../')
from MecaRobot.meca_robot_for_dosimetry import MecaRobotForDosimetry
robot = MecaRobotForDosimetry(scintillators_positions=np.array([[5, 0, -200], [5, 0, -250], [5, 0, -300]]),
source_position=np.array([250,0,-90]))
robot.start_tracking()
robot.move_position_relative_to_source(np.array([0,-20,0]))
robot.turn_around_source(angle_to_cover=180, angular_step=-15, delay=0.1)
robot.run('Delay', 1)
robot.wait_for('3012', 'Did not receive EOB')
robot.stop_tracking()
robot.deactivate()
\ No newline at end of file
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