-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Creating Okon Abstract Base Class * Converting okon_client into okon_sim_client with Okon ABC usage
- Loading branch information
1 parent
a1f7ab7
commit 6b0c96a
Showing
7 changed files
with
57 additions
and
13 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
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,44 @@ | ||
""" Implementation of an Abstract Base Class (ABC) Okon | ||
Okon ABC implementation provides unified communication between | ||
the autonomy module and simulation/TCM. | ||
""" | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class Okon(ABC): | ||
@abstractmethod | ||
def set_depth(self, depth: float, add: bool = False) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def set_stable_vel(self, x: float = None, y: float = None, z: float = None) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def arm_motors(self) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def disarm_motors(self) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def setMode(self, mode: str) -> None: | ||
pass | ||
|
||
@abstractmethod | ||
def reachedTargetRotation(self, delta): | ||
pass | ||
|
||
@abstractmethod | ||
def reachedTargetDepth(self, delta): | ||
pass | ||
|
||
@abstractmethod | ||
def get_detection(self, className: str): | ||
pass | ||
|
||
@abstractmethod | ||
def set_stable_rot(self, x: float = None, y: float = None, z: float = None, add=False) -> None: | ||
pass |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
import py_trees | ||
|
||
from okon_client import Okon | ||
from okon_sim_client import Okon | ||
|
||
|
||
class Status: | ||
|
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
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
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
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