Skip to content

Commit 42f8466

Browse files
JohnYanxinLiuandrewjongopenhands-agentjfkeller
authored
Johnliu/pegasus integration (#295)
* Enabled Pegasus plugin on start-up. * integrated dynamic extension enabling through ENV file * PX4, MavLink, MAVROS connected * fixed gitmodules after rebase * Changed MAVLink port to be explicit for cross-service compatibility. * simplified PX4 installation * No longer launches MAVROS on sim side * connects robot mavros nodes to sim px4 mavlink in px4-autopilot mode * update local plan src to match new MAVROS ReliabilityPolicy * made camera configs shared between robot and sim + created clock publisher in sim + added camera publishers in sim * changed PegasusSim to fork for ROS_DOMAIN_ID management * new config files README * deleted old mavros_util file * reenabled omni env pass * fixed isaac-sim Dockerfile installation * Change project version to latest commit with docker image change * Fix issue where robot didn't build if wasn't built before * Add comment to dockerfile * Minor fixes from main branch * Set workdir for isaac container to /isaac-sim * Remaps image_raw images into image_rect images * put in basic domain bridge file. Not integrated yet. * domain bridge applied to 1 robot * Removed image rectifier. Directly mapped sim raw to image_rect topics * Added PegasusSim integration to use sim time * hardcoded namespacing for tfs * transferred PegasusSim ownership to castacks * transferred PegasusSim ownership to castacks * migrated to isaacsim 4.5.0 due to dependency issues * Remove commented out clone of px4 * lidar with 1 robot * domain bridge for 1 robot works * updated PegasusSim lidar sensor config initialization * Add option to launch standalone isaac sim gui * Remove old code for scene loading * Rename environment --> stage * Only update image tag if docker-compose.yaml has a change to the build: key * Enable change scene on command line; also enable python scene creation * fixed depth subscription for disparity. Random walk semi-working. * Add example scene with a fan * Lower fans, easily see effect on drone takeoff * Add standalone examples * Add random primitive obstacles scene for Isaac Sim - Created random_primitive_obstacles.py with customize_world function - Generates 50 random primitive shapes (cubes, spheres, cylinders, cones, capsules) - Includes mix of dynamic (physics-enabled) and visual-only objects - Random positions, scales, orientations, and colors for variety - Added DistantLight for better scene illumination - Objects scattered throughout 20x20x8 meter scene bounds Co-authored-by: openhands <openhands@all-hands.dev> * Fixed default environment addition. Translates scene to full NVIDIA path * Put stereo camera TFs in optical frame * skeleton for MAVROS waiting for MAVLink to launch (not working) * revert droan yaml * reverted vdb_params yaml * removed unecessary isaac_extensions folder * Don't spawn isaac-sim-gui by default, only if explicitly specified * Update clock to publish on world step to match isaac sim time. also add another test scene * Silence macvo * Move mavros startup to interface.launch.xml * Imported Pegasus Ascent Extension * Only update image tag if docker-compose.yaml has a change to the 'build:' key * Make submodule init optional in airstack setup * Renamed files to PegasusMultirotorNode * Fixed PX4 Mavlink Backend launching * Refactored spawning functionality into OgnPegasusMultirotorNode * Individual Nodes for PX4 and ArduPilot backend-supported Multirotor Nodes * dynamically sets ogn input macros * switched default prim name to /World/Quadrotor * Refactored ogn into PegasusSim Submodule * Basic launch script to spawn a Drone prim with Ogn under it * Updated Pegasus submodule * Fix missing xacro * Change to px4.launch instead of apm.launch * Add tmux tpm plugin * Ugh * Setup dev container for isaac too * Setup vscode debug breakpointing for isaac container * Update user.config.json to autoload pegasus * Remove python sensor instantiationg * Add project wide settings.json * Update with pegasus modules * Change isaac sim dev container to open root * Change to /World/stage * Now working for drag and drop GUI! * Remove not working bookmark * Auto enable urdf plugins * Make a folder for robot_descriptions for urdfs * Progress, URDF working. Now need mavlink to work * Comments * Format code * mavlink connection * Try make things work * Stuff takes off now and does fixed trajectory, yay * Fix some launch issues * Had to fix camera frame by 180deg rotate about X (following isaac docs) * Frame updates * Fix disabling autolaunch in vscode devcontainer * Debugging droan local planner * Temporarily delete CONFIG_MOUNT_PATH * FF commit * Formatting * Delete * Add gitignore * Formatting * Fix a timeout issue * ADd cmake-tools * Fix bug uninitialized variable if not ardupilot * Rviz * New nucleus server * synced to initial omnigraph api implementation * An example pegasus launch script * Pegasus API updated * provide two example scripts for scripted pegasus launching * .env file now defines robot urdf description for launch * cleaned up example one px4 vehicle script * added .env flag to launch scripted or usd file for pegasus * minor comment change for launch_scripts location * updated docs for pegasus * update user template to load needed isaac sim extensions for omni graph * Reverted .env file to default Iris usd path * deleted unneeded PX4 Module * fixed isaacsim config bug, set docker image tag, switched to using new airlab-docker registry --------- Co-authored-by: Andrew Jong <ajong@andrew.cmu.edu> Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Andrew Jong <andrewjong87@gmail.com> Co-authored-by: John Keller <jkeller2@andrew.cmu.edu>
1 parent 39e5e69 commit 42f8466

342 files changed

Lines changed: 302635 additions & 2203 deletions

File tree

Some content is hidden

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

.devcontainer/gcs/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"ms-python.black-formatter"
1818
]
1919
}
20+
},
21+
"containerEnv": {
22+
"AUTOLAUNCH": "false"
2023
}
2124
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// .devcontainer/devcontainer.json
2+
{
3+
"name": "Isaac Sim Container",
4+
"service": "isaac-sim",
5+
"runServices": [
6+
"isaac-sim"
7+
],
8+
"dockerComposeFile": [
9+
"../../docker-compose.yaml"
10+
],
11+
"workspaceFolder": "/",
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"ms-python.python", // Install the Python extension
16+
"ms-python.black-formatter"
17+
],
18+
"settings": {
19+
"python.defaultInterpreterPath": "/isaac-sim/python.sh" // Or your specific path
20+
}
21+
}
22+
},
23+
"containerEnv": {
24+
"AUTOLAUNCH": "false"
25+
}
26+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "2.0.0",
3+
"configurations": [
4+
{
5+
"name": "Python: Current File",
6+
"type": "debugpy",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"env": {
11+
"RESOURCE_NAME": "IsaacSim"
12+
},
13+
"python": "/isaac-sim/kit/python/bin/python3",
14+
"envFile": "/isaac-sim/.vscode/.standalone_examples.env",
15+
"preLaunchTask": "setup_python_env"
16+
},
17+
18+
]
19+
}
20+

