Skip to content

Commit

Permalink
change defaults to build tools and not ros node + update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
severin-lemaignan committed Nov 17, 2021
1 parent 56fa798 commit 78f9bdc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,39 @@ 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

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
-----------

Expand All @@ -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
Expand Down

0 comments on commit 78f9bdc

Please sign in to comment.