Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
28f07c1
updating domain bridge to stream gps from robots to GCS
Mar 11, 2025
6abeb49
updating robot gps topic naming
Mar 11, 2025
860c2ed
adding docs for using TAK features
Mar 14, 2025
0aa5103
adding demo config
Mar 14, 2025
558f65e
Updating the GCS setup to a script and project config files and creds…
Mar 14, 2025
e389860
updating script for GCS setup
Mar 14, 2025
529981d
updating dev files
Mar 17, 2025
485e8b3
ros2cot_agent.py working
Mar 17, 2025
68a158a
ros2cot_agent in launch with mqtt
Mar 17, 2025
2655040
docker setup with gcs_bringup and ros2cot_agent
Mar 17, 2025
c04750a
updating setup.py for ros2tak_tools
Mar 17, 2025
2a4d9ca
cleaning demo_config.yaml
Mar 17, 2025
7e917b1
updating ros2tak_tools
Mar 17, 2025
345fb1e
successful build
Mar 18, 2025
6b72170
Update setup.py
Mar 18, 2025
ea554e0
updating the tak_publisher.py and tak_subscriber.py to send and recei…
Mar 18, 2025
cf072e5
adding tak_subscriber to the tak.launch.xml
Mar 18, 2025
5affe3d
updating dev commands
Mar 19, 2025
9c7f2e7
adding helper module
Mar 19, 2025
c366b9f
adding chat2ros_agent.py for sending commands
Mar 19, 2025
42ed625
one file for all the COT messages
Mar 19, 2025
e0d8f28
updating docs
Mar 19, 2025
33dc335
updating docs
Mar 19, 2025
808eb01
refactoring and modularizing files
Mar 19, 2025
9e3cd29
adding tak_helper.py
Mar 19, 2025
50a2e35
ros2cot_agent.py and chat2ros_agent.py working and integrated to tak.…
Mar 19, 2025
569bd3d
docs for debugging mqtt
Mar 19, 2025
af7a137
setup gcs errors fix
Mar 19, 2025
e2448c9
setup gcs validation
Mar 19, 2025
921a35d
Added straps_msgs submodule under common/ros_packages
Mar 19, 2025
3ac1ac4
adding ROS_DOMAIN_ID
Mar 19, 2025
16a111d
updating casevac related docs and its CasualtyMeta for array
Mar 20, 2025
6c9b28f
adding straps_msgs
Mar 20, 2025
0896d45
refactor / Clean
Mar 20, 2025
13b067a
Casualty assessment
Mar 20, 2025
edd6933
Casualty assessment in TAK
Mar 20, 2025
bacb309
dockerfile update with sphinx in GCS
Mar 20, 2025
d473eb3
Adding ROS_DOMAIN_ID
Mar 20, 2025
cde4177
cleaning docker-compose.yaml
Mar 20, 2025
4b95152
fixing ground-control-station-base-docker-compose.yaml
Mar 20, 2025
15013bd
validation on triage
Mar 20, 2025
7547540
launch just the ground-control-station container:
Mar 25, 2025
9bbf24f
removing tak-docker-compose.yaml
Mar 25, 2025
fc788ce
Merge remote-tracking branch 'origin/208-integrate-gps-of-robot-from-…
Mar 25, 2025
dc8aad8
merge conflict resolved
Mar 25, 2025
91a0bdc
updating demo_config.yaml for gps_streaming
Mar 25, 2025
cd855c0
refactoring setup_ground_control_station.sh
Mar 25, 2025
4fba302
updating domain_bridge.yaml and gcs Ros domain ID
Mar 26, 2025
8fcad06
launch.sh and shutdown.sh script for airstack
Mar 26, 2025
aafe8e4
refactor setup_ground_control_station.sh
Mar 26, 2025
1b54fc7
documenting and cleaning
Mar 26, 2025
be87163
aesthetics
Mar 27, 2025
d9b273f
aesthetics colored
Mar 27, 2025
c805e75
Change relative paths to absolute paths from script
andrewjong Apr 2, 2025
f336fee
Add pics, add .gitignore
andrewjong Apr 2, 2025
672b07d
Merge branch 'develop' into 208-integrate-gps-of-robot-from-isaacsim-…
andrewjong Apr 2, 2025
8a9eea0
Merge remote-tracking branch 'origin/develop' into 208-integrate-gps-…
andrewjong Apr 2, 2025
bcb6b20
Clean dockerfile
andrewjong Apr 2, 2025
9d0f470
Add git hook to configure.sh
andrewjong Apr 2, 2025
008839f
Clean up script
andrewjong Apr 2, 2025
724c6fb
Add comment
andrewjong Apr 2, 2025
fd27a27
Remove ros domain id from docker env
andrewjong Apr 2, 2025
edafe7e
Remove straps msgs
andrewjong Apr 2, 2025
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This top-level .env file under AirStack/ defines variables that are propagated through docker-compose.yaml
PROJECT_NAME="airstack"
# auto-generated from git commit hash
DOCKER_IMAGE_TAG="3f238b1"
DOCKER_IMAGE_TAG="008839f"
# can replace with your docker hub username
PROJECT_DOCKER_REGISTRY="airlab-storage.andrew.cmu.edu:5001/shared"
DEFAULT_ISAAC_SCENE="omniverse://airlab-storage.andrew.cmu.edu:8443/Projects/AirStack/AFCA/fire_academy_faro_with_sky.scene.usd"
PLAY_SIM_ON_START="true"
# the file under robot/docker/ that contains the robot's environment variables
ROBOT_ENV_FILE_NAME="robot.env"
ROBOT_ENV_FILE_NAME="robot.env"
1 change: 1 addition & 0 deletions common/ros_packages/straps_msgs
Submodule straps_msgs added at 290987
7 changes: 7 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ read -r -p "API Token: " API_TOKEN
if [ ! -z "${API_TOKEN}" ]; then
sed "s/PASTE-YOUR-API-TOKEN/$API_TOKEN/g" $OMNI_PASS_SOURCE > $OMNI_PASS_DESTINATION
fi

