Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3dc2b20
changing zed topic names to match the uav, tuned parameters on the uav
jfkeller Aug 6, 2025
60cb415
temporarily switch to velocity command to avoid abrupt movement behav…
jfkeller Aug 6, 2025
bcc7498
added simple sim
jfkeller Aug 8, 2025
27d03b4
added screen width and height parameters for simple sim
jfkeller Aug 11, 2025
619bd8e
renamed zed topics to match sim, fixed some apt issues by ignoring in…
seungchan-kim Aug 11, 2025
3c7486d
Merge branch 'jkeller/rename_zed' of https://github.com/castacks/AirS…
seungchan-kim Aug 11, 2025
970d7c3
fixed key issue by ignoring invalid ones in gcs docker, tuned droan f…
jfkeller Aug 11, 2025
e04004c
updated plotting
jfkeller Aug 12, 2025
6128926
fixed requests package not being presesnt in image
jfkeller Aug 13, 2025
d7829e9
added spinning props to simple sim
jfkeller Aug 13, 2025
68df691
debugging local planner, starting to add rewind, temporary hack fix f…
jfkeller Aug 20, 2025
3f7dc08
added rewind behavior from subt, fixed bug in simple sim camera intri…
jfkeller Aug 21, 2025
727f076
fixed bug in disparity graph where if free space was seen the occupan…
jfkeller Aug 26, 2025
bf17afb
refactored how macvo can be enabled in perception and local launch fi…
jfkeller Aug 27, 2025
192e6f4
updated on real drone after flight testing
jfkeller Aug 27, 2025
a9060dd
Merge branch 'jkeller/rename_zed' of github.com:castacks/AirStack int…
jfkeller Aug 27, 2025
cf537d2
fixing bugs in dockerfile
jfkeller Aug 28, 2025
8451ae6
refactoring real robot's transforms
jfkeller Aug 28, 2025
dd4d0fa
re-enabled random walk planner
jfkeller Aug 28, 2025
ac724f8
made it so behavior executive won't hang if global planner service is…
jfkeller Aug 29, 2025
bc590b1
added marker visualization for rewind status
jfkeller Aug 29, 2025
6d1d3c4
potential fix for asin and tan corner cases in disparity expansion
jfkeller Sep 3, 2025
7fe8416
updated image topic name in logging
jfkeller Sep 3, 2025
5625f52
debugged expansion being uneven and overwriting itself
jfkeller Sep 11, 2025
1c98e68
optimized disparity expansion
jfkeller Sep 12, 2025
7ae25c2
added missing code to second pass
jfkeller Sep 12, 2025
0ad85a5
fixed bug where "bash" and "tmux a" menu items in gui sometimes don't…
jfkeller Sep 15, 2025
be90408
added average elapsed profiling to disparity expansion, visualized sp…
jfkeller Sep 18, 2025
c9e4b87
cleaning up disparity expansion code
jfkeller Sep 22, 2025
43f72fd
merging
jfkeller Sep 22, 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
Expand Up @@ -10,7 +10,7 @@ PROJECT_NAME="airstack"
# If you've run ./airstack.sh setup, then this will auto-generate from the git commit hash every time a change is made
# to a Dockerfile or docker-compose.yaml file. Otherwise this can also be set explicitly to make a release version.
# auto-generated from git commit hash
DOCKER_IMAGE_TAG="0.14.4-alpha.1"
DOCKER_IMAGE_TAG="c9e4b87d"
# Can replace with your docker hub username
PROJECT_DOCKER_REGISTRY="airlab-storage.andrew.cmu.edu:442/airstack"
# ============================================
Expand All @@ -20,7 +20,7 @@ AUTOLAUNCH="true" # If false, the docker-compose will automatically just spawn
NUM_ROBOTS="1"

# ================ SIMULATION =================
ISAAC_SIM_SCENE="omniverse://airlab-storage.andrew.cmu.edu:8443/Projects/AirStack/AFCA/fire_academy_faro_with_sky.scene.usd"
ISAAC_SIM_SCENE="omniverse://airlab-storage.andrew.cmu.edu:8443/Projects/AirStack/AFCA/afca_v0.14.3.usd"
PLAY_SIM_ON_START="true"
# =============================================

