docs: standardize README

This commit is contained in:
David
2025-10-26 06:54:13 -05:00
parent e351e4c991
commit 18a7b7e2ab

163
README.md
View File

@@ -1,83 +1,92 @@
# rover-ros2
# ASTRA Rover ROS2 Nodes
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
Submodule which includes all ros2 packages for the rover. These are centrally located for modular rover operation.
## About
You will use this package to launch any module-side ROS2 nodes.
<br>
Includes all ROS2 packages for the rover. These are centrally located for modular rover operation.
## Software Pre-reqs
You will use this package to launch all module-side ROS2 nodes.
An acting base station computer will need several things:
# Table of Contents
* ROS2 Humble
* Follow the standard ROS2 humble install process. Linux recommended.
* https://docs.ros.org/en/humble/Installation.html
* Colcon
* `$ sudo apt update`
* `$ sudo apt install python3-colcon-common-extensions`
* Configured Static IP for Ubiquiti bullet (Process varies by OS)
* IP Address: 192.168.1.x
* This can be just about anything not already in use. I recommend something 30-39
* Net Mask: 255.255.255.0
* Gateway: 192.168.1.0
1. Title
3. Table of Contents
3. Software Requirements
1. ROS2 Humble
2. IP Configuration
4. Hardware Requirements
5. Recommended Programs
6. How to Use
7. Common Problems/Troubleshooting
8. Major To-Do Items
9. Author(s)
10. Maintainer(s)
## Launching with ANCHOR
# Software Requirements
ANCHOR (Active Node Controller Hub and Operational Relay)
Allows for launching all nodes on the rover simulataneously. Additionally, all controls will run through the core's NUC and MCU.
<br>
1. SSH to core
* Core1: `ssh clucky@192.168.1.69`
* Core2: `ssh clucky@192.168.1.70`
* Password: \<can be found in the rover-Docs repo under documentation>
2. Navigate to rover-ros2 workspace
* `cd rover-ros2`
3. Source the workspace
* `source install/setup.bash`
4. Launch ANCHOR
* `ros2 launch rover_launch.py mode:=anchor`
Since July/August of 2025, ASTRA uses NixOS. A functioning NixOS installation is assumed.
## Launching as Standalone
## ROS2 Humble
For use when running independent modules through their respective computers (pi/NUC) without ANCHOR.
We use [ROS2 Humble](https://docs.ros.org/en/humble/index.html), and plan on using that until support for it expires.
1. SSH to the the module's computer
* Core1: `ssh clucky@192.168.1.69`
* Core2: `ssh clucky@192.168.1.70`
* Arm: `ssh arm@192.168.1.70`
* Bio: \<TBD>
* Password: \<can be found in the rover-Docs repo under documentation>
2. Run the main node (this sends commands to the MCU)
* Navigate to the rover-ros2 workspace (location may vary)
* `cd rover-ros2`
* Source the workspace
* `source install/setup.bash`
* Start the node
* ARM: `ros2 launch rover_launch.py mode:=arm`
* CORE: `ros2 launch rover_launch.py mode:=core`
* BIO: `ros2 launch rover_launch.py mode:=bio`
To install ROS2, run the following command in your /etc/nixos folder:
```nix
nix flake init --template github:lopsided98/nix-ros-overlay
```
## Running Headless
After you install ROS2, you can install all dependencies needed by this repository by running the following commands:
Headless control nodes (for ARM and CORE) allow running of the module on-rover without the operator having ROS2 installed on their machine. You will need a laptop to connect to the pi/NUC in order to launch headless but it can be disconnected after the nodes are spun up.
<br>
1. SSH to the the module's computer
* Core1: `ssh clucky@192.168.1.69`
* Core2: `ssh clucky@192.168.1.70`
* Arm: `ssh arm@192.168.1.70`
* Password: \<can be found in the rover-Docs repo under documentation>
2. Run the  headless node
* You must have ANCHOR or the module's Standalone node running
* Open a new terminal (SSH'd to the module)
* Navigate to rover-ros2 workspace
* `cd rover-ros2`
* Source the workspace
* `source install/setup.bash`
* Run the node (ensure controller is connected and on x-input mode)
* CORE: `ros2 run core_pkg headless`
* ARM: `ros2 run arm_pkg headless`
```bash
$ sudo rosdep init # only run once
$ rosdep update
$ rosdep install --from-path . --ignore-src -y
```
## IP Configuration
- IP Address: 192.168.1.x
- This can be just about anything not already in use. I recommend something 30-39
- Net Mask: 255.255.255.0
- Gateway: 192.168.1.0
# Hardware Requirements
- A functioning computer.
# Recommended Programs
## VSCode
VSCode is a wonderful program. I used it to make this project and recommend anyone else working on it use it as well.
To install VSCode, add the following package to your pkgs array / packages.nix config file:
```nix
vscode-fhs
```
Alternatively, use a flake to install home-manager, and add to your home.nix:
```nix
vscode.enable = true;
```
# How to Use
```bash
$ colcon build
$ source install/setup.bash
# main launch files:
$ ros2 launch anchor_pkg rover.launch.py
$ ros2 run headless_pkg headless_full
```
## Testing Serial
You can fake the presence of a Serial device (i.e., MCU) by using the following command:
```bash
socat -dd -v pty,rawer,crnl,link=/tmp/ttyACM9 pty,rawer,crnl,link=/tmp/ttyOUT
```
## Connecting the GuliKit Controller
@@ -87,3 +96,25 @@ Connecting the GuliKit Controller (Recommended)
* Select the "X-Input" control mode (Windows logo) on the controller.
* Hold the button next to the symbols (windows, android, switch, etc...)
* You'll need to release the button and press down again to cycle to the next mode
# Common Problems/Troubleshooting
- TBD
# Major To-Do Items
- TBD
# Author(s)
|Name| Email |
|--|--|
| Tristan McGinnis | tlm |
| David Sharpe | ds0196@uah.edu |
# Maintainer(s)
|Name| Email |
|--|--|
| David Sharpe | ds0196@uah.edu |
| Riley McClain | email |