Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
64bbfab
verified working foxglove bridge, docker build and run start.sh --har…
iserverobotics-bona Jan 16, 2026
d515d9d
verified rviz flag work, route planner flag work, and can use joystic…
iserverobotics-bona Jan 16, 2026
e2c60e6
verified working on robot, without src folder and build folder copied…
iserverobotics-bona Jan 16, 2026
d0b6ffe
verified working foxglove layout, docker build, added goal send featu…
iserverobotics-bona Jan 16, 2026
3061d60
verified working with both humble and jazzy, use --jazzy or --humble …
iserverobotics-bona Jan 17, 2026
f5bf1c1
switch to use dev branch for ros-navigation-autonomy-stack, added pat…
iserverobotics-bona Jan 17, 2026
137d87c
fix: move foxglove relay scripts to foxglove_utility folder, remove u…
iserverobotics-bona Jan 18, 2026
e7b686b
add warning log if cv_bridge.h not found during Humble compatibility fix
iserverobotics-bona Jan 18, 2026
9907939
add message when stashing local changes in build.sh
iserverobotics-bona Jan 18, 2026
1628189
add warnings when fallback GIDs are used for device permissions
iserverobotics-bona Jan 18, 2026
5f1d610
fix: source ROS setup.bash correctly and auto-install dimos package a…
iserverobotics-bona Jan 18, 2026
e430b80
add langchain dependencies and pre-install dimos package in navigatio…
iserverobotics-bona Jan 18, 2026
d314f81
udpate build image size
iserverobotics-bona Jan 18, 2026
01d8072
changed dependency fixed launch bug
alexlin2 Jan 18, 2026
f6f5537
docs: update image size estimate from 10 GB to 24 GB
iserverobotics-bona Jan 19, 2026
8473830
updated README for G1 EDU
alexlin2 Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
334 changes: 240 additions & 94 deletions docker/navigation/Dockerfile

Large diffs are not rendered by default.

486 changes: 486 additions & 0 deletions docker/navigation/Overwatch.json

Large diffs are not rendered by default.

88 changes: 70 additions & 18 deletions docker/navigation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,39 @@ This is an optimistic overview. Use the commands below for an in depth version.

```bash
cd docker/navigation
./build.sh
./build.sh --humble # Build with ROS 2 Humble (default)
# or
./build.sh --jazzy # Build with ROS 2 Jazzy
```

This will:
- Clone the ros-navigation-autonomy-stack repository (jazzy branch)
- Clone the ros-navigation-autonomy-stack repository (matching branch: humble or jazzy)
- Build a Docker image with both ROS and DimOS dependencies
- Set up the environment for both systems

Note that the build will take over 10 minutes and build an image over 30GiB.
The resulting image will be named `dimos_autonomy_stack:humble` or `dimos_autonomy_stack:jazzy` depending on the option used.

Note that the build will take a while and produce an image of approximately 24 GB.

**Run the simulator to test it's working:**

Use the same ROS distribution flag as your build:

```bash
./start.sh --simulation
./start.sh --simulation --humble # If built with --humble
# or
./start.sh --simulation --jazzy # If built with --jazzy
```

## Manual build
<details>
<summary><h2>Manual build</h2></summary>

Go to the docker dir and clone the ROS navigation stack.
Go to the docker dir and clone the ROS navigation stack (choose the branch matching your ROS distribution).

```bash
cd docker/navigation
git clone -b humble git@github.com:dimensionalOS/ros-navigation-autonomy-stack.git
# or
git clone -b jazzy git@github.com:dimensionalOS/ros-navigation-autonomy-stack.git
```

