Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d6469fa
feature: add dockerized development environment for ROS 2 Humble
hugodidi Mar 5, 2026
1237dda
fix: correct script directory references in rl_sar build system
hugodidi Mar 5, 2026
3bbff26
refactor: simplify Dockerfile
hugodidi Mar 5, 2026
81a06c4
fix: correct script path (run/) for downloading Mujoco in README.md e…
hugodidi Mar 5, 2026
6069a31
refactor(docker): match container layout to README for reproducibility
hugodidi Mar 5, 2026
c6ad37f
fix: include missing unitree_sdk2 log headers and scope gitignore rules
hugodidi Mar 6, 2026
8db2989
chore: add banner to README.md
hugodidi Mar 6, 2026
d0597b4
fix(gazebo_sync): refactor plugin to use gazebo_ros::Node, fix multit…
hugodidi Mar 9, 2026
67b21e0
fix(g1_description): adjust Gazebo plugin z_offset to -0.82 for corre…
hugodidi Mar 9, 2026
6efaf53
fix(rl_sar): fix joint state publishing logic and maintain hardware j…
hugodidi Mar 9, 2026
90d8f19
fix(gazebo): set g1_29dof as default model for simulation launch and …
hugodidi Mar 9, 2026
6493430
build(docker): install Eclipse CycloneDDS to improve ROS2 network sta…
hugodidi Mar 9, 2026
6040b19
build(rl_sar): add sensor_msgs dependency and configure ROS2 node for…
hugodidi Mar 9, 2026
d14beec
fix: mujoco-> gazebo pose synchronization fixed, and collisions
hugodidi Mar 23, 2026
02aad11
fix: texture upload
hugodidi Mar 23, 2026
af2f8d4
refactor: repair nav stack
hugodidi Mar 23, 2026
e32aae4
feat: register rl_sar_zoo as git submodule
hugodidi Mar 25, 2026
e917cc7
fix: restore LiDAR config and inline Gazebo world models
hugodidi Mar 25, 2026
07e8a3c
docs: add Docker setup section to README and fix trailing newline in …
hugodidi Mar 25, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ROS2 / colcon build artifacts
build/
install/
log/
/log/

# Python
__pycache__/
Expand All @@ -28,3 +28,4 @@ venv/
# Optional: datasets / results
data/
results/
agent/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/rl_sar/src/rl_sar_zoo"]
path = src/rl_sar/src/rl_sar_zoo
url = https://github.com/fan-ziqi/rl_sar_zoo.git
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Navigation-Aware Hybrid Execution Stack for Unitree G1
## Hybrid Navigation + Locomotion (Gazebo/Nav2 + MuJoCo + Real)


![rl_hnav](https://github.com/user-attachments/assets/e201be1d-0509-41c8-b2e2-554f1865761a)

[![Ubuntu 22.04](https://img.shields.io/badge/Ubuntu-22.04-blue.svg?logo=ubuntu)](https://ubuntu.com/)
[![macOS](https://img.shields.io/badge/macOS-Experimental-orange.svg?logo=apple)](https://www.apple.com/macos/)
Expand Down Expand Up @@ -249,7 +249,7 @@ ls -lah rl_hnav/src/rl_sar/library/mujoco/lib/libmujoco.so.3.2.7
If your repo provides a helper script:

```bash
bash rl_hnav/src/rl_sar/scripts/download_mujoco.sh
bash rl_hnav/src/rl_sar/run/download_mujoco.sh
```

---
Expand All @@ -260,9 +260,37 @@ bash rl_hnav/src/rl_sar/scripts/download_mujoco.sh
cd ~/
git clone https://github.com/uleroboticsgroup/rl_hnav.git
cd rl_hnav

git submodule update --init --recursive
touch src/rl_sar/src/rl_sar_zoo/COLCON_IGNORE

# Create package.xml symlinks for ROS 2 (rl_sar uses package.ros2.xml)
for d in src/rl_sar/src/robot_msgs src/rl_sar/src/robot_joint_controller src/rl_sar/src/rl_sar; do
ln -sf package.ros2.xml "$d/package.xml"
done
```

---

## Docker (optional)

Build the image and start the container (requires NVIDIA GPU + `nvidia-container-toolkit`):

```bash
cd ~/rl_hnav
xhost +local:docker # allow GUI forwarding
docker compose -f docker/docker-compose.yml up -d
```

Enter the running container:

```bash
docker exec -it rl_hnav_container bash
```

> Inside the container your workspace is mounted at `/home/developer/rl_hnav`.
> All commands in the **Build** and **Run** sections below are meant to run **inside the container**.

---

## Build (ROS 2 friendly)
Expand Down
74 changes: 74 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Use official ROS 2 Humble base image
FROM osrf/ros:humble-desktop-full

# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# 1. Install system dependencies required for compilation and scripts
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
python3-pip \
python3-dev \
python3-numpy \
libtbb-dev \
libyaml-cpp-dev \
libglfw3-dev \
liblcm-dev \
pkg-config \
x11-apps \
mesa-utils \
libpython3-dev \
unzip \
wget \
sudo \
&& rm -rf /var/lib/apt/lists/*

# 2. Install ROS 2 dependencies
RUN apt-get update && apt-get install -y \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-rviz2 \
ros-humble-slam-toolbox \
ros-humble-robot-state-publisher \
ros-humble-joint-state-publisher-gui \
ros-humble-gazebo-ros-pkgs \
ros-humble-gazebo-msgs \
libgazebo-dev \
ros-humble-tf2-tools \
ros-humble-xacro \
ros-humble-control-toolbox \
ros-humble-realtime-tools \
ros-humble-joint-state-publisher \
ros-humble-hardware-interface \
ros-humble-controller-interface \
ros-humble-pluginlib \
ros-humble-urdf \
ros-humble-joint-state-broadcaster \
ros-humble-std-srvs \
ros-humble-ros2-controllers \
&& rm -rf /var/lib/apt/lists/*

# 3. Setup non-root user
ARG USERNAME=developer
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# 4. Hardware acceleration and Display envs
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
ENV QT_X11_NO_MITSHM 1

USER $USERNAME
WORKDIR /home/$USERNAME

# 5. Automatic sourcing
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc

CMD ["/bin/bash"]
26 changes: 26 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
rl_hnav_dev:
build:
context: ..
dockerfile: docker/Dockerfile
container_name: rl_hnav_container
network_mode: host
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ..:/home/developer/rl_hnav:rw
stdin_open: true
tty: true
privileged: true
# NVIDIA GPU access
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
4 changes: 4 additions & 0 deletions maps/g1_map.pgm

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions maps/g1_map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: g1_map.pgm
mode: trinary
resolution: 0.05
origin: [-18.6, -15.3, 0]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.25
Loading