Skip to content

codermery/Barn-Challange-Setup

Repository files navigation

BARN Challenge — Docker Setup

The Benchmark Autonomous Robot Navigation (BARN) Challenge with ROS Melodic + Gazebo 9, fully containerized with Docker for easy setup on any machine.


Requirements

  • Docker (v20.10+)
  • Docker Compose (v2.0+)
  • Linux with X11 display server (for Gazebo GUI)
  • ~8 GB free disk space (for Docker image)

Quick Start

1. Clone the repository

git clone https://github.com/codermery/Barn-Challange-Setup.git
cd Barn-Challange-Setup

2. Build the Docker image

docker compose build

First build takes ~10-15 minutes. It downloads Jackal packages, installs ROS dependencies, and compiles the catkin workspace automatically.

3. Allow GUI display access (run once per session)

xhost +local:docker

4. Start the container

docker compose run barn-challenge bash

You are now inside the container, in /jackal_ws/src/the-barn-challenge.


Running the Challenge

All commands below are run inside the container.

Run a single world (with GUI)

python3 run.py --world_idx 0 --gui

Run a single world (headless, no GUI)

python3 run.py --world_idx 0

Run all 50 test worlds

bash test.sh

Results are saved to out.txt.

World index reference

The BARN dataset has 300 worlds. The 50 official test worlds are spaced 6 apart:

Test # World index
1 0
2 6
3 12
... ...
50 294

Use --world_idx N to select any world from 0 to 299.


Modifying the Navigation Code

Your navigation code lives in navigation_pkg/. To edit it and rebuild inside the container:

# Edit your files, then rebuild only your package:
cd /jackal_ws
catkin_make --pkg navigation_pkg
source devel/setup.bash

Alternatively, uncomment the volume mount in docker-compose.yml to sync changes from host to container in real time:

volumes:
  - ./navigation_pkg:/jackal_ws/src/the-barn-challenge/navigation_pkg

Project Structure

.
├── Dockerfile               # Docker image definition
├── docker-compose.yml       # Easy run configuration
├── run.py                   # Main test script
├── test.sh                  # Runs all 50 test worlds
├── gazebo_simulation.py     # Gazebo interface
├── navigation_pkg/          # Your navigation code (modify this)
│   └── launch/
│       └── VFH_launch.launch
├── jackal_helper/           # Jackal robot helper package
└── res/                     # World files and assets

Troubleshooting

Gazebo doesn't open / black screen

xhost +local:docker   # run this on the host, not inside container

cannot connect to X server error Make sure DISPLAY is set on the host:

echo $DISPLAY   # should output something like :1

Build fails with network errors Check your internet connection and retry:

docker compose build --no-cache

Notes

  • The Docker image is based on ros:melodic with Gazebo 9 and the full Jackal simulation stack.
  • Jackal packages (jackal, jackal_simulator) are cloned from the official repositories during build.
  • Python dependencies (transforms3d, scikit-fuzzy, scipy, etc.) are installed automatically.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors