Skip to content

Commit

Permalink
Merge branch 'main' into update-project-name
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba authored Nov 25, 2022
2 parents f59443a + 025e355 commit a3a21f9
Show file tree
Hide file tree
Showing 37 changed files with 511 additions and 99 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# farm-ng Brain SDK

[![PyPI version](https://badge.fury.io/py/farm-ng-amiga.svg)](https://pypi.org/project/farm-ng-amiga)

## Install

### From pip

```bash
pip install farm-ng-amiga
```

### From source

We recommend running the brain SDK applications in a virtual environment to avoid conflicts with other packages / versions installed on your system.
Though this is not a requirement and you are welcome to decide how/where to install.

Expand Down
14 changes: 13 additions & 1 deletion license_header.txt
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
Copyright (c) farm-ng, inc.

Licensed under the Amiga Development Kit License (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
45 changes: 35 additions & 10 deletions protos/farm_ng/canbus/canbus.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
// Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
// Copyright (c) farm-ng, inc.
//
// Licensed under the Amiga Development Kit License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



syntax = "proto3";

Expand All @@ -12,6 +26,7 @@ service CanbusService {
rpc getServiceState(GetServiceStateRequest) returns (GetServiceStateResult) {}
rpc startService(StartServiceRequest) returns (StartServiceResult) {}
rpc stopService(StopServiceRequest) returns (StopServiceResult) {}
rpc pauseService(PauseServiceRequest) returns (PauseServiceResult) {}
}

enum ReplyStatus {
Expand All @@ -25,15 +40,7 @@ enum CanbusServiceState {
RUNNING = 2;
IDLE = 3;
UNAVAILABLE = 4;
}

message StopServiceRequest {
string message = 1;
}

message StopServiceResult {
string message = 1;
ReplyStatus status = 2;
ERROR = 5;
}

message StreamCanbusRequest {
Expand Down Expand Up @@ -71,11 +78,29 @@ message StartServiceRequest {
string message = 1;
}

message StopServiceRequest {
string message = 1;
}

message PauseServiceRequest {
string message = 1;
}

message StartServiceResult {
string message = 1;
ReplyStatus status = 2;
}

message StopServiceResult {
string message = 1;
ReplyStatus status = 2;
}

message PauseServiceResult {
string message = 1;
ReplyStatus status = 2;
}

message GetServiceStateRequest {
string message = 1;
}
Expand Down
16 changes: 15 additions & 1 deletion protos/farm_ng/controller/controller.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
// Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
// Copyright (c) farm-ng, inc.
//
// Licensed under the Amiga Development Kit License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



syntax = "proto3";

Expand Down
16 changes: 15 additions & 1 deletion protos/farm_ng/oak/oak.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
// Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
// Copyright (c) farm-ng, inc.
//
// Licensed under the Amiga Development Kit License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



syntax = "proto3";

Expand Down
16 changes: 15 additions & 1 deletion protos/farm_ng/state_estimator/state_estimator.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
// Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
// Copyright (c) farm-ng, inc.
//
// Licensed under the Amiga Development Kit License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



syntax = "proto3";

Expand Down
14 changes: 13 additions & 1 deletion py/examples/camera_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
15 changes: 13 additions & 2 deletions py/examples/camera_client/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc. All rights reserved.
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations

import argparse
Expand Down
2 changes: 1 addition & 1 deletion py/examples/camera_client/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
farm_ng>=0.0.0
farm-ng-amiga
opencv-python==4.6.0.66
numpy==1.23.2
14 changes: 13 additions & 1 deletion py/examples/camera_client_gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
15 changes: 13 additions & 2 deletions py/examples/camera_client_gui/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc. All rights reserved.
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import asyncio
import io
Expand Down
4 changes: 2 additions & 2 deletions py/examples/camera_client_gui/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#farm_ng>=0.0.0
kivy==2.1.0
farm-ng-amiga
kivy>=2.1.0
14 changes: 13 additions & 1 deletion py/examples/camera_pipeline/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
14 changes: 13 additions & 1 deletion py/examples/camera_pipeline/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Copyright (c) farm-ng, inc. Amiga Development Kit License, Version 0.1
# Copyright (c) farm-ng, inc.
#
# Licensed under the Amiga Development Kit License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/farm-ng/amiga-dev-kit/blob/main/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import asyncio

import cv2
Expand Down
29 changes: 6 additions & 23 deletions py/examples/file_reader/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Setup
# farm-ng-amiga file read example

## Setup

Create first a virtual environment

Expand All @@ -7,34 +9,15 @@ python3 -m venv venv
source venv/bin/activate
```

# Install

Clone the repo

```bash
git clone https://github.com/farm-ng/amiga-dev-kit.git
```

Go to the brain sdk directory and install

```bash
cd amiga-dev-kit/brain
pip install -e .
```

Check the version

```bash
python -c "import farm_ng; print(farm_ng.__version__)"
```

# Run example
## Install

```bash
cd examples/file_reader
pip install -r requirements.txt
```

## Run example

Specify the file (download before)

```bash
Expand Down
Loading

0 comments on commit a3a21f9

Please sign in to comment.