.devcontainer/isaac-sim/tasks.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "setup_python_env",
8+
"type": "shell",
9+
"linux": {
10+
"command": "export CARB_APP_PATH=/isaac-sim/kit && export ISAAC_PATH=/isaac-sim && export EXP_PATH=/isaac-sim/apps && source /isaac-sim/setup_python_env.sh && printenv >/isaac-sim/.vscode/.standalone_examples.env"
11+
}
12+
}
13+
]
14+
}

.devcontainer/robot/devcontainer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
],
99
"service": "robot",
1010
"workspaceFolder": "/home/robot/AirStack",
11-
"initializeCommand": "export AUTOLAUNCH=false && echo 'You may close this window'",
1211
"customizations": {
1312
"vscode": {
1413
"extensions": [
1514
"Ranch-Hand-Robotics.rde-pack",
1615
"ms-vscode.cpptools",
17-
"ms-python.black-formatter"
16+
"ms-python.black-formatter",
17+
"ms-vscode.cmake-tools"
1818
],
1919
}
20+
},
21+
"containerEnv": {
22+
"AUTOLAUNCH": "false"
2023
}
2124
}

.devcontainer/robot/tasks.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
// `bws` is the same command across robot and gcs containers
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"label": "Build ros_ws Debug",
7+
"type": "shell",
8+
"options": {
9+
"cwd": "${workspaceFolder}"
10+
},
11+
"command": [
12+
"source ${userHome}/.bashrc &&",
13+
"bws --cmake-args '-DCMAKE_BUILD_TYPE=Debug'"
14+
],
15+
"problemMatcher": [],
16+
"group": {
17+
"kind": "build",
18+
"isDefault": true
19+
}
20+
},
21+
],
22+
"configurations": [
23+
24+
]
25+
}

.env

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This is the main .env file for AirStack, which sets docker compose variables for variable interpolation.
1+
# This is the main .env file for AirStack, which sets DOCKER COMPOSE VARIABLES FOR VARIABLE INTERPOLATION IN docker-compose.yaml.
2+
# These variables do NOT get set within the robot container itself. For setting container environment variables, use env_file: attribute in docker-compose.yaml.
23
# Standard Usage: airstack --env-file .env up
34

