-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Introduction | ||
# Building image and running container | ||
|
||
To build the docker image ( `tsdf-plusplus-ros-catkin-build` ) run: | ||
```bash | ||
|
@@ -12,6 +12,33 @@ To run the docker image use: | |
|
||
The workspace is located in `/home/ros/tsdf-plusplus_ws` and the `docker` user is `ros`. | ||
|
||
# Getting environment up and running | ||
|
||
If you want to get quicky up and runing, keeping sources on your computer | ||
and using docker as a as a perdictable build system you can run: | ||
```bash | ||
./build-ros-image.sh | ||
./set-me-up.sh | ||
``` | ||
|
||
You can skip running `build-ros-image.sh` if the image is already built. | ||
|
||
This `set-me-up.sh` script will do the following: | ||
- Run a docker container | ||
- Copy the built workspace to the destination folder of choice | ||
- Stop the container | ||
|
||
Note that if you want to change the remote to SSH or your fork you'll need to edit the origin in the cloned repos. | ||
For instance, in the `tsdf-plusplus` project use something like:tsdf-plusplus.git | ||
```bash | ||
git remote set-url origin [email protected]:ethz-asl/tsdf-plusplus.git | ||
``` | ||
|
||
You can confirm you have the right origin URL by running: | ||
```bash | ||
git remote show origin | ||
``` | ||
|
||
TODO: | ||
- Allow mounted local workspaced in docker | ||
- Automatically build the current (remote) branch | ||
|
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,6 +1,12 @@ | ||
#!/bin/bash | ||
docker container run --rm -it \ | ||
mode=$1 | ||
if [ -z "$1" ] | ||
then | ||
mode="it" | ||
fi | ||
docker container run --rm -$mode \ | ||
--user 1001 \ | ||
--name tsdf-plusplus \ | ||
--workdir /home/ros/catkin_ws \ | ||
tsdf-plusplus-ros-catkin-build:v0.1 \ | ||
bash |
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,9 @@ | ||
#!/bin/bash | ||
./run-ros-image.sh dt | ||
sleep 5 | ||
container_id=$(docker ps -aqf "name=tsdf-plusplus" | tr -d '\n') | ||
echo "Docker container $container_id" | ||
echo "Write absolute path of the folder on your computer, you want the entire '/home/ros/catkin_ws' folder on the docker machine to be copied into:" | ||
read destination_folder | ||
docker cp $container_id:/home/ros/catkin_ws $destination_folder | ||
docker stop -t 1 $container_id |