From 608b16c8001072f1474faef9375dc46ba34bf064 Mon Sep 17 00:00:00 2001 From: Andrew Jong Date: Tue, 3 Jun 2025 18:12:23 -0400 Subject: [PATCH 01/10] Fix issue where static tf from isaac mavros_enu to robot map was missing --- .../src/robot_bringup/launch/static_transforms.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml b/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml index e5fa843ba..694d52f09 100644 --- a/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml +++ b/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml @@ -4,7 +4,7 @@ pkg="tf2_ros" exec="static_transform_publisher" name="static_transform_publisher" - args="0 0 0 -1.57079632679 0 0 map_FLU map" /> + args="0 0 0 0 0 0 mavros_enu map" /> - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/robot/ros_ws/src/autonomy/autonomy_bringup/launch/autonomy.launch.xml b/robot/ros_ws/src/autonomy/autonomy_bringup/launch/autonomy.launch.xml index 0380d6c7e..88cfb088e 100644 --- a/robot/ros_ws/src/autonomy/autonomy_bringup/launch/autonomy.launch.xml +++ b/robot/ros_ws/src/autonomy/autonomy_bringup/launch/autonomy.launch.xml @@ -1,22 +1,22 @@ - + - + - + - + - + - + \ No newline at end of file diff --git a/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml b/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml index 6c93953ad..b76d1727d 100644 --- a/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml +++ b/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml @@ -37,7 +37,7 @@ - + diff --git a/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml b/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml index 694d52f09..0a2da8b2e 100644 --- a/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml +++ b/robot/ros_ws/src/robot_bringup/launch/static_transforms.launch.xml @@ -1,19 +1,13 @@ + + - - From 2ee1a428353b0f80c1719c4d8f854370512cb11d Mon Sep 17 00:00:00 2001 From: Andrew Jong Date: Tue, 3 Jun 2025 18:24:52 -0400 Subject: [PATCH 03/10] Add docs on overrides --- docs/development/docker_usage.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/development/docker_usage.md b/docs/development/docker_usage.md index f509e9082..ece633f1e 100644 --- a/docs/development/docker_usage.md +++ b/docs/development/docker_usage.md @@ -1,4 +1,4 @@ -# Workflow with Docker and Docker Compose +# Launch Workflow with Docker and Docker Compose To mimic interacting with multiple real world robots, we use Docker Compose to manage Docker containers that isolate the simulation, each robot, and the ground control station. @@ -163,3 +163,32 @@ graph TD style D fill:#fbf,stroke:#333,stroke-width:2px ``` + +## Docker Compose Variable Overrides +Sometimes you may want to test different configurations of the autonomy stack. For example, you may want to disable automatically playing the sim on startup, +or to change a child launch file. + +The `docker compose` workflow is designed to support these overrides for local development. +`docker compose` uses `.env` files to set docker-compose variables that get propagated and interpolated into `docker-compose.yaml` files. +See the [docker compose documentation](https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/) for more details. + +The default `.env` file is in the project root directory. +When no `--env-file` argument is passed to `docker compose`, it automatically uses this default `.env` file. + +To override the default `.env` file, you can pass the `--env-file` argument to `docker compose` with a path to your custom `.env` file. + +For example, this command disables playing the simulation on startup by overriding the `PLAY_SIM_ON_START` variable: +```bash +docker compose --env-file .env --env-file overrides/no_play_sim_on_start.env up -d +``` + +As another example, this command changes the perception launch file to `perception_no_macvo.launch.xml`: +```bash +docker compose --env-file .env --env-file overrides/no_macvo.env up -d +``` + + +When overriding, the default `.env` file must be loaded first. The overrides are applied on top of it. + + + From e9eed5679f0e4f77ecf9d222d09e6eaea045b89b Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Jun 2025 22:36:11 +0000 Subject: [PATCH 04/10] Fix typo in print_usage function to display commands correctly --- airstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airstack.sh b/airstack.sh index 6def39f97..e6c31e44d 100755 --- a/airstack.sh +++ b/airstack.sh @@ -34,7 +34,7 @@ function print_usage { echo "Available commands:" # Sort commands alphabetically - local sorted_ommands=($(echo "${!COMMANDS[@]}" | tr ' ' '\n' | sort)) + local sorted_commands=($(echo "${!COMMANDS[@]}" | tr ' ' '\n' | sort)) # Calculate the longest command name for padding local max_len=0 From 7864d894fc0c154079babe8f6d27de979d4e22ce Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Jun 2025 22:42:55 +0000 Subject: [PATCH 05/10] Add support for --env-file arguments in airstack up command --- airstack.sh | 113 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 108 insertions(+), 5 deletions(-) diff --git a/airstack.sh b/airstack.sh index e6c31e44d..71e1384e7 100755 --- a/airstack.sh +++ b/airstack.sh @@ -505,9 +505,58 @@ function cmd_setup { function cmd_up { check_docker - # Build docker-compose command - local cmd="docker compose -f $PROJECT_ROOT/docker-compose.yaml up $@ -d" + local env_files=() + local other_args=() + + # Convert arguments to array for easier processing + local args=("$@") + local i=0 + + while [ $i -lt ${#args[@]} ]; do + local arg="${args[$i]}" + + if [[ "$arg" == "--env-file" ]]; then + # Get the next argument as the env file path + i=$((i+1)) + if [ $i -lt ${#args[@]} ]; then + env_files+=("--env-file" "${args[$i]}") + else + log_error "Missing value for --env-file argument" + return 1 + fi + elif [[ "$arg" == "--env-file="* ]]; then + # Handle --env-file=path format + env_files+=("$arg") + else + # Skip the command name 'up' itself + if [[ "$arg" != "up" ]]; then + other_args+=("$arg") + fi + fi + + i=$((i+1)) + done + + # Build docker-compose command with env files before the 'up' command + local cmd="docker compose -f $PROJECT_ROOT/docker-compose.yaml" + + # Add all env files + for env_file in "${env_files[@]}"; do + cmd="$cmd $env_file" + done + + # Add the 'up' command and other arguments + cmd="$cmd up" + + # Add other arguments if any + if [ ${#other_args[@]} -gt 0 ]; then + cmd="$cmd ${other_args[*]}" + fi + # Add -d flag + cmd="$cmd -d" + + log_info "Executing: $cmd" eval "$cmd" log_info "Services brought up successfully" } @@ -775,12 +824,66 @@ if [ $# -eq 0 ]; then exit 0 fi -command="$1" -shift +# Process arguments to handle global options +global_options=() +command_args=() +found_command=false +command="" + +# Convert arguments to array for easier processing +args=("$@") +i=0 +while [ $i -lt ${#args[@]} ]; do + arg="${args[$i]}" + + if [ "$found_command" = true ]; then + # After the command, collect all arguments + command_args+=("$arg") + elif [[ "$arg" == "--"* ]]; then + # This is a global option + global_options+=("$arg") + + # If it's --env-file, also grab the next argument + if [[ "$arg" == "--env-file" && $((i+1)) -lt ${#args[@]} ]]; then + next_arg="${args[$((i+1))]}" + if [[ "$next_arg" != "--"* && -n "${COMMANDS[$next_arg]}" ]]; then + # Next arg is a command, don't grab it + : + else + # Next arg is the env file path, grab it + i=$((i+1)) + global_options+=("$next_arg") + fi + fi + else + # This is the command + command="$arg" + found_command=true + fi + + i=$((i+1)) +done + +# If no command was found, the first non-option argument is the command +if [ "$found_command" = false ]; then + for arg in "${args[@]}"; do + if [[ "$arg" != "--"* ]]; then + command="$arg" + break + fi + done + + # If still no command found, show usage + if [ -z "$command" ]; then + print_usage + exit 1 + fi +fi # Check if command exists if [[ -n "${COMMANDS[$command]}" ]]; then - # Execute the command function + # Execute the command function with all arguments + # We pass all args to preserve the original order which is important for some commands ${COMMANDS[$command]} "$@" elif [ "$command" == "commands" ]; then # Special case for listing all commands From 6b060ceb5b7fbb34286ec46e81b4e75435481f6a Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Jun 2025 22:51:37 +0000 Subject: [PATCH 06/10] Fix command dispatcher to properly handle commands with global options --- airstack.sh | 50 ++++++++------------------------------------------ 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/airstack.sh b/airstack.sh index 71e1384e7..4da1ddac9 100755 --- a/airstack.sh +++ b/airstack.sh @@ -824,50 +824,16 @@ if [ $# -eq 0 ]; then exit 0 fi -# Process arguments to handle global options -global_options=() -command_args=() -found_command=false +# Simple command detection - just look for the first argument that matches a command command="" -# Convert arguments to array for easier processing -args=("$@") -i=0 -while [ $i -lt ${#args[@]} ]; do - arg="${args[$i]}" - - if [ "$found_command" = true ]; then - # After the command, collect all arguments - command_args+=("$arg") - elif [[ "$arg" == "--"* ]]; then - # This is a global option - global_options+=("$arg") - - # If it's --env-file, also grab the next argument - if [[ "$arg" == "--env-file" && $((i+1)) -lt ${#args[@]} ]]; then - next_arg="${args[$((i+1))]}" - if [[ "$next_arg" != "--"* && -n "${COMMANDS[$next_arg]}" ]]; then - # Next arg is a command, don't grab it - : - else - # Next arg is the env file path, grab it - i=$((i+1)) - global_options+=("$next_arg") - fi - fi - else - # This is the command - command="$arg" - found_command=true - fi - - i=$((i+1)) -done - -# If no command was found, the first non-option argument is the command -if [ "$found_command" = false ]; then - for arg in "${args[@]}"; do - if [[ "$arg" != "--"* ]]; then +# First check if the first argument is a command +if [[ -n "${COMMANDS[$1]}" || "$1" == "commands" || "$1" == "help" ]]; then + command="$1" +else + # Otherwise, look through all arguments for a command + for arg in "$@"; do + if [[ -n "${COMMANDS[$arg]}" || "$arg" == "commands" || "$arg" == "help" ]]; then command="$arg" break fi From 2da00198b9e8bbac5491f9dd8c42315adfca88d8 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Jun 2025 22:55:41 +0000 Subject: [PATCH 07/10] Fix command dispatcher to properly filter command name from arguments --- airstack.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/airstack.sh b/airstack.sh index 4da1ddac9..dcd9b3a2d 100755 --- a/airstack.sh +++ b/airstack.sh @@ -848,9 +848,17 @@ fi # Check if command exists if [[ -n "${COMMANDS[$command]}" ]]; then - # Execute the command function with all arguments - # We pass all args to preserve the original order which is important for some commands - ${COMMANDS[$command]} "$@" + # Execute the command function with filtered arguments + # We need to remove the command name from the arguments + filtered_args=() + for arg in "$@"; do + if [[ "$arg" != "$command" ]]; then + filtered_args+=("$arg") + fi + done + + # Execute the command with the filtered arguments + ${COMMANDS[$command]} "${filtered_args[@]}" elif [ "$command" == "commands" ]; then # Special case for listing all commands list_commands From 5a57a0ab3fcde75c644b8fb4479ac04e544fc2fe Mon Sep 17 00:00:00 2001 From: Andrew Jong Date: Tue, 3 Jun 2025 18:44:01 -0400 Subject: [PATCH 08/10] Add note on ubuntu version --- docs/getting_started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/getting_started.md b/docs/getting_started.md index ce9028a73..a82cac14f 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -16,6 +16,8 @@ You need at least 25GB free to install the Docker image. Check the hardware requirements for the NVIDIA Isaac Sim [here](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html). A GPU of GeForce RTX 4080 or higher is recommended for the best performance. +AirStack is primarily tested on Ubuntu 22.04. + ## Clone ```bash git clone --recursive -j8 git@github.com:castacks/AirStack.git From f9ca26610eb235c56047e90ca2f283f22702c381 Mon Sep 17 00:00:00 2001 From: Andrew Jong Date: Tue, 3 Jun 2025 19:01:50 -0400 Subject: [PATCH 09/10] Add note about contribution --- docs/getting_started.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/getting_started.md b/docs/getting_started.md index a82cac14f..d51cbdcb6 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -3,6 +3,10 @@ !!! warning "" AirStack is currently in ALPHA and only meant for internal usage. + + We'd really appreciate your feedback and contributions to improve this project for everyone! + Please join our #airstack channel on Slack to contribute or ask questions. + You will need to have an account with AirLab to access the AirLab Docker registry, Nucleus server, and other resources. The API and functionality are not stable and are subject to change. From ef690cd7e4f565d2975f5ff21224a78b66666cce Mon Sep 17 00:00:00 2001 From: Andrew Jong Date: Tue, 3 Jun 2025 19:11:50 -0400 Subject: [PATCH 10/10] Remove main version increment workflow --- .github/workflows/main_version_increment.yaml | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/main_version_increment.yaml diff --git a/.github/workflows/main_version_increment.yaml b/.github/workflows/main_version_increment.yaml deleted file mode 100644 index 6440dbd88..000000000 --- a/.github/workflows/main_version_increment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: Check Project Version Increment - -on: - pull_request: - branches: [main] - -jobs: - check_version: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Get Current Version from PR - run: | - PR_VERSION=$(grep 'PROJECT_VERSION=' .env | cut -d'=' -f2 | tr -d '"') - echo "PR_VERSION=$PR_VERSION" >> $GITHUB_ENV - - - name: Get Previous Version from Main - run: | - git fetch origin main - PREV_VERSION=$(git show origin/main:.env | grep 'PROJECT_VERSION=' | cut -d'=' -f2 | tr -d '"') - echo "PREV_VERSION=$PREV_VERSION" >> $GITHUB_ENV - - - name: Validate Version Increment - run: | - compare_versions() { - IFS='.' read -r -a CUR <<< "$PR_VERSION" - IFS='.' read -r -a PREV <<< "$PREV_VERSION" - - if (( CUR[0] > PREV[0] )); then exit 0; fi - if (( CUR[0] == PREV[0] && CUR[1] > PREV[1] )); then exit 0; fi - if (( CUR[0] == PREV[0] && CUR[1] == PREV[1] && CUR[2] > PREV[2] )); then exit 0; fi - echo "ERROR: PROJECT_VERSION must be incremented semantically. Current: $PR_VERSION, Previous: $PREV_VERSION" - exit 1 - } - compare_versions - - - name: Report Success - run: | - echo "PROJECT_VERSION successfully incremented: $PR_VERSION"