From f9834a9157c51a687376a6dc842d845ee959e68d Mon Sep 17 00:00:00 2001 From: JeffersonAero Date: Thu, 15 Jun 2023 11:41:44 -0500 Subject: [PATCH 1/4] add docker instructions to RUN.md --- docs/RUN.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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). From baad9b678f6e76e7d32f34164c48b8db495a3b66 Mon Sep 17 00:00:00 2001 From: JeffersonAero Date: Thu, 15 Jun 2023 11:47:55 -0500 Subject: [PATCH 2/4] add .github docker CI --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..72519ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Build, test and push docker CI + +on: + push: + branches: [ 'master' ] + +jobs: + + build-focal: + + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Build, test, push base docker + run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. + + build-bionic: + + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v3 + - name: Build, test, push base docker + run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. + + build-jammy: + + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Build, test, push base docker + run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. \ No newline at end of file From 6a27ac8f0904236d08ca1885310b4a0706fdaf24 Mon Sep 17 00:00:00 2001 From: JeffersonAero Date: Thu, 15 Jun 2023 11:56:06 -0500 Subject: [PATCH 3/4] update github CI --- .github/workflows/ci.yml | 6 +++--- docker/Dockerfile.noetic | 4 ++-- docs/DOCKER.md | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72519ef..6bf2b58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build, test, push base docker - run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. + run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. build-bionic: @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build, test, push base docker - run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. + run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. build-jammy: @@ -28,4 +28,4 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build, test, push base docker - run: docker build -t rmdlo-trackdlo:noetic -f ./docker/Dockerfile.noetic .. \ No newline at end of file + run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. 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 From a75cb6ae3d1e247a3eb45170ac97df5a8f617c71 Mon Sep 17 00:00:00 2001 From: JeffersonAero Date: Thu, 15 Jun 2023 12:08:41 -0500 Subject: [PATCH 4/4] working github CI for docker build --- .github/workflows/ci.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bf2b58..d06c93f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,27 +5,16 @@ on: 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"] - build-focal: + runs-on: ${{matrix.os}} - runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - name: Build, test, push base docker - run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. - - build-bionic: - - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v3 - - name: Build, test, push base docker - run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. - - build-jammy: - - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - name: Build, test, push base docker - run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. + run: cd docker && docker build -t rmdlo-trackdlo:noetic -f Dockerfile.noetic .. \ No newline at end of file