diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d06c93f --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 .. \ No newline at end of file diff --git a/docker/Dockerfile.noetic b/docker/Dockerfile.noetic index b52cbb3..b36f2ab 100644 --- a/docker/Dockerfile.noetic +++ b/docker/Dockerfile.noetic @@ -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 diff --git a/docs/DOCKER.md b/docs/DOCKER.md index ec3bcca..9f64bd9 100644 --- a/docs/DOCKER.md +++ b/docs/DOCKER.md @@ -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. \ No newline at end of file +For more information about using ROS with docker, see the ![ROS tutorial](http://wiki.ros.org/docker/Tutorials/Docker). \ No newline at end of file diff --git a/docs/RUN.md b/docs/RUN.md index 348b329..676a23b 100644 --- a/docs/RUN.md +++ b/docs/RUN.md @@ -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) @@ -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. @@ -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 ``` @@ -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 @@ -103,7 +105,6 @@ $ roslaunch trackdlo trackdlo.launch $ rosbag play .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).