Skip to content

Commit

Permalink
Merge pull request #71 from hollydinkel/master
Browse files Browse the repository at this point in the history
Added github CI for docker build
  • Loading branch information
hollydinkel committed Jun 15, 2023
2 parents 974a6ed + a75cb6a commit 331f35d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 17 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build, test and push docker CI

on:
push:
branches: [ 'master' ]

jobs:
build-linux:
strategy:
max-parallel: 5
matrix:
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04]
python-version: ["3.7", "3.8", "3.9", "3.10"]

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- name: Build, test, push base docker
run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic ..
4 changes: 2 additions & 2 deletions docker/Dockerfile.noetic
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
&& apt-get clean

# Install required Python components
COPY docker/requirements.txt ${HOME}
COPY ./docker/requirements.txt ${HOME}
RUN python3 -m pip install -r ${HOME}/requirements.txt

# Set up a catkin workspace
ENV CATKIN_WS ${HOME}/tracking_ws
COPY . ${CATKIN_WS}/src/trackdlo
COPY docker/init_workspace.sh ${HOME}
COPY ./docker/init_workspace.sh ${HOME}
RUN ${CATKIN_WS}/src/trackdlo/docker/init_workspace.sh
RUN echo "source ${CATKIN_WS}/devel/setup.bash" >> ${HOME}/.bashrc

Expand Down
24 changes: 12 additions & 12 deletions docs/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ The current configuration was tested on an x86 host computer running Ubuntu 20.0
2. **Build the Docker Image**
```bash
$ cd trackdlo/docker
$ docker build -t nvidia-dope:noetic-v1 -f Dockerfile.noetic ..
$ docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic ..
```
This will take several minutes and requires an internet connection.

3. **Plug in your camera**
This will take several minutes and require connection to the internet. This command will install all dependencies and build the TrackDLO ROS workspace within the image.

3. **Connect a Camera**
Docker will not recognize a USB device that is plugged in after the container is started.

4. **Run the container**
4. **Run the Container**
```
$ ./run_dope_docker.sh [name] [host dir] [container dir]
$ ./run_docker.sh [name] [host dir] [container dir]
```
Parameters:
- `name` is an optional field that specifies the name of this image. By default, it is `nvidia-dope-v2`. By using different names, you can create multiple containers from the same image.
- `host dir` and `container dir` are a pair of optional fields that allow you to specify a mapping between a directory on your host machine and a location inside the container. This is useful for sharing code and data between the two systems. By default, it maps the directory containing dope to `/root/catkin_ws/src/dope` in the container.
Optional Parameters:
- `name` specifies the name of the image. By default, it is `trackdlo`. Multiple containers can be created from the same image by changing this parameter.
- `host dir` and `container dir` map a directory on the host machine to a location inside the container. This enables sharing code and data between the two systems. By default, the `run_docker.sh` bash script maps the directory containing trackdlo to `/root/tracking_ws/src/trackdlo` in the container.

Only the first invocation of this script with a given name will create a container. Subsequent executions will attach to the running container allowing you -- in effect -- to have multiple terminal sessions into a single container.
Only the first call of this script with a given name will create a container. Subsequent executions will attach to the running container to enable running multiple terminal sessions in a single container.

5. **Build DOPE**
Return to step 7 of the [installation instructions](../readme.md) (downloading the weights).
*Note:* Since the Docker container binds directly to the host's network, it will see `roscore` even if running outside the docker container.
*Note:* Since the Docker container binds directly to the host's network, it will see `roscore` even if running outside the docker container.
For more information about using ROS with docker, see the ![ROS tutorial](http://wiki.ros.org/docker/Tutorials/Docker).
7 changes: 4 additions & 3 deletions docs/RUN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide contains information about required dependencies and how to run the T

## Minimum Requirements

Installation and execution of TrackDLO was verified with the below dependencies.
Installation and execution of TrackDLO was verified with the below dependencies on an Ubuntu 20.04 system with ROS Noetic.

* [ROS Noetic](http://wiki.ros.org/noetic/Installation)
* [Eigen3](https://eigen.tuxfamily.org/index.php?title=Main_Page) (Our version: 3.3.7)
Expand All @@ -16,6 +16,8 @@ Installation and execution of TrackDLO was verified with the below dependencies.
* [Pillow](https://pillow.readthedocs.io/en/stable/installation.html) (Our version: 9.2.0)
* [ROS Numpy](https://pypi.org/project/rosnumpy/) (Our version: 0.0.5)

We also provide Docker files for compatibility with other system configurations, refer to the ![DOCKER.md](https://github.com/RMDLO/trackdlo/blob/master/docs/DOCKER.md) for more information.

## Other Requirements

We used an Intel RealSense d435 camera in all of the experiments performed in our paper.
Expand All @@ -37,6 +39,7 @@ The repository is organized into the following directories:
First, clone the repository into a ROS workspace and build the package:

```bash
$ cd YOUR_ROS_WORKSPACE/src
$ git clone https://github.com/RMDLO/trackdlo.git
$ catkin build trackdlo
```
Expand Down Expand Up @@ -87,7 +90,6 @@ roslaunch trackdlo realsense_node.launch
$ roslaunch trackdlo trackdlo.launch
```


## Run TrackDLO with Recorded ROS Bag Data:
1. Download the `.bag` files from [here](https://drive.google.com/drive/folders/1YjX-xfbNfm_G9FYbdw1voYxmd9VA-Aho?usp=sharing) and place them in your ROS workspace.
2. Open a new terminal and run
Expand All @@ -103,7 +105,6 @@ $ roslaunch trackdlo trackdlo.launch
$ rosbag play <name_of_the_bag_file>.bag
```


## Data:

To enable compatibility with different RGB-D camera models, we recently updated the package to work with depth images instead of ordered point clouds. We are working on recollecting the corresponding ROS `.bag` files and will share them shortly. For the time being, the original `.bag` files can still be found [here](https://drive.google.com/drive/folders/1YjX-xfbNfm_G9FYbdw1voYxmd9VA-Aho?usp=sharing).

0 comments on commit 331f35d

Please sign in to comment.