# Git Hooks
echo -e "${BOLDCYAN}3. Setting up Git Hooks${ENDCOLOR}"
cp ${SCRIPT_DIR}/git-hooks/docker-versioning/update-docker-image-tag.pre-commit ${SCRIPT_DIR}/.git/hooks/pre-commit


echo -e "${BOLDCYAN}Setup Complete${ENDCOLOR}"
10 changes: 2 additions & 8 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ docker compose push
## Launch

```bash
xhost + # allow docker access to X-Server

# Make sure you are in the AirStack directory.

# Start docker compose services. This launches Isaac Sim and the robots.
# You can append `--scale robot=[NUM_ROBOTS]` for more robots, default is 1
docker compose up -d
./launch.sh # This will launch the docker containers, isaac sim, and WinTAK
```

This will automatically launch and play the Isaac scene specified under `AirStack/.env` (default is the Fire Academy).
Expand All @@ -99,5 +93,5 @@ You can also switch to `Fixed Trajectory` mode and hit `Publish` on the bottom r
To shutdown and remove docker containers:

```bash
docker compose down
./shutdown.sh # This will stop and remove the docker containers, isaac sim, and WinTAK
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# ROS2 CASEVAC Agent

## Overview
ROS2 CASEVAC Agent is a service that bridges ROS2 casualty information to TAK (Tactical Assault Kit) systems using MQTT as the transport layer. The agent subscribes to ROS topics containing casualty metadata and images, converts this information into CoT (Cursor on Target) format, and publishes it to an MQTT broker for TAK systems to consume.

## Features
- Subscribes to ROS casualty metadata and image topics
- Converts casualty information into standard CoT format with ZMIST fields
- Z: Zap Number - Unique casualty identifier
- M: Mechanism of Injury
- I: Injuries Sustained
- S: Signs and Symptoms
- T: Treatments Rendered
- Tracks multiple casualties simultaneously
- Handles various injury types and severity levels
- Transmits data over MQTT to TAK systems

## Installation

### Prerequisites
- ROS2 (tested with Foxy/Humble)
- Python 3.8+
- paho-mqtt
- PyTAK

### Dependencies
```bash
pip install paho-mqtt pytak pyyaml
```

## Configuration
Create a YAML configuration file with the following structure:

```yaml
project:
name: your_project_name

services:
host: your_host_ip
mediator:
ros2casevac_agent:
topic_name: to_tak # MQTT topic name for CoT messages
ros_casualty_meta_topic_name: '/casualty/meta' # ROS topic for casualty metadata
ros_casualty_image_topic_name: '/casualty/image' # ROS topic for casualty images