Expand Down
25 changes: 25 additions & 0 deletions common/ros_packages/airstack_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,31 @@ install(
)
ament_export_libraries(vislib)

# templib
add_library(templib src/templib.cpp)
target_include_directories(templib PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(templib PUBLIC c_std_99 cxx_std_17)
ament_target_dependencies(
templib
rclcpp
tf2
)
install(TARGETS templib
DESTINATION lib/${PROJECT_NAME}
)
install(
TARGETS templib
EXPORT templib
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
ament_export_libraries(templib)

install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})

# install
ament_export_include_directories(include)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#ifndef _TEMPLIB_H_
#define _TEMPLIB_H_

#include <rclcpp/rclcpp.hpp>
#include <functional>
#include <utility>
#include <list>
#include <tf2/LinearMath/Vector3.h>

namespace airstack {

double vector3_distance(const tf2::Vector3& x, const tf2::Vector3& y);

//========================================================================================================
// --------------------------------------- TemporalThresholdMonitor --------------------------------------
//========================================================================================================

template <typename InputType, typename ThresholdType>
class TemporalThresholdMonitor {
private:
ThresholdType threshold;
float history_duration;
float min_dt;
std::function<ThresholdType(const InputType& x, const InputType& y)> function;
std::list<std::pair<InputType, rclcpp::Time> > measurements;

void remove_old_measurements(rclcpp::Time time){
bool updated = false;
std::pair<InputType, rclcpp::Time> front;
while(measurements.size() > 0 && (time - measurements.front().second).seconds() > history_duration){
updated = true;
front = measurements.front();
measurements.pop_front();
}

if(updated)
measurements.push_front(front); // make sure to keep the oldest measurement around so the duration check doesn't fail
}

public:
TemporalThresholdMonitor(ThresholdType threshold, float history_duration, float min_dt,
std::function<ThresholdType(const InputType& x, const InputType& y)> function)
: threshold(threshold)
, history_duration(history_duration)
, min_dt(min_dt)
, function(function){}

void add_measurement(InputType measurement, rclcpp::Time time){
if(measurements.empty() || (time - measurements.back().second).seconds() >= min_dt){
remove_old_measurements(time);
measurements.push_back(std::pair<InputType, rclcpp::Time>(measurement, time));
}
}

void clear_history(){
measurements.clear();
}

bool threshold_exceeded(){
if(measurements.size() == 0 || !has_full_history())
return false;

const InputType& front = measurements.front().first;
const InputType& back = measurements.back().first;
for(auto it = measurements.begin(); it != measurements.end(); it++)
if(function(front, it->first) >= threshold || function(back, it->first) >= threshold)
return true;

return false;
}

bool has_full_history(){
return measurements.size() > 0 && (measurements.back().second - measurements.front().second).seconds() >= history_duration;
}

};


//========================================================================================================
// --------------------------------------------- TimeOutMonitor ------------------------------------------
//========================================================================================================

class TimeOutMonitor {
private:
float time_out_duration;
rclcpp::Time most_recent_time;
bool initialized;

public:
TimeOutMonitor(float time_out_duration);
void add_time(rclcpp::Time time);
bool is_timed_out(rclcpp::Time time);
void clear_history();
float time_until_timed_out(rclcpp::Time time);
};

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace vis {
Marker& add_point(float x, float y, float z);
Marker& add_color(float r, float g, float b, float a);
Marker& set_pose(geometry_msgs::msg::Pose pose);
Marker& set_namespace(std::string ns);

Marker& set_action(uint8_t action);

Expand Down
38 changes: 38 additions & 0 deletions common/ros_packages/airstack_common/launch/playback.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<launch>

<arg name="rviz_config" default="" />
<arg name="robot_name" default="robot_1" />

<push_ros_namespace namespace="$(var robot_name)" />

<!-- <set_parameter name="use_sim_time" value="true" if="$(var sim)" /> -->

<node
pkg="rviz2"
exec="rviz2"
name="rviz"
args="-d $(var rviz_config)"
output="screen" />

<node pkg="depth_image_proc" exec="point_cloud_xyzrgb_node" name="depth_cloud_node" output="screen">
<remap from="depth_registered/image_rect" to="/$(var robot_name)/sensors/front_stereo/depth/depth_registered"/>
<remap from="rgb/image_rect_color" to="/$(var robot_name)/sensors/front_stereo/left/image_rect"/>
<remap from="rgb/camera_info" to="/$(var robot_name)/sensors/front_stereo/left/camera_info"/>
<remap from="points" to="/$(var robot_name)/sensors/front_stereo/pointcloud" />
</node>

<!--
<node
pkg="stereo_image_proc"
exec="point_cloud_node"
name="stereo_pointcloud"
output="screen">

<remap from="left/image_rect_color" to="/$(var robot_name)/sensors/front_stereo/left/image_rect"/>
<remap from="left/camera_info" to="/$(var robot_name)/sensors/front_stereo/left/camera_info"/>
<remap from="right/camera_info" to="/$(var robot_name)/sensors/front_stereo/right/camera_info"/>
<remap from="disparity" to="/$(var robot_name)/sensors/front_stereo/disparity"/>
<remap from="points2" to="/$(var robot_name)/sensors/front_stereo/pointcloud"/>
</node>
-->
</launch>
46 changes: 46 additions & 0 deletions common/ros_packages/airstack_common/src/templib.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <airstack_common/templib.hpp>

namespace airstack {


double vector3_distance(const tf2::Vector3& x, const tf2::Vector3& y){
return x.distance(y);
}

//========================================================================================================
// --------------------------------------- TemporalThresholdMonitor --------------------------------------
//========================================================================================================



//========================================================================================================
// --------------------------------------------- TimeOutMonitor ------------------------------------------
//========================================================================================================

TimeOutMonitor::TimeOutMonitor(float time_out_duration)
: time_out_duration(time_out_duration)
, initialized(false){

}

void TimeOutMonitor::add_time(rclcpp::Time time){
initialized = true;
most_recent_time = time;
}

bool TimeOutMonitor::is_timed_out(rclcpp::Time time){
return !initialized || (time - most_recent_time).seconds() > time_out_duration;
}

void TimeOutMonitor::clear_history(){
initialized = false;
}

float TimeOutMonitor::time_until_timed_out(rclcpp::Time time){
if(!initialized)
return -1.f;

return (time - most_recent_time).seconds();
}

};
5 changes: 5 additions & 0 deletions common/ros_packages/airstack_common/src/vislib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ namespace vis{

return *this;
}

Marker& Marker::set_namespace(std::string ns){
marker.ns = ns;
return *this;
}

Marker& Marker::set_action(uint8_t action){
marker.action = action;
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# This allows for modular development and deployment
include:
- simulation/isaac-sim/docker/docker-compose.yaml
- simulation/simple-sim/docker/docker-compose.yaml
- robot/docker/docker-compose.yaml
- gcs/docker/docker-compose.yaml
- docs/docker/docker-compose.yaml
Expand Down
3 changes: 2 additions & 1 deletion gcs/docker/Dockerfile.gcs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM osrf/ros:humble-desktop-full
SHELL ["/bin/bash", "-c"]

# Install system dependencies
RUN apt-get update && apt-get install -y \
RUN apt-get -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update && \
apt-get -o APT::Get::AllowUnauthenticated=true install -y \
vim nano emacs wget curl tree sshpass \
iperf3 iftop iputils-ping net-tools htop \
cmake build-essential less htop jq python3-pip tmux gdb \
Expand Down
1 change: 1 addition & 0 deletions gcs/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ services:
profiles:
- ""
- sitl
- simple
extends:
file: ./gcs-base-docker-compose.yaml
service: gcs-base
Expand Down
4 changes: 2 additions & 2 deletions gcs/ros_ws/src/gcs_bringup/config/gcs.perspective
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"mainwindow": {
"keys": {
"geometry": {
"repr(QByteArray.hex)": "QtCore.QByteArray(b'01d9d0cb00030000000001df00000063000009ad000004a2000001df00000088000009ad000004a200000000000000000a00000001df00000088000009ad000004a2')",
"repr(QByteArray.hex)": "QtCore.QByteArray(b'01d9d0cb00030000000001ee0000007f000009bc000004be000001ee000000a4000009bc000004be00000000000000000a00000001ee000000a4000009bc000004be')",
"type": "repr(QByteArray.hex)",
"pretty-print": " c "
"pretty-print": " "
},
"state": {
"repr(QByteArray.hex)": "QtCore.QByteArray(b'000000ff00000000fd0000000100000003000007cf000003f1fc0100000002fb0000006a007200710074005f00670072006f0075006e0064005f0063006f006e00740072006f006c005f00730074006100740069006f006e005f005f00470072006f0075006e00640043006f006e00740072006f006c00530074006100740069006f006e005f005f0031005f005f0100000000000003e9000002cd00fffffffc000003ef000003e0000000d000fffffffa000000010200000002fb00000042007200710074005f006200650068006100760069006f0072005f0074007200650065005f005f005000790043006f006e0073006f006c0065005f005f0031005f005f0100000000ffffffff0000004a00fffffffb0000006a007200710074005f0061006900720073007400610063006b005f0063006f006e00740072006f006c005f00700061006e0065006c005f005f0041006900720073007400610063006b0043006f006e00740072006f006c00500061006e0065006c005f005f0031005f005f0100000000ffffffff0000036300ffffff000007cf0000000000000004000000040000000800000008fc00000001000000030000000100000036004d0069006e0069006d0069007a006500640044006f0063006b00570069006400670065007400730054006f006f006c0062006100720000000000ffffffff0000000000000000')",
Expand Down
4 changes: 2 additions & 2 deletions gcs/ros_ws/src/gcs_bringup/launch/gcs.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<!-- Include the TAK launch file -->
<include file="$(find-pkg-share gcs_bringup)/launch/tak.launch.xml">
</include>
<!-- <include file="$(find-pkg-share gcs_bringup)/launch/tak.launch.xml">
</include> -->

</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ def docker_command(self, command):

def docker_exec(self, service, command):
proc = f'''
set -x
mapfile -t names <<< $(sshpass -p "{self.settings['password']}" \
ssh -t -o StrictHostKeyChecking=no {self.settings['username']}@{self.settings['hostname']} \
"cd {self.settings['path']}; docker ps -f name={service} --format '{{{{.Names}}}}'");
Expand All @@ -400,12 +401,19 @@ def docker_exec(self, service, command):
ssh -t -o StrictHostKeyChecking=no \
{self.settings['username']}@{self.settings['hostname']} \
\\"cd {self.settings['path']}; docker exec -it $item {command};\\"';"
eval "$command"
output=$(eval "$command" 2>&1)

while grep -q "Error creating terminal" <<< "$output"; do
output=$(eval "$command" 2>&1)
done
done
'''

logger.info(proc)
subprocess.Popen(proc, shell=True, executable='/usr/bin/bash')
p = subprocess.Popen(proc, shell=True, executable='/usr/bin/bash')
out, err = p.communicate(timeout=2)
logger.info('out ' + str(out))
logger.info('err ' + str(err))

def ssh(self):
proc = f'''dbus-launch gnome-terminal -- bash -c 'sshpass -p "{self.settings['password']}" \
Expand Down
1 change: 1 addition & 0 deletions gcs/ros_ws/src/rqt_gcs/config/fixed_trajectories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ trajectories:
attributes:
- frame_id
- velocity
- turn_velocity
- max_acceleration
- length
- width
Expand Down
2 changes: 2 additions & 0 deletions gcs/ros_ws/src/rqt_gcs/config/gui_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ groups:
condition_name: Disarm Commanded
- Land:
condition_name: Land Commanded
- Autonomously Explore:
condition_name: Autonomously Explore Commanded
robots: # these should match a robot's namespace
- robot_1
- robot_2
Expand Down
Loading