Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align with new changes in alitra / isar #32

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 20 additions & 25 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
name: Python package
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
branches:
- main

jobs:
run:
name: Run
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
pip install git+https://github.com/equinor/isar.git@main
pip install .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/equinor/isar.git@main
pip install -e .[dev]

- name: Lint
run: |
black --check .
- name: Lint
run: |
black --check .

- name: Test with pytest
run: |
pytest .
- name: Test with pytest
run: |
pytest
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# isar-robot

[ISAR](https://github.com/equinor/isar) - Integration and Supervisory control of Autonomous Robots - is a tool for integrating robot applications into Equinor systems. Through the ISAR API you can send command to a robot to do missions and collect results from the missions.

Running the full ISAR system requires an installation of a robot which satisfies the required [interface](https://github.com/equinor/isar/blob/main/src/robot_interface/robot_interface.py). isar-robot is a default implementation of such a robot.

# Installation

For installation of isar-robot to use with ISAR, please follow the robot integration [installation guide](https://github.com/equinor/isar#robot-integration).

# Run isar-robot

After installing isar-robot, it can be used through [ISAR](https://github.com/equinor/isar).

# Development

For local development, please fork the repository. Then, clone and install in the repository root folder:

```bash
git clone https://github.com/equinor/isar-robot
cd isar-robot
pip install -r requirements-dev.txt
pip install -e .
pip install -e .[dev]
```

# Contributing

We welcome all kinds of contributions, including code, bug reports, issues, feature requests, and documentation. The preferred way of submitting a contribution is to either make an issue on github or by forking the project on github and making a pull requests.
2 changes: 0 additions & 2 deletions requirements-dev.txt

This file was deleted.

14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@
"Topic :: Software Development :: Libraries",
],
include_package_data=True,
setup_requires=["wheel"],
install_requires=[
"alitra",
],
setup_requires=[
"wheel",
],
extras_require={
"dev": [
"black",
"pytest",
]
},
python_requires=">=3.10",
tests_require=["pytest"],
)
11 changes: 4 additions & 7 deletions src/isar_robot/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
from pathlib import Path
from typing import Sequence

from robot_interface.models.geometry.frame import Frame
from robot_interface.models.geometry.orientation import Orientation
from robot_interface.models.geometry.pose import Pose
from robot_interface.models.geometry.position import Position
from alitra import Frame, Orientation, Pose, Position
from robot_interface.models.inspection.inspection import (
Image,
ImageMetadata,
Expand All @@ -25,12 +22,12 @@ class Robot(RobotInterface):
def __init__(self):
self.logger: Logger = logging.getLogger("robot")

self.position: Position = Position(x=1, y=1, z=1, frame=Frame.Asset)
self.position: Position = Position(x=1, y=1, z=1, frame=Frame("asset"))
self.orientation: Orientation = Orientation(
x=0, y=0, z=0, w=1, frame=Frame.Asset
x=0, y=0, z=0, w=1, frame=Frame("asset")
)
self.pose: Pose = Pose(
position=self.position, orientation=self.orientation, frame=Frame.Asset
position=self.position, orientation=self.orientation, frame=Frame("asset")
)

self.example_images: Path = Path(
Expand Down