mqtt:
host: mqtt_broker_ip
port: mqtt_broker_port
username: mqtt_username
password: mqtt_password
```

## Usage
Run the agent with a configuration file:

```bash
ros2 run ros2tak_tools ros2casevac_agent --config path/to/your/config.yaml
```

## Message Types
The agent expects the following ROS message types:
- `airstack_msgs/CasualtyMeta`: Contains casualty metadata including:
- GPS coordinates
- Trauma assessments (head, torso, extremities)
- Vital signs (heart rate, respiratory rate)
- Critical conditions (hemorrhage, respiratory distress)
- Alertness indicators (ocular, verbal, motor)

## How It Works
1. The agent subscribes to the ROS topic for casualty metadata
2. When new data is received, it updates an internal casualty tracking object
3. If GPS data is available, it generates a CoT event in XML format
4. The CoT event is published to the configured MQTT topic
5. TAK systems subscribed to the MQTT topic receive and display the casualty information

## Customization
The code supports several enum types for different injury categories:
- `TraumaType`: Different body regions (head, torso, extremities)
- `TraumaSeverity`: Levels of trauma (normal, wound, amputation)
- `OcularAlertness`: Eye response states
- `AlertnessLevel`: Verbal and motor response states
- `VitalType`: Types of vital signs
- `ConditionType`: Critical conditions
- `ConditionStatus`: Presence/absence of conditions

## Author
Aditya Rauniyar (rauniyar@cmu.edu)
44 changes: 44 additions & 0 deletions docs/ground_control_station/command_center/command_center.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Aerolens.ai - Talk to your robots

This configuration file defines the parameters for the `chat2ros_agent`, which connects to an MQTT topic, filters messages, and routes queries through ROS topics.
```yaml
chat2ros_agent:
mqtt_subcribe_topic: aerolens-ai # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server.
ros_query_text_topic: '/query/text' # ROS Topic name to publish the chat queries.
ros_query_response_topic: '/query/response' # ROS Topic name to publish the chat responses.
filter_name: <project>-operator
```


## Parameters

- **`mqtt_subscribe_topic`** (`aerolens-ai`):
The MQTT topic where messages containing COT data are received.

- **`ros_query_text_topic`** (`/query/text`):
The ROS topic where filtered queries are published.

- **`ros_query_response_topic`** (`/query/response`):
The ROS topic where responses to the queries are published.

- **`filter_name`** (`dsta-operator`):
A filter applied to incoming messages, selecting only those where `filter_messages.name` matches this value.

## Workflow

1. The service subscribes to the MQTT topic (`aerolens-ai`).
2. It filters messages based on `filter_name` (`<project>-operator`).
3. The extracted query is published to `<robot_name>/query/text`.
4. The response to the query is expected on `<robot_name>/query/response`.

This enables seamless integration between an MQTT-based message broker and ROS for structured communication.

## Commands:

![Command Center](../asset/aerolens.ai/help.png)

`help` - Display the help message.

![Command Center](../asset/aerolens.ai/find.png)

`robot <robot_name> find <object>` - Find an object using the robot.
28 changes: 9 additions & 19 deletions docs/ground_control_station/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,17 @@ WinTAK is setup as auto start on boot and connects to Airlabs TAK-Server. Its ru

![Setup](asset/setup.png)

1. Set your `ANDREWID` as an environment variable.
Run the following command from the setup folder
```bash
export ANDREWID=<your_andrew_id>
```
2. Run the following commands to setup WinTAK running over Windows VirtualBox.
```bash
sudo mkdir -p "$HOME/vmware"
sudo chown -R $USER:$USER "$HOME/vmware"
sudo chmod -R 755 "$HOME/vmware"
sudo rsync --progress -avz ${ANDREWID}@airlab-storage.andrew.cmu.edu:/volume4/dsta/atak/setup/ "$HOME/vmware"
sudo dpkg -i "$HOME/vmware/virtualbox-7.1_7.1.6-167084~Ubuntu~jammy_amd64.deb"
sudo apt-get install -f
sudo /sbin/vboxconfig
VBoxManage import "$HOME/vmware/Windows11.ova" --vsys 0 --vmname "WinTAK"