Expand All @@ -50,13 +61,17 @@ tar -xf ../../data/.lfs/office_building_1.tar.gz
mv office_building_1 unity_models
```

Then, go back to the root and build the docker image:
Then, go back to the root (from docker/navigation) and build the docker image:

```bash
cd ../..
docker compose -f docker/navigation/docker-compose.yml build
cd ../.. # Back to dimos root
ROS_DISTRO=humble docker compose -f docker/navigation/docker-compose.yml build
# or
ROS_DISTRO=jazzy docker compose -f docker/navigation/docker-compose.yml build
```

</details>

## On Real Hardware

### Configure the WiFi
Expand All @@ -77,48 +92,85 @@ cp .env.hardware .env
Key configuration parameters:

```bash
# Robot Configuration
ROBOT_CONFIG_PATH=unitree/unitree_go2 # Robot type (mechanum_drive, unitree/unitree_go2, unitree/unitree_g1)

# Lidar Configuration
LIDAR_INTERFACE=eth0 # Your ethernet interface (find with: ip link show)
LIDAR_COMPUTER_IP=192.168.1.5 # Computer IP on the lidar subnet
LIDAR_GATEWAY=192.168.1.1 # Gateway IP address for the lidar subnet
LIDAR_IP=192.168.1.116 # Full IP address of your Mid-360 lidar
LIDAR_IP=192.168.1.1xx # xx = last two digits from lidar QR code serial number
ROBOT_IP= # IP addres of robot on local network (if using WebRTC connection)

# Motor Controller
MOTOR_SERIAL_DEVICE=/dev/ttyACM0 # Serial device (check with: ls /dev/ttyACM*)
# Special Configuration for Unitree G1 EDU
For the Unitree G1 EDU, use these specific values:
LIDAR_COMPUTER_IP=192.168.123.5
LIDAR_GATEWAY=192.168.123.1
LIDAR_IP=192.168.123.120
ROBOT_IP=192.168.12.1 # For WebRTC local AP mode (optional, need additional wifi dongle)
```

### Start the Container
### Start the Navigation Stack

#### Start with Route Planner automatically

Use --humble or --jazzy matching your build:

```bash
./start.sh --hardware --humble --route-planner # Run route planner automatically
./start.sh --hardware --humble --route-planner --rviz # Route planner + RViz2 visualization
./start.sh --hardware --humble --dev # Development mode (mount src for config editing)
```

Start the container and leave it open.
[Foxglove Studio](https://foxglove.dev/download) is the default visualization tool. It's ideal for remote operation - SSH with port forwarding to the robot's mini PC and run commands there:

```bash
./start.sh --hardware
ssh -L 8765:localhost:8765 user@robot-ip
```

Then on your local machine:
1. Open Foxglove and connect to `ws://localhost:8765`
2. Load the layout from `docker/navigation/Overwatch.json` (Layout menu → Import)
3. Click in the 3D panel to drop a target pose (similar to RViz). The "Autonomy ON" indicator should be green, and "Goal Reached" will show when the robot arrives.

<details>
<summary><h4>Start manually</h4></summary>

Start the container and leave it open. Use the same ROS distribution flag as your build:

```bash
./start.sh --hardware --humble # If built with --humble
# or
./start.sh --hardware --jazzy # If built with --jazzy
```

It doesn't do anything by default. You have to run commands on it by `exec`-ing:

To enter the container from another terminal:

```bash
docker exec -it dimos_hardware_container bash
```

### In the container
##### In the container

In the container to run the full navigation stack you must run both the dimensional python runfile with connection module and the navigation stack.

#### Dimensional Python + Connection Module
###### Dimensional Python + Connection Module

For the Unitree G1
```bash
dimos run unitree-g1
ROBOT_IP=XX.X.X.XXX dimos run unitree-g1 # If ROBOT_IP env variable is not set in .env
```

#### Navigation Stack
###### Navigation Stack

```bash
cd /ros2_ws/src/ros-navigation-autonomy-stack
./system_real_robot_with_route_planner.sh
```

Now you can place goal points/poses in RVIZ by clicking the "Goalpoint" button. The robot will navigate to the point, running both local and global planners for dynamic obstacle avoidance.

</details>
74 changes: 67 additions & 7 deletions docker/navigation/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,79 @@ set -e

GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'

# Default ROS distribution
ROS_DISTRO="humble"

