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) [![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. Includes all ROS2 packages for the rover. These are centrally located for modular rover operation.
<br>
## 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 1. Title
* Follow the standard ROS2 humble install process. Linux recommended. 3. Table of Contents
* https://docs.ros.org/en/humble/Installation.html 3. Software Requirements
* Colcon 1. ROS2 Humble
* `$ sudo apt update` 2. IP Configuration
* `$ sudo apt install python3-colcon-common-extensions` 4. Hardware Requirements
* Configured Static IP for Ubiquiti bullet (Process varies by OS) 5. Recommended Programs
* IP Address: 192.168.1.x 6. How to Use
* This can be just about anything not already in use. I recommend something 30-39 7. Common Problems/Troubleshooting
* Net Mask: 255.255.255.0 8. Major To-Do Items
* Gateway: 192.168.1.0 9. Author(s)
10. Maintainer(s)
## Launching with ANCHOR # Software Requirements
ANCHOR (Active Node Controller Hub and Operational Relay) Since July/August of 2025, ASTRA uses NixOS. A functioning NixOS installation is assumed.
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`
## 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 To install ROS2, run the following command in your /etc/nixos folder:
* Core1: `ssh clucky@192.168.1.69` ```nix
* Core2: `ssh clucky@192.168.1.70` nix flake init --template github:lopsided98/nix-ros-overlay
* 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`
## 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. ```bash
<br> $ sudo rosdep init # only run once
1. SSH to the the module's computer $ rosdep update
* Core1: `ssh clucky@192.168.1.69` $ rosdep install --from-path . --ignore-src -y
* 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> ## IP Configuration
2. Run the  headless node
* You must have ANCHOR or the module's Standalone node running - IP Address: 192.168.1.x
* Open a new terminal (SSH'd to the module) - This can be just about anything not already in use. I recommend something 30-39
* Navigate to rover-ros2 workspace - Net Mask: 255.255.255.0
* `cd rover-ros2` - Gateway: 192.168.1.0
* Source the workspace
* `source install/setup.bash` # Hardware Requirements
* Run the node (ensure controller is connected and on x-input mode)
* CORE: `ros2 run core_pkg headless` - A functioning computer.
* ARM: `ros2 run arm_pkg headless`
# 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 ## Connecting the GuliKit Controller
@@ -87,3 +96,25 @@ Connecting the GuliKit Controller (Recommended)
* Select the "X-Input" control mode (Windows logo) on the controller. * Select the "X-Input" control mode (Windows logo) on the controller.
* Hold the button next to the symbols (windows, android, switch, etc...) * 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 * 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 |