Skip to content

Commit 02bf3e5

Browse files
adityarauniyaradidtc@dtc-legionandrewjong
authored
Integrate gps of robot from isaacsim to wintak (#246)
* updating domain bridge to stream gps from robots to GCS * updating robot gps topic naming * adding docs for using TAK features * adding demo config * Updating the GCS setup to a script and project config files and creds pull from airlab-storage * updating script for GCS setup * updating dev files * ros2cot_agent.py working * ros2cot_agent in launch with mqtt * docker setup with gcs_bringup and ros2cot_agent * updating setup.py for ros2tak_tools * cleaning demo_config.yaml * updating ros2tak_tools * successful build * Update setup.py * updating the tak_publisher.py and tak_subscriber.py to send and receive from the TAK chat * adding tak_subscriber to the tak.launch.xml * updating dev commands * adding helper module * adding chat2ros_agent.py for sending commands * one file for all the COT messages * updating docs * updating docs * refactoring and modularizing files * adding tak_helper.py * ros2cot_agent.py and chat2ros_agent.py working and integrated to tak.launch.xml * docs for debugging mqtt * setup gcs errors fix * setup gcs validation * Added straps_msgs submodule under common/ros_packages * adding ROS_DOMAIN_ID * updating casevac related docs and its CasualtyMeta for array * adding straps_msgs * refactor / Clean * Casualty assessment * Casualty assessment in TAK * dockerfile update with sphinx in GCS * Adding ROS_DOMAIN_ID * cleaning docker-compose.yaml * fixing ground-control-station-base-docker-compose.yaml * validation on triage * launch just the ground-control-station container: * removing tak-docker-compose.yaml * updating demo_config.yaml for gps_streaming * refactoring setup_ground_control_station.sh * updating domain_bridge.yaml and gcs Ros domain ID * launch.sh and shutdown.sh script for airstack * refactor setup_ground_control_station.sh * documenting and cleaning * aesthetics * aesthetics colored * Change relative paths to absolute paths from script * Add pics, add .gitignore * Clean dockerfile * Add git hook to configure.sh * Clean up script * Add comment * Remove ros domain id from docker env * Remove straps msgs --------- Co-authored-by: adi <[email protected]> Co-authored-by: dtc@dtc-legion <dtc@dtc-legion> Co-authored-by: Andrew Jong <[email protected]>
1 parent c1200cf commit 02bf3e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1616
-1175
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This top-level .env file under AirStack/ defines variables that are propagated through docker-compose.yaml
22
PROJECT_NAME="airstack"
33
# auto-generated from git commit hash
4-
DOCKER_IMAGE_TAG="3f238b1"
4+
DOCKER_IMAGE_TAG="008839f"
55
# can replace with your docker hub username
66
PROJECT_DOCKER_REGISTRY="airlab-storage.andrew.cmu.edu:5001/shared"
77
DEFAULT_ISAAC_SCENE="omniverse://airlab-storage.andrew.cmu.edu:8443/Projects/AirStack/AFCA/fire_academy_faro_with_sky.scene.usd"
88
PLAY_SIM_ON_START="true"
99
# the file under robot/docker/ that contains the robot's environment variables
10-
ROBOT_ENV_FILE_NAME="robot.env"
10+
ROBOT_ENV_FILE_NAME="robot.env"

common/ros_packages/straps_msgs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 290987632f7486bca099f5552f49f4f9dd100112

configure.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,10 @@ read -r -p "API Token: " API_TOKEN
5656
if [ ! -z "${API_TOKEN}" ]; then
5757
sed "s/PASTE-YOUR-API-TOKEN/$API_TOKEN/g" $OMNI_PASS_SOURCE > $OMNI_PASS_DESTINATION
5858
fi
59+
60+
# Git Hooks
61+
echo -e "${BOLDCYAN}3. Setting up Git Hooks${ENDCOLOR}"
62+
cp ${SCRIPT_DIR}/git-hooks/docker-versioning/update-docker-image-tag.pre-commit ${SCRIPT_DIR}/.git/hooks/pre-commit
63+
64+
65+
echo -e "${BOLDCYAN}Setup Complete${ENDCOLOR}"

docs/getting_started.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,7 @@ docker compose push
7575
## Launch
7676

7777
```bash
78-
xhost + # allow docker access to X-Server
79-
80-
# Make sure you are in the AirStack directory.
81-
82-
# Start docker compose services. This launches Isaac Sim and the robots.
83-
# You can append `--scale robot=[NUM_ROBOTS]` for more robots, default is 1
84-
docker compose up -d
78+
./launch.sh # This will launch the docker containers, isaac sim, and WinTAK
8579
```
8680

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

10195
```bash
102-
docker compose down
96+
./shutdown.sh # This will stop and remove the docker containers, isaac sim, and WinTAK
10397
```
178 KB
Loading
3.49 KB
Loading
11.4 KB
Loading
3.95 MB
Loading
4.06 MB
Loading
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# ROS2 CASEVAC Agent
2+
3+
## Overview
4+
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.
5+
6+
## Features
7+
- Subscribes to ROS casualty metadata and image topics
8+
- Converts casualty information into standard CoT format with ZMIST fields
9+
- Z: Zap Number - Unique casualty identifier
10+
- M: Mechanism of Injury
11+
- I: Injuries Sustained
12+
- S: Signs and Symptoms
13+
- T: Treatments Rendered
14+
- Tracks multiple casualties simultaneously
15+
- Handles various injury types and severity levels
16+
- Transmits data over MQTT to TAK systems
17+
18+
## Installation
19+
20+
### Prerequisites
21+
- ROS2 (tested with Foxy/Humble)
22+
- Python 3.8+
23+
- paho-mqtt
24+
- PyTAK
25+
26+
### Dependencies
27+
```bash
28+
pip install paho-mqtt pytak pyyaml
29+
```
30+
31+
## Configuration
32+
Create a YAML configuration file with the following structure:
33+
34+
```yaml
35+
project:
36+
name: your_project_name
37+
38+
services:
39+
host: your_host_ip
40+
mediator:
41+
ros2casevac_agent:
42+
topic_name: to_tak # MQTT topic name for CoT messages
43+
ros_casualty_meta_topic_name: '/casualty/meta' # ROS topic for casualty metadata
44+
ros_casualty_image_topic_name: '/casualty/image' # ROS topic for casualty images
45+
46+
mqtt:
47+
host: mqtt_broker_ip
48+
port: mqtt_broker_port
49+
username: mqtt_username
50+
password: mqtt_password
51+
```
52+
53+
## Usage
54+
Run the agent with a configuration file:
55+
56+
```bash
57+
ros2 run ros2tak_tools ros2casevac_agent --config path/to/your/config.yaml
58+
```
59+
60+
## Message Types
61+
The agent expects the following ROS message types:
62+
- `airstack_msgs/CasualtyMeta`: Contains casualty metadata including:
63+
- GPS coordinates
64+
- Trauma assessments (head, torso, extremities)
65+
- Vital signs (heart rate, respiratory rate)
66+
- Critical conditions (hemorrhage, respiratory distress)
67+
- Alertness indicators (ocular, verbal, motor)
68+
69+
## How It Works
70+
1. The agent subscribes to the ROS topic for casualty metadata
71+
2. When new data is received, it updates an internal casualty tracking object
72+
3. If GPS data is available, it generates a CoT event in XML format
73+
4. The CoT event is published to the configured MQTT topic
74+
5. TAK systems subscribed to the MQTT topic receive and display the casualty information
75+
76+
## Customization
77+
The code supports several enum types for different injury categories:
78+
- `TraumaType`: Different body regions (head, torso, extremities)
79+
- `TraumaSeverity`: Levels of trauma (normal, wound, amputation)
80+
- `OcularAlertness`: Eye response states
81+
- `AlertnessLevel`: Verbal and motor response states
82+
- `VitalType`: Types of vital signs
83+
- `ConditionType`: Critical conditions
84+
- `ConditionStatus`: Presence/absence of conditions
85+
86+
## Author
87+
Aditya Rauniyar ([email protected])

0 commit comments

Comments
 (0)