From 68365d8bee4f2157f6769989717b870d2dc92e19 Mon Sep 17 00:00:00 2001 From: Gui Date: Tue, 31 Oct 2023 15:21:26 -0700 Subject: [PATCH 01/17] Concepts - Canbus Service Overview --- .../docs/concepts/canbus_service/README.md | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/website/docs/concepts/canbus_service/README.md b/website/docs/concepts/canbus_service/README.md index a8cc1f0c5..97c708e2e 100644 --- a/website/docs/concepts/canbus_service/README.md +++ b/website/docs/concepts/canbus_service/README.md @@ -3,6 +3,39 @@ id: canbus-overview title: CANBUS --- -# Canbus Service Overview +# Canbus Service Concepts -(Coming soon!) +The Canbus service is an integral component of the Amiga platform. +This service offers direct control over the robot's motors, allowing users to both +publish motor states and send specific commands to manipulate the robot's movements. + +## Overview + +- **Purpose**: Control and manage the motors on the Amiga, handling command reception, +processing, and motor instruction. +- **Communication**: Direct interface with motors via Canbus, a communication standard +or microcontrollers and devices. +- **Dependencies**: Standalone service, but pivotal for many autonomous operations. +Notably, the Controller service is heavily reliant on the Canbus service. + +## API + +1. `/twist`: Receives twist commands (linear and angular velocities) and instructs the +motors accordingly. +2. `/can_message`: Accepts a specific Protobuf message format (details TBD). +3. `/get_battery_state`: Returns the battery state. +A float value indicating the battery's state of charge, ranging [0.0, 1.0]. +If no motors are connected, it returns -1.0. + +## Safety and Operation + +- **Operating Mode**: The robot should be in automode (activated via the dashboard) +to utilize the Canbus service. +- **Safety Perimeter**: Establish a clear perimeter when operating the robot, as motor +commands will induce movement, ensuring safe operation. + +## Common Use-Cases + +The Canbus service is foundational for many of Amiga's autonomous functionalities. +For instance, the Controller service is a prominent client of the Canbus service, making the +Canbus service pivotal for any autonomous motion or activity undertaken by the Amiga. From cb836f74c1ccbea08bc3fdca45325f2016c7dd6c Mon Sep 17 00:00:00 2001 From: Gui Date: Tue, 31 Oct 2023 15:36:25 -0700 Subject: [PATCH 02/17] Fixed header --- website/docs/concepts/canbus_service/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/concepts/canbus_service/README.md b/website/docs/concepts/canbus_service/README.md index 97c708e2e..143ad9c65 100644 --- a/website/docs/concepts/canbus_service/README.md +++ b/website/docs/concepts/canbus_service/README.md @@ -3,7 +3,7 @@ id: canbus-overview title: CANBUS --- -# Canbus Service Concepts +# Canbus Service Overview The Canbus service is an integral component of the Amiga platform. This service offers direct control over the robot's motors, allowing users to both From 655b1f81c24853dacd20cb5c116abb69e0918e16 Mon Sep 17 00:00:00 2001 From: Gui Date: Tue, 31 Oct 2023 16:19:23 -0700 Subject: [PATCH 03/17] BKR - Events Recorder & File Reader & File Converter --- .../docs/examples/events_recorder/README.md | 19 ++++++++++++-- .../docs/examples/file_converter/README.md | 26 ++++++++++++++++--- website/docs/examples/file_reader/README.md | 22 +++++++++++++++- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/website/docs/examples/events_recorder/README.md b/website/docs/examples/events_recorder/README.md index dbbe3c6e1..488aba3bf 100644 --- a/website/docs/examples/events_recorder/README.md +++ b/website/docs/examples/events_recorder/README.md @@ -5,8 +5,23 @@ title: Events Recorder ## Events Recorder -In [this example](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/event_recorder/main.py) -we show how to record events from farm-ng-brain using +:::info Basic Knowledge Requirements + +Before diving into this example, here's a quick heads-up on what you'll need to be familiar with: + +1. **Python Programming**: It's essential to be well-versed in Python, as the example leverages foundational +concepts such as functions, conditional statements, and command-line argument parsing using the +argparse module. + +2. **Asynchronous Programming with asyncio**: A good understanding of Python's asyncio library is +crucial since the example employs asynchronous functions and tasks, denoted by the `async/await` syntax. + +3. **Protocol Buffers (protobuf)**: Familiarity with Protocol Buffers and how they work in Python, +especially since the example uses protobuf messages like EventServiceConfig and methods such as proto_from_json_file. +::: + +In the [**Events Recorder**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/event_recorder/main.py) +example we show how to record events from farm-ng-brain using the `EventClient` class. ### 1. Install the [farm-ng Brain ADK package](/docs/brain/brain-install) diff --git a/website/docs/examples/file_converter/README.md b/website/docs/examples/file_converter/README.md index 8d19c7f3e..784eb9798 100644 --- a/website/docs/examples/file_converter/README.md +++ b/website/docs/examples/file_converter/README.md @@ -3,11 +3,31 @@ id: file-converter title: File Converter --- - # File Converter Example -> [This example](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_converter/main.py) -will take the `*.bin` log file for a given Oak Camera Stream or snapshot +:::info Basic Knowledge Requirements + +Before diving into this example, here's a quick overview of what you'll need to be familiar with: + +1. **Python Programming**: This example is based in Python, making use of various foundational +constructs like functions, conditional statements, and object-oriented techniques. + +2. **File Handling**: The central operation in this example is reading from a `.bin` file and writing +data to either `.mp4` video files or `.jpg` image files. +Therefore, understanding how file I/O works in Python, especially with binary files, is crucial. + +3. **OpenCV**: The OpenCV library is leveraged extensively in this example, especially for operations +related to image decoding, processing, and video writing. +A basic understanding of these aspects of OpenCV is necessary. + +4. **File Conversion and Visualization**: The primary goal of this example is to convert data +from a log file into a visual format, either as a video or a series of images.Knowledge about the +basics of multimedia formats, especially videos and images, is beneficial. + +::: + +> The [**File Converter example**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_converter/main.py) + will take the `*.bin` log file for a given Oak Camera Stream or snapshot > captured by the Recorder app on an Amiga brain and convert it to either > `*.mp4` videos or `*.jpg` images for each view stream. diff --git a/website/docs/examples/file_reader/README.md b/website/docs/examples/file_reader/README.md index 26ee6d568..b898e3607 100644 --- a/website/docs/examples/file_reader/README.md +++ b/website/docs/examples/file_reader/README.md @@ -5,9 +5,29 @@ title: File Reader # File Reader Example +:::info Basic Knowledge Requirements + +Before diving into this example, here's a quick overview of what you'll need to be familiar with: + +1. **Python Programming**: Mastery of Python is essential, as the example employs foundational +concepts such as functions, conditional statements, and working with third-party libraries. + +2. **File Handling**: Proficiency in reading from and processing files in Python, particularly binary +log files. +The essence of this example is to demonstrate how to navigate through and interpret data from a log file. + +3. **OpenCV**: A foundational understanding of the OpenCV library, particularly functions related to +image decoding and display, as the example showcases how to visualize camera images from the log file. + +4. **Log File Manipulation**: Insight into how log files work, especially reading and parsing them, +is crucial. +This example emphasizes the playback mode, wherein data from a previously recorded log file is +processed for review. +::: + In this example you will learn how to upload a given log file and use it to run the -[**file_reader example**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader/main.py). +[**File Reader Example**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader/main.py). ## Install the [farm-ng Brain ADK package](/docs/brain/brain-install) From c1d9d1d097910d69d981883108a1d572d3cce65a Mon Sep 17 00:00:00 2001 From: Gui Date: Tue, 31 Oct 2023 17:49:47 -0700 Subject: [PATCH 04/17] BKR File Reader Can --- .../docs/examples/file_reader_can/README.md | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/website/docs/examples/file_reader_can/README.md b/website/docs/examples/file_reader_can/README.md index d0ad7e3e3..b4fb0ad27 100644 --- a/website/docs/examples/file_reader_can/README.md +++ b/website/docs/examples/file_reader_can/README.md @@ -5,8 +5,26 @@ title: File Reader CAN # File Reader CAN Example -This [**file_reader_can example**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader_can/main.py) -parses the CAN data from a recorded log and prints the `AmigaTpdo1` parsed +:::info Basic Knowledge Requirements + +Before diving into this example, here's a quick overview of what you'll need to be familiar with: + +1. **Python Programming**: This code is written in Python. +Basic constructs such as functions, conditional statements, loops, and more are utilized. + +2. **File Handling**: The code reads from a .bin file, specifically a log file containing +recorded CAN data. +Understanding file I/O, especially with binary files, is essential. + +3. **CAN Protocol**: CAN (Controller Area Network) is a robust communication protocol used mainly +in automotive and industrial applications. +In this example, the log file contains recorded CAN messages, and the goal is to parse and +display specific message types. +Familiarity with the basics of CAN is beneficial. +::: + +This [**File Reader Can**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader_can/main.py) +example parses the CAN data from a recorded log and prints the `AmigaTpdo1` parsed values. The `AmigaTpdo1` can packet contains the `state`, `speed`, and `angular rate` of the Amiga, as reported by the vehicle control unit (VCU). From bb61bddb81b6d1b171c9c0c520ebfc3b5333ae49 Mon Sep 17 00:00:00 2001 From: Gui Date: Tue, 31 Oct 2023 17:58:15 -0700 Subject: [PATCH 05/17] BKR File Reader GPS --- website/docs/examples/file_reader_gps/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/website/docs/examples/file_reader_gps/README.md b/website/docs/examples/file_reader_gps/README.md index 732e2bfb8..2238fcebf 100644 --- a/website/docs/examples/file_reader_gps/README.md +++ b/website/docs/examples/file_reader_gps/README.md @@ -5,8 +5,19 @@ title: File Reader GPS # File Reader GPS Example -This [**file_reader_gps_example**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_reader_gps/main.py) -provides a utility for reading and parsing GPS messages from the event file. +:::info Basic Knowledge Requirements + +1. **Python Programming**: Understanding basic Python programming concepts such as functions, loops, +conditional statements, and type-checking. + +2. **File Handling**: Familiarity with reading binary files in Python. + +3. **GPS Data**: Knowledge of GPS-related metrics, such as latitude, longitude, altitude, +and ground speed. +::: + +This [**File Reader Gps**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_reader_gps/main.py) +example provides a utility for reading and parsing GPS messages from the event file. It can process two types of GPS messages: `relposned` and `pvt`. The user specifies the type of GPS message to parse, and the script reads the corresponding data, unpacks it, and prints it to the console. From a86e40b076ee3173e9538780a677ef922426395a Mon Sep 17 00:00:00 2001 From: Gui Date: Wed, 1 Nov 2023 13:59:24 -0700 Subject: [PATCH 06/17] Fix GPS example --- .../docs/examples/file_reader_gps/README.md | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/website/docs/examples/file_reader_gps/README.md b/website/docs/examples/file_reader_gps/README.md index 2238fcebf..b5e7f2377 100644 --- a/website/docs/examples/file_reader_gps/README.md +++ b/website/docs/examples/file_reader_gps/README.md @@ -10,31 +10,15 @@ title: File Reader GPS 1. **Python Programming**: Understanding basic Python programming concepts such as functions, loops, conditional statements, and type-checking. -2. **File Handling**: Familiarity with reading binary files in Python. - -3. **GPS Data**: Knowledge of GPS-related metrics, such as latitude, longitude, altitude, -and ground speed. +2. **GPS Concepts**: We also recommend you check our [GPS Service webpage](../../concepts/gps_service) ::: -This [**File Reader Gps**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_reader_gps/main.py) +This [**File Reader GPS**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_reader_gps/main.py) example provides a utility for reading and parsing GPS messages from the event file. It can process two types of GPS messages: `relposned` and `pvt`. The user specifies the type of GPS message to parse, and the script reads the corresponding data, unpacks it, and prints it to the console. -:::info -There are two types of GPS messages: **PVT** and **RELPOSNED**. - -**PVT** (Position, Velocity, and Time) messages provide the all-in-one solution: position, velocity, -and time. -It contains details like longitude, latitude, altitude, speed, and UTC time. - -**RELPOSNED** (Relative Positioning) messages provide relative position -information in a North, East, Down (N-E-D) frame. It's mainly used for applications requiring relative -positioning between two receivers, often as a part of Real Time Kinematics (RTK) solutions. -It shows the difference in position between a "moving" receiver and a "fixed" reference receiver. -::: - ## Install the [farm-ng Brain ADK package](/docs/brain/brain-install) ## Download the example log file From 579e8a11c7fb656aa6c8d848cb968223d6680498 Mon Sep 17 00:00:00 2001 From: Gui Date: Wed, 1 Nov 2023 14:02:56 -0700 Subject: [PATCH 07/17] Fix Events Recorder Example --- website/docs/examples/events_recorder/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/website/docs/examples/events_recorder/README.md b/website/docs/examples/events_recorder/README.md index 488aba3bf..1c2957486 100644 --- a/website/docs/examples/events_recorder/README.md +++ b/website/docs/examples/events_recorder/README.md @@ -13,11 +13,7 @@ Before diving into this example, here's a quick heads-up on what you'll need to concepts such as functions, conditional statements, and command-line argument parsing using the argparse module. -2. **Asynchronous Programming with asyncio**: A good understanding of Python's asyncio library is -crucial since the example employs asynchronous functions and tasks, denoted by the `async/await` syntax. - -3. **Protocol Buffers (protobuf)**: Familiarity with Protocol Buffers and how they work in Python, -especially since the example uses protobuf messages like EventServiceConfig and methods such as proto_from_json_file. +2. **Recorder Concepts**: We also recommend you check our [Recorder Service webpage](../../concepts/recorder_service) ::: In the [**Events Recorder**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/event_recorder/main.py) From 3ad0871f41e508438f29c4412409703148c26dd3 Mon Sep 17 00:00:00 2001 From: Gui Date: Wed, 1 Nov 2023 14:05:39 -0700 Subject: [PATCH 08/17] Fix File Reader Example --- website/docs/examples/file_reader/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/website/docs/examples/file_reader/README.md b/website/docs/examples/file_reader/README.md index b898e3607..712e5abc2 100644 --- a/website/docs/examples/file_reader/README.md +++ b/website/docs/examples/file_reader/README.md @@ -18,11 +18,6 @@ The essence of this example is to demonstrate how to navigate through and interp 3. **OpenCV**: A foundational understanding of the OpenCV library, particularly functions related to image decoding and display, as the example showcases how to visualize camera images from the log file. - -4. **Log File Manipulation**: Insight into how log files work, especially reading and parsing them, -is crucial. -This example emphasizes the playback mode, wherein data from a previously recorded log file is -processed for review. ::: In this example you will learn how to upload a given log file and From b062e67c70c5cb3d9d39f79f349805a0d796c69f Mon Sep 17 00:00:00 2001 From: Gui Date: Wed, 1 Nov 2023 14:07:26 -0700 Subject: [PATCH 09/17] Fix File Reader Canbus example --- website/docs/examples/file_reader_can/README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/website/docs/examples/file_reader_can/README.md b/website/docs/examples/file_reader_can/README.md index b4fb0ad27..a2aa9a597 100644 --- a/website/docs/examples/file_reader_can/README.md +++ b/website/docs/examples/file_reader_can/README.md @@ -12,15 +12,7 @@ Before diving into this example, here's a quick overview of what you'll need to 1. **Python Programming**: This code is written in Python. Basic constructs such as functions, conditional statements, loops, and more are utilized. -2. **File Handling**: The code reads from a .bin file, specifically a log file containing -recorded CAN data. -Understanding file I/O, especially with binary files, is essential. - -3. **CAN Protocol**: CAN (Controller Area Network) is a robust communication protocol used mainly -in automotive and industrial applications. -In this example, the log file contains recorded CAN messages, and the goal is to parse and -display specific message types. -Familiarity with the basics of CAN is beneficial. +2. **Canbus Concepts**: We also recommend you check our [Canbus Service webpage](../../concepts/canbus_service) ::: This [**File Reader Can**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader_can/main.py) From 23ab8dcb89c655d822f8449f65cf06f6905d3520 Mon Sep 17 00:00:00 2001 From: Gui Date: Wed, 1 Nov 2023 14:10:27 -0700 Subject: [PATCH 10/17] Fix File Converter Example --- website/docs/examples/file_converter/README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/website/docs/examples/file_converter/README.md b/website/docs/examples/file_converter/README.md index 784eb9798..72da3e0a2 100644 --- a/website/docs/examples/file_converter/README.md +++ b/website/docs/examples/file_converter/README.md @@ -12,18 +12,9 @@ Before diving into this example, here's a quick overview of what you'll need to 1. **Python Programming**: This example is based in Python, making use of various foundational constructs like functions, conditional statements, and object-oriented techniques. -2. **File Handling**: The central operation in this example is reading from a `.bin` file and writing -data to either `.mp4` video files or `.jpg` image files. -Therefore, understanding how file I/O works in Python, especially with binary files, is crucial. - -3. **OpenCV**: The OpenCV library is leveraged extensively in this example, especially for operations -related to image decoding, processing, and video writing. -A basic understanding of these aspects of OpenCV is necessary. - -4. **File Conversion and Visualization**: The primary goal of this example is to convert data +2. **File Conversion and Visualization**: The primary goal of this example is to convert data from a log file into a visual format, either as a video or a series of images.Knowledge about the basics of multimedia formats, especially videos and images, is beneficial. - ::: > The [**File Converter example**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_converter/main.py) From 77b968dd149c8b46f9fde39da9dc4365ad81bbc9 Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:50:00 -0700 Subject: [PATCH 11/17] Update website/docs/concepts/canbus_service/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/concepts/canbus_service/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/concepts/canbus_service/README.md b/website/docs/concepts/canbus_service/README.md index 143ad9c65..763b752ce 100644 --- a/website/docs/concepts/canbus_service/README.md +++ b/website/docs/concepts/canbus_service/README.md @@ -13,7 +13,7 @@ publish motor states and send specific commands to manipulate the robot's moveme - **Purpose**: Control and manage the motors on the Amiga, handling command reception, processing, and motor instruction. -- **Communication**: Direct interface with motors via Canbus, a communication standard +- **Communication**: Direct interface with motors via CAN bus, a communication standard or microcontrollers and devices. - **Dependencies**: Standalone service, but pivotal for many autonomous operations. Notably, the Controller service is heavily reliant on the Canbus service. From a2245cf71a0c5b72aef076e7d6121a45514d1990 Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:51:35 -0700 Subject: [PATCH 12/17] Update website/docs/examples/file_converter/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/examples/file_converter/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/website/docs/examples/file_converter/README.md b/website/docs/examples/file_converter/README.md index 72da3e0a2..68f48ff4a 100644 --- a/website/docs/examples/file_converter/README.md +++ b/website/docs/examples/file_converter/README.md @@ -11,10 +11,6 @@ Before diving into this example, here's a quick overview of what you'll need to 1. **Python Programming**: This example is based in Python, making use of various foundational constructs like functions, conditional statements, and object-oriented techniques. - -2. **File Conversion and Visualization**: The primary goal of this example is to convert data -from a log file into a visual format, either as a video or a series of images.Knowledge about the -basics of multimedia formats, especially videos and images, is beneficial. ::: > The [**File Converter example**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_converter/main.py) From c41876a41e784929940c0bff81b7b9f3d1e1cbb6 Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:51:56 -0700 Subject: [PATCH 13/17] Update website/docs/examples/file_reader_gps/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/examples/file_reader_gps/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/examples/file_reader_gps/README.md b/website/docs/examples/file_reader_gps/README.md index b5e7f2377..449ee14d6 100644 --- a/website/docs/examples/file_reader_gps/README.md +++ b/website/docs/examples/file_reader_gps/README.md @@ -10,7 +10,8 @@ title: File Reader GPS 1. **Python Programming**: Understanding basic Python programming concepts such as functions, loops, conditional statements, and type-checking. -2. **GPS Concepts**: We also recommend you check our [GPS Service webpage](../../concepts/gps_service) +2. **[farm-ng GPS Service Overview](/docs/concepts/gps_service/)**: +This overview provides a base understanding of the gRPC service the client you create will connect to. ::: This [**File Reader GPS**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/file_reader_gps/main.py) From 5f6304a2d10e54e11ff719157b0835b2b3a8e17a Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:54:31 -0700 Subject: [PATCH 14/17] Update website/docs/examples/file_reader_can/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/examples/file_reader_can/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/examples/file_reader_can/README.md b/website/docs/examples/file_reader_can/README.md index a2aa9a597..b56f124a6 100644 --- a/website/docs/examples/file_reader_can/README.md +++ b/website/docs/examples/file_reader_can/README.md @@ -12,7 +12,8 @@ Before diving into this example, here's a quick overview of what you'll need to 1. **Python Programming**: This code is written in Python. Basic constructs such as functions, conditional statements, loops, and more are utilized. -2. **Canbus Concepts**: We also recommend you check our [Canbus Service webpage](../../concepts/canbus_service) +2. **[farm-ng Canbus Service Overview](/docs/concepts/canbus_service/)**: +This overview provides a base understanding of the gRPC service the client you create will connect to. ::: This [**File Reader Can**](https://github.com/farm-ng/farm-ng-amiga/tree/main-v2/py/examples/file_reader_can/main.py) From 5245242098a352c0cbe395669327fd39fb8e575c Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:56:26 -0700 Subject: [PATCH 15/17] Update website/docs/examples/file_reader/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/examples/file_reader/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/website/docs/examples/file_reader/README.md b/website/docs/examples/file_reader/README.md index 712e5abc2..0874b4f14 100644 --- a/website/docs/examples/file_reader/README.md +++ b/website/docs/examples/file_reader/README.md @@ -12,11 +12,7 @@ Before diving into this example, here's a quick overview of what you'll need to 1. **Python Programming**: Mastery of Python is essential, as the example employs foundational concepts such as functions, conditional statements, and working with third-party libraries. -2. **File Handling**: Proficiency in reading from and processing files in Python, particularly binary -log files. -The essence of this example is to demonstrate how to navigate through and interpret data from a log file. - -3. **OpenCV**: A foundational understanding of the OpenCV library, particularly functions related to +2. **OpenCV**: A foundational understanding of the OpenCV library, particularly functions related to image decoding and display, as the example showcases how to visualize camera images from the log file. ::: From 5587bccaf25529d14d9800bbd6a6e0770b55264a Mon Sep 17 00:00:00 2001 From: Guilherme <39603677+guilhermedemouraa@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:56:36 -0700 Subject: [PATCH 16/17] Update website/docs/examples/events_recorder/README.md Co-authored-by: Kyle Coble <53625197+Hackerman342@users.noreply.github.com> --- website/docs/examples/events_recorder/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/examples/events_recorder/README.md b/website/docs/examples/events_recorder/README.md index 1c2957486..4913ab73d 100644 --- a/website/docs/examples/events_recorder/README.md +++ b/website/docs/examples/events_recorder/README.md @@ -13,7 +13,8 @@ Before diving into this example, here's a quick heads-up on what you'll need to concepts such as functions, conditional statements, and command-line argument parsing using the argparse module. -2. **Recorder Concepts**: We also recommend you check our [Recorder Service webpage](../../concepts/recorder_service) +2. **[farm-ng Recorder Service Overview](/docs/concepts/recorder_service/)**: +This overview provides a base understanding of the gRPC service the client you create will connect to. ::: In the [**Events Recorder**](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/py/examples/event_recorder/main.py) From b49a3958f617a5e3290bd6e5d252f517091ab623 Mon Sep 17 00:00:00 2001 From: Gui Date: Thu, 2 Nov 2023 14:58:27 -0700 Subject: [PATCH 17/17] Add data streams to canbus service --- website/docs/concepts/canbus_service/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/docs/concepts/canbus_service/README.md b/website/docs/concepts/canbus_service/README.md index 763b752ce..a66affa30 100644 --- a/website/docs/concepts/canbus_service/README.md +++ b/website/docs/concepts/canbus_service/README.md @@ -27,6 +27,22 @@ motors accordingly. A float value indicating the battery's state of charge, ranging [0.0, 1.0]. If no motors are connected, it returns -1.0. +# Data Streams + +- `/twist`: The commanded linear velocity of the vehicle in the x direction in meters per second. + Check the protobuf definition for more details: + [canbus_pb2.Twist2d](https://github.com/farm-ng/farm-ng-amiga/blob/main/protos/farm_ng/canbus/canbus.proto#L58-L61) + +- `/raw_messages`:A representation of raw CAN bus messages with timestamps, node IDs, error +flags, remote transmission indicators, and encoded payloads. +Check the protobuf definition for more details: +[canbus_pb2.RawCanbusMessages](https://github.com/farm-ng/farm-ng-amiga/blob/main/protos/farm_ng/canbus/canbus.proto#L95-L107) + +- `/state`: State of the Amiga CAN bus. + Encapsulates key information required to evaluate the state of the Amiga robot. + Check the protobuf definition for more details: + [amiga_v6_pb2.AmigaV6CanbusState](https://github.com/farm-ng/farm-ng-amiga/blob/main-v2/protos/farm_ng/canbus/amiga_v6.proto) + ## Safety and Operation - **Operating Mode**: The robot should be in automode (activated via the dashboard)