-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from AllenNeuralDynamics/dev/wait_on_axis
wait on axis commands
- Loading branch information
Showing
2 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
"""Connects to the Tiger Box, moves some axes, returns to starting pose.""" | ||
|
||
from tigerasi.tiger_controller import TigerController | ||
|
||
|
||
PORT_NAME = "COM4" # a string indicating the port name. | ||
# port name can be left as None on Linux if udev rules were installed. | ||
|
||
print("Connecting to Tiger Controller... ", end=" ", flush=True) | ||
box = TigerController(PORT_NAME) | ||
print("done.") | ||
|
||
# Start moving the x and y axes. | ||
box.move_relative(x=-2000, y=-2000) | ||
axis_moving_states = box.are_axes_moving() | ||
axis_moving_states_subset = box.are_axes_moving('x', 'y') | ||
x_is_moving = box.is_axis_moving('x') | ||
print(f"moving states (all axes): {axis_moving_states}") | ||
print(f"moving states (x and y): {axis_moving_states_subset}") | ||
print(f"x axis moving state: {x_is_moving}") | ||
box.move_relative(x=2000, y=2000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters