This document provides a comprehensive reference for all scripts in the CostNav repository.
Location: costnav_isaaclab/scripts/rl_games/train.py
Purpose: Train navigation policies using RL-Games (PPO algorithm)
Usage:
python scripts/rl_games/train.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--headless \
--num_envs=64
Arguments:
--task: Environment name (required)--enable_cameras: Enable RGB-D camera observations--headless: Run without GUI (faster)--num_envs: Number of parallel environments--resume: Resume from latest checkpoint--checkpoint: Path to specific checkpoint--seed: Random seed for reproducibilityOutput:
costnav_isaaclab/logs/rl_games/<task>/nn/costnav_isaaclab/logs/rl_games/<task>/summaries/costnav_isaaclab/logs/rl_games/<task>/config.yamlLocation: costnav_isaaclab/scripts/rsl_rl/train.py
Purpose: Train using RSL-RL (lightweight PPO implementation)
Usage:
python scripts/rsl_rl/train.py --task=Template-Costnav-Isaaclab-v2-NavRL
Advantages:
Location: costnav_isaaclab/scripts/sb3/train.py
Purpose: Train using Stable-Baselines3 (popular RL library)
Usage:
python scripts/sb3/train.py --task=Template-Costnav-Isaaclab-v2-NavRL
Advantages:
Location: costnav_isaaclab/scripts/skrl/train.py
Purpose: Train using SKRL (modular RL library)
Usage:
python scripts/skrl/train.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--headless \
--num_envs=64
Arguments:
--task: Environment name (required)--enable_cameras: Enable RGB-D camera observations--headless: Run without GUI (faster)--num_envs: Number of parallel environments--checkpoint: Path to specific checkpoint to resume from--seed: Random seed for reproducibility--track: Enable wandb tracking--wandb-project-name: Wandb project name--wandb-entity: Wandb entity (username or team)--wandb-name: Wandb run nameAdvantages:
Location: costnav_isaaclab/scripts/rl_games/evaluate.py
Purpose: Evaluate trained policy on test scenarios
Usage:
python scripts/rl_games/evaluate.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--checkpoint=path/to/checkpoint.pth \
--num_envs=64
Output:
Location: costnav_isaaclab/scripts/rl_games/play.py
Purpose: Visualize trained policy in simulation
Usage:
python scripts/rl_games/play.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--checkpoint=path/to/checkpoint.pth
Arguments:
--task: Environment name (required)--enable_cameras: Enable RGB-D camera observations--checkpoint: Path to specific checkpoint--use_last_checkpoint: Use the last saved model instead of best (when no checkpoint provided)Features:
Location: costnav_isaaclab/scripts/skrl/evaluate.py
Purpose: Evaluate trained SKRL policy on test scenarios
Usage:
python scripts/skrl/evaluate.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--checkpoint=path/to/checkpoint.pt \
--num_envs=64 \
--num_episodes=100
Arguments:
--task: Environment name (required)--enable_cameras: Enable RGB-D camera observations--checkpoint: Path to specific checkpoint--use_last_checkpoint: Use the last saved model instead of best (when no checkpoint provided)--num_envs: Number of parallel environments--num_episodes: Number of episodes to evaluateOutput:
Location: costnav_isaaclab/scripts/skrl/play.py
Purpose: Visualize trained SKRL policy in simulation
Usage:
python scripts/skrl/play.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras \
--checkpoint=path/to/checkpoint.pt
Arguments:
--task: Environment name (required)--enable_cameras: Enable RGB-D camera observations--checkpoint: Path to specific checkpoint--use_last_checkpoint: Use the last saved model instead of best (when no checkpoint provided)Features:
Location: costnav_isaaclab/scripts/list_envs.py
Purpose: List all registered environments
Usage:
python scripts/list_envs.py
Output:
Registered environments:
- Template-Costnav-Isaaclab-v0
- Template-Costnav-Isaaclab-v1-CustomMap
- Template-Costnav-Isaaclab-v2-NavRL
Location: costnav_isaaclab/scripts/test_controller.py
Purpose: Test deterministic controller (sanity check)
Usage:
python scripts/test_controller.py \
--task=Template-Costnav-Isaaclab-v2-NavRL \
--enable_cameras
What it does:
Location: costnav_isaaclab/scripts/test_v2_rewards.py
Purpose: Test reward function components
Usage:
python scripts/test_v2_rewards.py \
--task=Template-Costnav-Isaaclab-v2-NavRL
What it does:
Location: costnav_isaaclab/scripts/zero_agent.py
Purpose: Baseline agent that takes zero actions
Usage:
python scripts/zero_agent.py \
--task=Template-Costnav-Isaaclab-v2-NavRL
Purpose:
Location: costnav_isaaclab/scripts/random_agent.py
Purpose: Baseline agent that takes random actions
Usage:
python scripts/random_agent.py \
--task=Template-Costnav-Isaaclab-v2-NavRL
Purpose:
Location: tools/generate_vscode_settings.py
Purpose: Generate VS Code settings for Isaac Sim development
Usage:
python tools/generate_vscode_settings.py --isaac-sim /path/to/isaac-sim
What it does:
.vscode/.python.envOutput:
# .vscode/.python.env
PYTHONPATH=/path/to/isaac-sim/exts/omni.isaac.core:/path/to/isaac-sim/exts/omni.isaac.kit:...
Location: costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL/find_safe_positions.py
Purpose: Generate safe spawn/goal positions using raycasting
Usage:
cd costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL
python find_safe_positions.py --visualize_raycasts
What it does:
safe_positions_auto_generated.pyArguments:
--visualize_raycasts: Show raycasts in simulation (slower)--num_samples: Number of positions to sample--grid_size: Grid spacing for samplingLocation: costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL/safe_area_validator.py
Purpose: Validate existing safe positions
Usage:
cd costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL
python safe_area_validator.py
What it does:
safe_positions_auto_generated.pyLocation: costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL/check_navmesh.py
Purpose: Visualize navigation mesh (if available)
Usage:
cd costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL
python check_navmesh.py
What it does:
Location: costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL/check_impulse.py
Purpose: Test contact impulse thresholds
Usage:
cd costnav_isaaclab/source/costnav_isaaclab/costnav_isaaclab/tasks/manager_based/costnav_isaaclab_v2_NavRL
python check_impulse.py
What it does:
Location: train.sbatch
Purpose: Submit training job to SLURM cluster
Usage:
sbatch train.sbatch
What it does:
logs/Configuration:
#SBATCH --job-name=costnav-train
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=8
#SBATCH --gres=gpu:1
#SBATCH --time=24:00:00
#SBATCH --output=logs/costnav-train_%j.out
#SBATCH --error=logs/costnav-train_%j.err
Location: docker-compose.yml
Purpose: Define Docker services for development
Usage:
# Start Isaac Lab service
docker compose --profile isaac-lab up -d
# Start Isaac Sim service
docker compose --profile isaac-sim up -d
# Start dev service (no simulator)
docker compose --profile dev up -d
# Stop all services
docker compose down
Services:
isaac-lab: Full Isaac Lab + Isaac Sim stackisaac-sim: Bare Isaac Simdev: Lightweight dev environmentLocation: Makefile
Purpose: Build Docker images
Usage:
# Build all images
make build-all
# Build specific image
make build-isaac-lab
# Build with custom version
make build-isaac-lab COSTNAV_VERSION=0.2.0
list_envs.py to verify environment registrationtest_controller.py to verify environment setuptest_v2_rewards.py to verify reward functionzero_agent.py and random_agent.py for baselinesevaluate.py for quantitative metricsplay.py for qualitative assessmenttest_controller.py to isolate environment issuestest_v2_rewards.py to debug reward function--headless=False to visualize behaviornum_envs to simplify debugging