45
# Warning: even though this file is organized into sections, all variables get propagated to all sub-level
@@ -10,25 +11,32 @@ PROJECT_NAME="airstack"
1011
# If you've run ./airstack.sh setup, then this will auto-generate from the git commit hash every time a change is made
1112
# to a Dockerfile or docker-compose.yaml file. Otherwise this can also be set explicitly to make a release version.
1213
# auto-generated from git commit hash
13-
DOCKER_IMAGE_TAG="0.14.4-alpha.2"
14+
DOCKER_IMAGE_TAG="0.15.0"
1415
# Can replace with your docker hub username
1516
PROJECT_DOCKER_REGISTRY="airlab-docker.andrew.cmu.edu/airstack"
1617
# ============================================
1718

1819
# ================= Common ===================
19-
AUTOLAUNCH="true" # If false, the docker-compose will automatically just spawn containers with no launch command.
20+
AUTOLAUNCH="true" # If false, the docker-compose will just spawn idle docker containers with no launch command.
2021
NUM_ROBOTS="1"
22+
ROBOT_DEFINTIONS="/config/robot_definitions.yaml" # Path to the robot definitions file, which is mounted at /config in containers.
2123

22-
# ================ SIMULATION =================
23-
ISAAC_SIM_SCENE="omniverse://airlab-nucleus.andrew.cmu.edu/Projects/AirStack/AFCA/afca_v0.14.3.usd"
24-
PLAY_SIM_ON_START="true"
25-
# =============================================
24+
# ============== SIMULATION =====================
25+
ISAAC_SIM_GUI="omniverse://airlab-nucleus.andrew.cmu.edu/Library/Assets/Pegasus/iris_with_sensors.pegasus.robot.usd"
26+
# Set to "true" to launch Isaac Sim using a standalone Python script instead of USD file
27+
ISAAC_SIM_USE_STANDALONE_SCRIPT="false" # "true" or "false"
28+
# Script name (must be in /AirStack/simulation/isaac-sim/launch_scripts/)
29+
ISAAC_SIM_SCRIPT_NAME="example_one_px4_pegasus_launch_script.py"
30+
PLAY_SIM_ON_START="false" # Not supported in standalone script mode
31+
# ===============================================
2632

2733
# ================= ROBOT =====================
2834
# See robot/docker/docker-compose.yaml for how these variables get propagated in
29-
# the container's entry command.
35+
# the container's entry command. See robot's .bashrc for additional variables
3036
ROBOT_LAUNCH_PACKAGE="robot_bringup"
3137
ROBOT_LAUNCH_FILE="robot.launch.xml"
38+
ROBOT_DESCRIPTION_PACKAGE="iris_with_sensors_description"
39+
ROBOT_URDF_FILE="iris_with_sensors.pegasus.robot.urdf"
3240

3341
# See robot-base-docker-compose.yaml for how these variables get propagated.
3442
AUTONOMY_LAUNCH_PACKAGE="autonomy_bringup"
@@ -51,6 +59,10 @@ GLOBAL_LAUNCH_FILE="global.launch.xml"
5159
# --
5260
BEHAVIOR_LAUNCH_PACKAGE="behavior_bringup"
5361
BEHAVIOR_LAUNCH_FILE="behavior.launch.xml"
62+
63+
# offboard API streaming out
64+
OFFBOARD_BASE_PORT=14540
65+
ONBOARD_BASE_PORT=14580
5466
# ===============================================
5567

5668
# =========== GROUND CONTROL STATION ============

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@
1010
[submodule "common/ros_packages/rviz_behavior_tree_panel/xdot_cpp"]
1111
path = common/ros_packages/rviz_behavior_tree_panel/xdot_cpp
1212
url = https://github.com/castacks/xdot_cpp.git
13+
[submodule "simulation/isaac-sim/extensions/PegasusSimulator"]
14+
path = simulation/isaac-sim/extensions/PegasusSimulator
15+
url = https://github.com/castacks/PegasusSimulator-AirStack-Integration.git
16+
[submodule "robot/ros_ws/src/autonomy/0_interface/mavros"]
17+
path = robot/ros_ws/src/autonomy/0_interface/mavros
18+
url = https://github.com/castacks/mavros.git

.vscode/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# this gets mounted from each devcontainer
2+
tasks.json

0 commit comments

Comments
 (0)