-
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.
Enable auto launch of isaac and airstack via tmux in docker (#111)
- Loading branch information
1 parent
c3bed17
commit 86a19c1
Showing
8 changed files
with
91 additions
and
77 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
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
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
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
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
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
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ AirStack is designed for multi-robot development, and is setup to run multiple r | |
|
||
To mimic interacting with real world robots, we use Docker Compose to manage Docker containers that isolate the simulation, each robot, and the ground control station. | ||
|
||
|
||
The details of the docker compose setup is in `AirStack/docker/docker-compose.yaml`. | ||
|
||
In essence, the compose file launches: | ||
|
@@ -13,36 +12,39 @@ In essence, the compose file launches: | |
- ground control station | ||
- robots | ||
|
||
all get created on the same default Docker bridge network. | ||
all get created on the same default Docker bridge network. | ||
This lets them communicate with ROS2 on the same network. | ||
|
||
|
||
Each robot has its own ROS_DOMAIN_ID. | ||
|
||
## Pull Images | ||
|
||
To use the AirLab docker registry: | ||
|
||
```bash | ||
cd AirStack/docker/ | ||
docker login airlab-storage.andrew.cmu.edu:5001 | ||
## <Enter your andrew id (without @andrew.cmu.edu)> | ||
## <Enter your andrew password> | ||
|
||
## Pull the images in the docker compose file | ||
docker compose pull | ||
docker compose pull | ||
``` | ||
|
||
Catelog: [AirLab Registry Images](https://airlab-storage.andrew.cmu.edu:5001/v2/_catalog). | ||
|
||
Available image tags: | ||
Available image tags: | ||
[airstack-dev](https://airlab-storage.andrew.cmu.edu:5001/v2/shared/airstack-dev/tags/list), | ||
[isaac-sim_ros-humble](https://airlab-storage.andrew.cmu.edu:5001/v2/shared/isaac-sim_ros-humble/tags/list) | ||
|
||
## Build Images | ||
|
||
```bash | ||
docker compose build | ||
``` | ||
|
||
## Start and Stop | ||
## Start, Stop, and Remove | ||
|
||
Start | ||
```bash | ||
docker compose up -d --scale robot=[NUM_ROBOTS] | ||
|
@@ -53,11 +55,16 @@ docker ps -a | |
|
||
Stop | ||
```bash | ||
docker compose down | ||
docker compose stop | ||
``` | ||
|
||
Remove | ||
```bash | ||
docker compose down | ||
``` | ||
|
||
## SSH into Robots | ||
|
||
The containers mimic the robots' onboard computers on the same network. Therefore we intend to interface with the robots through ssh. | ||
|
||
The `ground-control-station` and `docker-robot-*` containers are setup with ssh daemon, so you can ssh into the containers using the IP address. | ||
|
@@ -67,14 +74,15 @@ You can get the IP address of each container by running the following command: | |
```bash | ||
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' [CONTAINER-NAME] | ||
``` | ||
|
||
Then ssh in, for example: | ||
|
||
```bash | ||
ssh [email protected] | ||
``` | ||
|
||
The ssh password is `airstack`. | ||
|
||
|
||
## Container Details | ||
|
||
```mermaid | ||
|
@@ -91,25 +99,30 @@ graph TD | |
``` | ||
|
||
|
||
### Isaac Sim | ||
|
||
Start a bash shell in the Isaac Sim container: | ||
|
||
```bash | ||
docker exec -it isaac-sim bash | ||
# if the isaac container is already running, execute a bash shell in it | ||
docker compose exec isaac-sim bash | ||
# or if not, start a new container | ||
docker compose run isaac-sim bash | ||
``` | ||
|
||
|
||
`runapp` launches Isaac Sim. | ||
The alias `runapp` launches Isaac Sim. | ||
The `--path` argument can be passed with a path to a `.usd` file to load a scene. | ||
|
||
It can also be run in headless mode with `./runheadless.native.sh` to stream to [Omniverse Streaming Client](https://docs.omniverse.nvidia.com/streaming-client/latest/user-manual.html) or `./runheadless.webrtc.sh` to [stream to a web browser](https://docs.omniverse.nvidia.com/extensions/latest/ext_livestream/webrtc.html). | ||
|
||
The container also has the isaacsim ROS2 package within that can be launched with `ros2 launch isaacsim run_isaacsim.launch.py`. | ||
The container also has the isaacsim ROS2 package within that can be launched with `ros2 launch isaacsim run_isaacsim.launch.py`. | ||
|
||
### Robot | ||
|
||
Start a bash shell in a robot container, e.g. for robot_1: | ||
|
||
```bash | ||
docker exec -it docker-robot-1 bash | ||
docker compose exec docker-robot-1 bash | ||
``` | ||
|
||
```bash | ||
|
@@ -118,21 +131,23 @@ cws # cleans workspace | |
bws # builds workspace | ||
bws --packages-select [your_packages] # builds only desired packages | ||
sws # sources workspace | ||
ros2 launch robot_bringup robot.launch.xml # top-level launch | ||
ros2 launch robot_bringup robot.launch.xml # top-level launch | ||
``` | ||
|
||
These aliases are in the `~/.bashrc` file. | ||
|
||
Each robot has `ROS_DOMAIN_ID` set to its ID number. `ROBOT_NAME` is set to `robot_$ROS_DOMAIN_ID`. | ||
|
||
### Ground Control Station | ||
|
||
Currently the ground control station uses the same image as the robot container. This may change in the future. | ||
|
||
Start a bash shell in a robot container: | ||
|
||
```bash | ||
docker exec -it ground-control-station bash | ||
docker compose exec ground-control-station bash | ||
``` | ||
|
||
The commands are currently the same. | ||
|
||
On the GCS `ROS_DOMAIN_ID` is set to 0. | ||
On the GCS `ROS_DOMAIN_ID` is set to 0. |
Oops, something went wrong.