```
3. Run WinTAK using the following commands.
```bash
VBoxManage startvm "WinTAK"
# Move to the directory:
cd ground_control_station/setup
# Execute the script
./setup_ground_control_station.sh
```

NOTE: If it asks to reset the password, please reset to current password.

![WinTAK](asset/WinTAK_on_windows_virtualbox_vm.png)
![WinTAK](asset/WinTAK_on_windows_virtualbox_vm.png)

## Know more about TAK using the youtube link below:
[![Video Title](https://img.youtube.com/vi/fiBt0wEiKh8/0.jpg)](https://www.youtube.com/watch?v=fiBt0wEiKh8&t=1s)
34 changes: 34 additions & 0 deletions docs/ground_control_station/usage/user_interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## The TAK Architecture looks like follows:
![TAK Architecture](../asset/TAK_ROS_Arch.png)

## Note: Please check out the config file at [config.yaml](../../../ground_control_station/ros_ws/src/ros2tak_tools/config/demo_config.yaml) to understand further on how things are setup.

## Learn how to use the TAK features:
### 1. Sending Robot Query from the TAK Chat.
[![Watch the video](https://img.youtube.com/vi/6YCHd70mCUY/0.jpg)](https://www.youtube.com/watch?v=6YCHd70mCUY&list=PLpJxwrRy4QbtVD3XxVzg3CAsm-A279d28&index=2)

### 2. Displaying automated Casevac icons from the casualty inspections:
[![Watch the video](https://img.youtube.com/vi/J577FWRaipg/0.jpg)](https://www.youtube.com/watch?v=J577FWRaipg&list=PLpJxwrRy4QbtVD3XxVzg3CAsm-A279d28&index=1)

# Debugging tips:

launch just the ground-control-station container:
```bash
docker compose --profile deploy up ground-control-station
````

## 1. Running docker in interactive mode:
```bash
docker exec -it ground-control-station /bin/bash
```

## 2. Checking if the messages are being received by the MQTT broker:

```bash
mosquitto_sub -h localhost -t to_tak -u airlab # Default topic for sending messages to TAK
mosquitto_sub -h localhost -t healthcheck -u airlab # Default topic for sending healthcheck messages
```




4 changes: 3 additions & 1 deletion ground_control_station/docker/.bash_history
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ ros2 launch gcs_bringup gcs.launch.xml
cws
bws
sws
bws --packages-select gcs_bringup
bws --packages-select gcs_bringup
mosquitto_sub -h localhost -t healthcheck -u airlab
mosquitto_sub -h localhost -t to_tak -u airlab
5 changes: 3 additions & 2 deletions ground_control_station/docker/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PROJECT_NAME= GCS # Enter the project name

PROJECT_NAME="airstack"
PROJECT_VERSION="0.12.0"
PROJECT_DOCKER_REGISTRY="airlab-storage.andrew.cmu.edu:5001/shared"

# ROS --------------------------------------------------------
ROS_WS_DIR=/root/ros_ws
Expand Down
14 changes: 4 additions & 10 deletions ground_control_station/docker/Dockerfile.gcs
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,20 @@ RUN apt-get update && apt-get install -y \
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
gstreamer1.0-x gstreamer1.0-alsa openssh-server
gstreamer1.0-x gstreamer1.0-alsa openssh-server \
&& rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip3 install empy future lxml matplotlib numpy pkgconfig psutil pygments \
wheel pymavlink pyyaml requests setuptools six toml scipy pytak paho-mqtt
wheel pymavlink pyyaml requests setuptools six toml scipy pytak paho-mqtt sphinx

# Configure SSH
RUN mkdir /var/run/sshd && echo 'root:airstack' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

# open port 22 for ssh
EXPOSE 22

# Build ROS2 workspace
# COPY ground_control_station/ros_ws/src/ros2tak_tools /root/ros_ws/src/ros2tak_tools
# COPY common/ros_packages/airstack_msgs /root/ros_ws/src/airstack_msgs
# RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
# colcon build --symlink-install --packages-select airstack_msgs && \
# colcon build --symlink-install"

# Cleanup
RUN apt purge git -y && apt autoremove -y && apt clean -y && rm -rf /var/lib/apt/lists/*
4 changes: 0 additions & 4 deletions ground_control_station/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ services:
extends:
file: ./ground-control-station-base-docker-compose.yaml
service: ground-control-station-base
container_name: ground-control-station
networks:
- airstack_network
ports:
Expand All @@ -25,6 +24,3 @@ services:
- $HOME/bags/:/bags
- ../../robot/ros_ws/src/robot_bringup/rviz/:/bags/rviz
- ../../plot:/plot

# include:
# - ./tak-docker-compose.yaml
Loading