From 78f9bdc9175b3ba4de0170478c2e5c72d51e194d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Lemaignan?= Date: Wed, 17 Nov 2021 08:17:34 +0100 Subject: [PATCH] change defaults to build tools and not ros node + update doc --- CMakeLists.txt | 4 ++-- README.md | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5269287..756bf37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ add_definitions(-std=c++11 -DGAZR_VERSION=${VERSION}) find_package(dlib REQUIRED) option(DEBUG_OUTPUT "Enable debug visualizations" OFF) -option(WITH_TOOLS "Compile sample tools" OFF) -option(WITH_ROS "Build ROS nodes" ON) +option(WITH_TOOLS "Compile sample tools" ON) +option(WITH_ROS "Build ROS nodes" OFF) if(WITH_ROS) diff --git a/README.md b/README.md index 53ece4b..623fcd1 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,9 @@ You need to [download](http://dlib.net/) and extract ``Dlib`` somewhere. This application requires ``dlib >= 18.18``. On Ubuntu 16.04 and above, `sudo apt-get install libdlib-dev` -You also need OpenCV. On Ubuntu, `sudo apt-get install libopencv-dev`. +You also need OpenCV. On Ubuntu, `sudo apt-get install libopencv-dev`. The code +has been last tested with OpenCV4. Previous versions of OpenCV might or might +not work. ### Installation @@ -60,25 +62,29 @@ The library uses a standard ``CMake`` workflow: ``` $ mkdir build && cd build -$ cmake .. +$ cmake -DCMAKE_BUILD_TYPE=Release .. $ make ``` -By default, only the ROS nodes are compiled. You can compile as well stand-alone -tools (for instance, to detect faces in a video) by calling `cmake` with the -parameter `WITH_TOOLS=TRUE`: +**Do not forget to enable Release mode, otherwise the performances will be +terrible.** +You can test the result with: ``` -$ cmake -DWITH_TOOLS=TRUE .. +$ ./gazr_show_head_pose ../share/shape_predictor_68_face_landmarks.dat ``` -Finally, to install the library and the executables: + +Finally, if desired, you can install the library and the executables: ``` $ make install ``` +By default, only the sample tools are built (CMake parameter `WITH_TOOLS=ON`). +See below for ROS support. + ROS support ----------- @@ -91,15 +97,18 @@ Before building gazr with the ROS wrapper, make sure that you have installed the following ROS- < distro > package dependencies, where < distro > is the ROS distribution in your machine. +The code has been tested up to ROS noetic, but should work for any ROS1 +distribution. + For example, this is the case for ROS-kinetic distribution: ``` sudo apt-get install ros-kinetic-roscpp ros-kinetic-tf ros-kinetic-std-msgs ros-kinetic-visualization-msgs ros-kinetic-sensor-msgs ros-kinetic-cv-bridge ros-kinetic-image-transport ros-kinetic-image-geometry ``` -The compilation of the ROS wrapper is enable by default. You can disable it with: +The compilation of the ROS wrapper is disabled by default. You can enable it with: ``` -cmake -DWITH_ROS=OFF +cmake -DWITH_ROS=ON ``` ### Usage