Skip to content

Commit

Permalink
add manjaro installation instructions (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA authored Feb 10, 2025
1 parent 2595804 commit b82ac53
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 24 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,36 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
- runs-on: ubuntu-22.04
container: "ubuntu:22.04"
target: all
- os: windows-2022

- runs-on: windows-2022
container: "" # Containers on Windows runners are not supported
target: dronecan_v2
runs-on: ${{ matrix.os }}

- runs-on: ubuntu-22.04
container: "manjaro:latest"
target: "all"

runs-on: ${{ matrix.runs-on }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies
- name: Install dependencies (Ubuntu & Manjaro & Windows)
run: |
python -m pip install -r requirements.txt
pip install -r requirements.txt
python -m pip install yakut
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get install -y gcc-arm-none-eabi
elif [ "${{ runner.os }}" == "Windows" ]; then
choco install -y gcc-arm-embedded make
choco install -y cmake
fi
python scripts/install.py
shell: bash

- name: Build
run: make ${{ matrix.target }}

- name: Deploy binaries to Telegram
if: matrix.os == 'ubuntu-22.04' && matrix.target == 'all' && github.ref == 'refs/heads/main' && github.repository == 'RaccoonlabDev/mini_v2_node'
if: matrix.runs-on == 'ubuntu-22.04' && matrix.target == 'all' && github.ref == 'refs/heads/main' && github.repository == 'RaccoonlabDev/mini_v2_node'
run: ./scripts/deploy_release_to_telegram.py --bot-token ${{ secrets.TELEGRAM_BOT_TOKEN }} --chat-id ${{ secrets.TELEGRAM_CHAT_ID }}
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Not suported or tested yet / In Roadmap:
- [ ] Dynamics Node Allocation (DNA),
- [ ] Vibration Analysis: estimate dominant frequency and magnitude of vibrations for diagnosing mechanical issues or ensuring smooth operation in drones or robotic platforms in real time,

### 2. SUPPORTED HARDWARE
### 2. TARGET HARDWARE

The software supports RL v2 nodes (stm32f103, 128 KBytes flash) and v3 nodes (stm32g0b1, 512 KBytes flash).

Expand All @@ -31,15 +31,6 @@ The software supports RL v2 nodes (stm32f103, 128 KBytes flash) and v3 nodes (st
| Mini v2 </br> stm32f103 </br> 128 KBytes flash | <img src="https://docs.raccoonlab.co/assets/img/view_top.6b0ef99e.png" alt="drawing" width="120"> | <img src="https://docs.raccoonlab.co/assets/img/pinout.c14a3021.png" alt="drawing" width="120"> | <img src="https://raw.githubusercontent.com/RaccoonLabHardware/mini_v2_stm32cubemx_project/main/Assets/stm32cubemx.png" alt="drawing" width="160"> |
| Mini v3 </br> stm32fg0b1 </br> 512 KBytes flash | <img src="https://docs.raccoonlab.co/assets/img/t-view-bottom.7eadba26.png" alt="drawing" width="120"> | <img src="https://docs.raccoonlab.co/assets/img/pinout.e7b1d6b7.png" alt="drawing" width="120"> | <img src="https://github.com/RaccoonLabHardware/v3-software-template/blob/main/Assets/stm32cubemx.png" alt="drawing" width="160"> |

The following table outlines the compatibility of the project with different operating systems, modes, and support timelines.

| **Operating System** | **DroneCAN Support** | **Cyphal Support** | **Notes** |
|-----------------------|-----------------------|---------------------|----------------------------------------|
| Ubuntu 24.04 | ✅ Supported | ✅ Supported | Latest Ubuntu LTS version. |
| Ubuntu 22.04 | ✅ Supported | ✅ Supported | Fully supported for both modes. |
| Ubuntu 20.04 | ✅ Supported | ❌ Not Supported | Will be deprecated in April, 2026. |
| Windows (2022) | ✅ Supported | ✅ Supported | Current "latest" Windows version. |

### 3. USE CASES

This node is a versatile device integrating PWM control, IMU sensing, and dual CAN bus communication, suitable for various applications in robotics, drones, and other embedded systems. Below are the detailed use cases for different scenarios.
Expand Down Expand Up @@ -90,12 +81,33 @@ This node is a versatile device integrating PWM control, IMU sensing, and dual C

> Software doesn't support it yet...
### 4. INSTALLATION

The following table outlines the compatibility of the project with different operating systems, modes, and support timelines.

| **Operating System** | **DroneCAN Support** | **Cyphal Support** | **Notes** |
|----------------------|----------------------|--------------------|----------------------------------------|
| Manjaro (latest) | ✅ Supported | ✅ Supported | Latest Manjaro LTS version. |
| Ubuntu 24.04 | ✅ Supported | ✅ Supported | Latest Ubuntu LTS version. |
| Ubuntu 22.04 | ✅ Supported | ✅ Supported | Fully supported for both modes. |
| Ubuntu 20.04 | ✅ Supported | ❌ Not Supported | Will be deprecated in April, 2026. |
| Windows (2022) | ✅ Supported | ✅ Supported | Current "latest" Windows version. |

The installation process is the same Ubuntu, Manjaro and Windows and it consists of 2 steps:

```bash
# 1. Install python requirements
pip install -r requirements.txt

# 2. Install other requirements
./scripts/install.py
```

### 4. Q&A
### 5. Q&A

If you are strugguling with the software building, please refer to the build workflow [build.yml](.github/workflows/build.yml) for a hint. If it doesn't help, you can open [an issue]( https://github.com/RaccoonlabDev/mini_v2_node/issues?q=is%3Aissue+).

### 5. More examples
### 6. More examples

Consider the following projects as examples:

Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
setuptools
pyyaml
cpplint
raccoonlab-tools==0.2.0
59 changes: 59 additions & 0 deletions scripts/install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env python3
"""
Install.py
"""

import sys
import platform
import subprocess


def run_command(command):
try:
print(f"$ {command}")
subprocess.run(command, shell=True, check=True)
except subprocess.CalledProcessError:
print("Error: Command execution failed")
sys.exit(1)
except KeyboardInterrupt:
print("KeyboardInterrupt")

def main():
system_name = platform.system().lower()

if system_name == "windows":
print("Detected Windows. Installing packages...")
run_command("choco install -y gcc-arm-embedded make cmake")

elif system_name == "linux":
try:
# Detect Linux distribution
with open("/etc/os-release", "r") as f:
os_info = f.read().lower()

if "ubuntu" in os_info or "debian" in os_info:
print("Detected Ubuntu/Debian. Installing packages...")
run_command("sudo apt-get install -y gcc-arm-none-eabi")

elif "manjaro" in os_info:
print("Detected Manjaro. Installing packages...")
run_command("sudo pacman -S cmake arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib")

else:
print("Unknown Linux distribution.")
sys.exit(1)

except FileNotFoundError:
print("Could not determine Linux distribution.")
sys.exit(1)

elif system_name == "darwin":
print("macOS is not supported at the moment.")
sys.exit(1)

else:
print("Unknown platform.")
sys.exit(1)

if __name__ == "__main__":
main()

0 comments on commit b82ac53

Please sign in to comment.