-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ground control station TAK related files (#116)
* Init ros2tak tools under ground_control_station * redacting * redacting --------- Co-authored-by: Andrew Jong <[email protected]>
- Loading branch information
1 parent
205f54e
commit a6f7063
Showing
21 changed files
with
1,961 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,8 @@ COLCON_IGNORE | |
frames_*.gv | ||
frames_*.pdf | ||
|
||
.idea/ | ||
*.code-workspace | ||
|
||
nucleus_token.txt | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build/ | ||
install/ | ||
log/ | ||
/src/ground_control_station/ros2tak_tools/creds/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PROJECT_NAME=PROJECT_NAME | ||
ROS2_WS_PATH=~/ground_control_station/ros_ws | ||
|
||
CONFIG_PATH=src/ros2tak_tools/config/config.yaml | ||
|
||
TAK_PUBLISHER_FILE_PATH=src/ros2tak_tools/scripts/tak_publisher.py | ||
TAK_SUBSCRIBER_FILE_PATH=src/ros2tak_tools/scripts/tak_subscriber.py | ||
|
||
ROS2_AGENT_PORT=1883 | ||
TAK_PUBLISHER_PORT=1883 | ||
|
||
MQTT_USERNAME = airlab | ||
MQTT_PASSWORD = # Enter your password here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# TAK Tools ROS 2 Package | ||
|
||
`ros2tak_tools` is a ROS 2 package designed for integrating TAK (Tactical Assault Kit) functionalities within ROS 2. It includes tools for publishing and subscribing to Cursor-On-Target (CoT) events, interfacing with TAK servers, and setting up search and rescue missions. | ||
|
||
|
||
## Features | ||
- **ROS 2 to TAK Communication**: Send ROS 2 messages to TAK using CoT events. | ||
- **CoT to ROS 2 Communication**: Receive CoT events from TAK and publish as ROS 2 messages. | ||
- **Mission Planning**: Custom tools to create and manage search missions using CoT and ROS. | ||
|
||
|
100 changes: 100 additions & 0 deletions
100
ros_ws/src/ground_control_station/ros2tak_tools/config/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Configuration for the Basestation Syetem interacting ROS and TAK server. | ||
|
||
# Preliminary: | ||
# Tak-server: Server that receives CoT messages and sends them to the TAK clients (e.g., ATAK, WinTAK, etc.) | ||
# COT (Cursor on Target) message: A message format used by TAK clients to share location and other information with/without Tak-server. | ||
|
||
# Instructions: | ||
# (1) Please read the comments in the configuration file to understand the configuration parameters. | ||
# (2) The confguration key names are case-sensitive. Please use the same key names as mentioned in the comments. | ||
|
||
# Maintainer: Aditya Rauniyar ([email protected]) | ||
|
||
|
||
project: | ||
name: Airstack # Name of the project. This will be used to name the services. | ||
|
||
robot: | ||
count: 6 # Number of robots to subscribe to (e.g., 1 for robot1, 2 for robot2 and robot3, etc.) | ||
gps_topicname: '/iphone{n}/gps' # Topic name pattern for GPS data. Use {n} as a placeholder for the robot number. | ||
|
||
trackers: | ||
- name: 'base' # Note stable GPS reading | ||
ip: '10.223.132.129' | ||
input_port: 2947 | ||
- name: 'target1' | ||
ip: '10.223.132.61' | ||
input_port: 2947 | ||
- name: 'target2' # Name of the tracker. This can be the target or the robot streaming GPS data. | ||
ip: '10.223.118.110' # IP address of the tracker. (Testing using Doodle labs mesh rider) | ||
input_port: 2947 # Port of the Radio link to receive GPS data. | ||
- name: 'target3' # NOTE: Stable GPS reading | ||
ip: '10.223.118.94' | ||
input_port: 2947 | ||
- name: 'drone2' | ||
ip: '10.4.1.20' | ||
input_port: 2947 | ||
|
||
|
||
tak_server: | ||
cot_url: # URL for the TAK server where CoT events are sent. | ||
pytak_tls_client_cert: # Path to the client certificate for TLS connection. | ||
pytak_tls_client_key: # Path to the client key for TLS connection. | ||
|
||
|
||
mqtt: | ||
host: mqtt # TODO: This should be set as container name for MQTT Docker | ||
port: 1883 | ||
username: airlab | ||
password: # Enter your password here | ||
|
||
services: | ||
host: '127.0.0.1' # Host settings can be specified here (e.g., localhost or specific IP address). | ||
|
||
# NOTE: | ||
# (1) The publishers and subscribers are in reference to the TAK server. | ||
# (2) The name of the service would be in the format of <project_name>_<service_name> (e.g., dsta_tak_publisher). | ||
publisher: | ||
tak_publisher: | ||
# this serivce is used to publish CoT messages from HOSTIP:PORT to the TAK server. | ||
topic_name: to_tak | ||
|
||
mediator: | ||
ros2cot_agent: | ||
# this service is used to generate COT messages from ROS messages and send them to HOSTIP:PORT. | ||
topic_name: to_tak | ||
cot2ros_agent: | ||
# this service is used to generate ROS messages from HOSTIP:PORT to ROS topics. | ||
# TAK_Subscriber (below) service has more information on the ROS topics. | ||
topic_name: from_tak # Port for the ROS publisher service. | ||
cot2planner_agent: | ||
# this service is used to generate ROS messages from HOSTIP:PORT to ROS topics. | ||
# TAK_Subscriber (below) service has more information on the ROS topics. | ||
topic_name: planner_events # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server. | ||
|
||
subscriber: | ||
tak_subscriber: | ||
# this service is used to subscribe to CoT messages from TAK server and send them to HOSTIP:PORT. | ||
filter_messages: # Type of messages to subscribe to. Options: | ||
- name: 'target' | ||
# ROS Topic name to publish the target messages. Use {n} as a placeholder for the robot number. | ||
# If provided, the topic name will be formatted with the robot number extracted from the message name. | ||
ros_topic_name: '/target{n}/gps/gt' | ||
ros_msg_type: NavSatFix # ROS message type for the target messages. | ||
mqtt_topic_name: target_from_tak # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server. | ||
- name: 'iphone' | ||
# ROS Topic name to publish the target messages. Use {n} as a placeholder for the robot number. | ||
# If provided, the topic name will be formatted with the robot number extracted from the message name. | ||
ros_topic_name: '/iphone{n}/gps/gt' | ||
ros_msg_type: NavSatFix # ROS message type for the target messages. | ||
mqtt_topic_name: iphone_from_tak # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server. | ||
- name: 'base' | ||
ros_topic_name: '/basestation/gps' | ||
ros_msg_type: NavSatFix # ROS message type for the target messages. | ||
mqtt_topic_name: base_from_tak # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server. | ||
- name: 'planner' | ||
ros_topic_name: '/planner/planconfig' # ROS Topic name to publish the shapes messages. | ||
ros_msg_type: MarkerArray # ROS message type for the shapes messages. | ||
mqtt_topic_name: planner_events # Topic name at MQTT for the subscriber service that sends COT messages subscribed from the TAK server. | ||
# target: Target messages | ||
# planner: Planner messages |
98 changes: 98 additions & 0 deletions
98
ros_ws/src/ground_control_station/ros2tak_tools/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Instructions: | ||
|
||
# Build: docker-compose build --no-cache | ||
# Run as interactive mode: docker run -it --rm tak_tools_ros2cot_agent /bin/bash | ||
|
||
version: '3.8' | ||
|
||
|
||
services: | ||
################### MQTT | ||
mqtt: | ||
container_name: "mqtt" | ||
image: eclipse-mosquitto:2.0.20 | ||
restart: always | ||
volumes: | ||
- ./mosquitto/config:/mosquitto/config | ||
- ./mosquitto/data:/mosquitto/data | ||
- ./mosquitto/log:/mosquitto/log | ||
ports: | ||
- "1883:1883" | ||
- "9001:9001" | ||
healthcheck: | ||
test: ["CMD", "mosquitto_pub", "-h", "localhost", "-t", "healthcheck", "-m", "ping", "-u", "${MQTT_USERNAME}", "-P", "${MQTT_PASSWORD}"] | ||
interval: 5s | ||
timeout: 3s | ||
retries: 2 | ||
start_period: 5s | ||
networks: | ||
- basestation-network | ||
|
||
################## ROS2COT_AGENT | ||
ros2cot_agent: | ||
build: | ||
context: ../ | ||
dockerfile: ros2tak_tools/ros2tak_tools/Dockerfile.ros2cot_agent | ||
container_name: "${PROJECT_NAME}_ros2cot_agent" | ||
volumes: | ||
- ./config:/home/mission-operator/ros2_ws/src/ros2tak_tools/config | ||
stdin_open: true | ||
tty: true | ||
restart: unless-stopped | ||
env_file: | ||
- .env | ||
depends_on: | ||
mqtt: | ||
condition: service_healthy | ||
networks: | ||
- basestation-network | ||
command: ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source /home/mission-operator/ros2_ws/install/setup.bash && ros2 run ros2tak_tools ros2cot_agent --config $CONFIG_PATH"] | ||
|
||
# ################### TAK_PUBLISHER | ||
tak_publisher: | ||
build: | ||
context: ../ | ||
dockerfile: ros2tak_tools/scripts/Dockerfile.tak_publisher | ||
container_name: "${PROJECT_NAME}_tak_publisher" | ||
volumes: | ||
- ./config:/home/mission-operator/ros2_ws/src/ros2tak_tools/config | ||
- ./scripts:/home/mission-operator/ros2_ws/src/ros2tak_tools/scripts | ||
stdin_open: true | ||
tty: true | ||
restart: unless-stopped | ||
env_file: | ||
- .env | ||
depends_on: | ||
mqtt: | ||
condition: service_healthy | ||
networks: | ||
- basestation-network | ||
command: ["python3", "$TAK_PUBLISHER_FILE_PATH", "--config", "$CONFIG_PATH"] | ||
|
||
################### TAK_SUBSCRIBER | ||
tak_subscriber: | ||
build: | ||
context: ../ | ||
dockerfile: ros2tak_tools/scripts/Dockerfile.tak_subscriber | ||
container_name: "${PROJECT_NAME}_tak_subscriber" | ||
volumes: | ||
- ./config:/home/mission-operator/ros2_ws/src/ros2tak_tools/config | ||
- ./scripts:/home/mission-operator/ros2_ws/src/ros2tak_tools/scripts | ||
stdin_open: true | ||
tty: true | ||
restart: unless-stopped | ||
env_file: | ||
- .env | ||
depends_on: | ||
mqtt: | ||
condition: service_healthy | ||
networks: | ||
- basestation-network | ||
command: ["python3", "$TAK_SUBSCRIBER_FILE_PATH", "--config", "$CONFIG_PATH"] | ||
|
||
|
||
########### NETWORKS ########### | ||
networks: | ||
basestation-network: | ||
driver: bridge | ||
|
Oops, something went wrong.