# Parse command line arguments
while [[ $# -gt 0 ]]; do
case $1 in
--humble)
ROS_DISTRO="humble"
shift
;;
--jazzy)
ROS_DISTRO="jazzy"
shift
;;
--help|-h)
echo "Usage: $0 [OPTIONS]"
echo ""
echo "Options:"
echo " --humble Build with ROS 2 Humble (default)"
echo " --jazzy Build with ROS 2 Jazzy"
echo " --help, -h Show this help message"
echo ""
echo "Examples:"
echo " $0 # Build with ROS Humble (default)"
echo " $0 --jazzy # Build with ROS Jazzy"
echo " $0 --humble # Build with ROS Humble"
exit 0
;;
*)
echo -e "${RED}Unknown option: $1${NC}"
echo "Run '$0 --help' for usage information"
exit 1
;;
esac
done

export ROS_DISTRO

echo -e "${GREEN}================================================${NC}"
echo -e "${GREEN}Building DimOS + ROS Autonomy Stack Docker Image${NC}"
echo -e "${GREEN}ROS Distribution: ${ROS_DISTRO}${NC}"
echo -e "${GREEN}================================================${NC}"
echo ""

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"

# Clone or checkout ros-navigation-autonomy-stack with dev branch
if [ ! -d "ros-navigation-autonomy-stack" ]; then
echo -e "${YELLOW}Cloning ros-navigation-autonomy-stack repository...${NC}"
git clone -b jazzy git@github.com:dimensionalOS/ros-navigation-autonomy-stack.git
echo -e "${YELLOW}Cloning ros-navigation-autonomy-stack repository (dev branch)...${NC}"
git clone -b dev git@github.com:dimensionalOS/ros-navigation-autonomy-stack.git
echo -e "${GREEN}Repository cloned successfully!${NC}"
else
# Directory exists, ensure we're on the dev branch
cd ros-navigation-autonomy-stack
CURRENT_BRANCH=$(git branch --show-current)
if [ "$CURRENT_BRANCH" != "dev" ]; then
echo -e "${YELLOW}Switching from ${CURRENT_BRANCH} to dev branch...${NC}"
# Stash any local changes (e.g., auto-generated config files)
if git stash --quiet 2>/dev/null; then
echo -e "${YELLOW}Stashed local changes${NC}"
fi
git fetch origin dev
git checkout dev
git pull origin dev
echo -e "${GREEN}Switched to dev branch${NC}"
else
echo -e "${GREEN}Already on dev branch${NC}"
fi
cd ..
fi

if [ ! -d "unity_models" ]; then
Expand All @@ -29,7 +88,7 @@ fi
echo ""
echo -e "${YELLOW}Building Docker image with docker compose...${NC}"
echo "This will take a while as it needs to:"
echo " - Download base ROS Jazzy image"
echo " - Download base ROS ${ROS_DISTRO^} image"
echo " - Install ROS packages and dependencies"
echo " - Build the autonomy stack"
echo " - Build Livox-SDK2 for Mid-360 lidar"
Expand All @@ -42,18 +101,19 @@ cd ../..
docker compose -f docker/navigation/docker-compose.yml build

echo ""
echo -e "${GREEN}================================${NC}"
echo -e "${GREEN}============================================${NC}"
echo -e "${GREEN}Docker image built successfully!${NC}"
echo -e "${GREEN}================================${NC}"
echo -e "${GREEN}Image: dimos_autonomy_stack:${ROS_DISTRO}${NC}"
echo -e "${GREEN}============================================${NC}"
echo ""
echo "To run in SIMULATION mode:"
echo -e "${YELLOW} ./start.sh${NC}"
echo -e "${YELLOW} ./start.sh --${ROS_DISTRO}${NC}"
echo ""
echo "To run in HARDWARE mode:"
echo " 1. Configure your hardware settings in .env file"
echo " (copy from .env.hardware if needed)"
echo " 2. Run the hardware container:"
echo -e "${YELLOW} ./start.sh --hardware${NC}"
echo -e "${YELLOW} ./start.sh --hardware --${ROS_DISTRO}${NC}"
echo ""
echo "The script runs in foreground. Press Ctrl+C to stop."
echo ""
Loading
Loading