Skip to content

Commit

Permalink
Merge pull request #1226 from MRPT/develop
Browse files Browse the repository at this point in the history
Merge for release 2.4.4
  • Loading branch information
jlblancoc authored May 5, 2022
2 parents 477939c + 9ef3d80 commit c64f5f0
Show file tree
Hide file tree
Showing 133 changed files with 2,153 additions and 978 deletions.
30 changes: 25 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if (POLICY CMP0075)
endif()

if ((NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/nanogui/include")
OR (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libfyaml/include")
OR (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/rplidar_sdk/sdk/sdk")
)
message(FATAL_ERROR "git submodules missing! "
Expand Down Expand Up @@ -118,8 +117,15 @@ include(cmakemodules/script_select_app_to_build.cmake REQUIRED) # Build (or not

# Build static or dynamic libs?
# ===================================================
# Default: dynamic libraries:
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
# Default: dynamic libraries (except if building to JavaScript code)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
set(_def_value OFF)
else()
set(_def_value ON)
endif()
set(BUILD_SHARED_LIBS ${_def_value} CACHE BOOL "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
unset(_def_value)

if(BUILD_SHARED_LIBS)
set(CMAKE_MRPT_BUILD_SHARED_LIB "#define MRPT_BUILT_AS_DLL")
set(CMAKE_MRPT_BUILD_SHARED_LIB_ONOFF 1)
Expand All @@ -128,6 +134,12 @@ else()
set(CMAKE_MRPT_BUILD_SHARED_LIB_ONOFF 0)
endif()

# Only for emscripten: build executables as .html demo pages:
# =============================================================
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten")
set(CMAKE_EXECUTABLE_SUFFIX ".html")
endif()

# Only for Unix: use pkg-config to find libraries
# ===================================================
include(FindPkgConfig OPTIONAL)
Expand Down Expand Up @@ -279,6 +291,8 @@ include(cmakemodules/script_wxwidgets.cmake REQUIRED) # Check for wxWidgets +
include(cmakemodules/script_xsens.cmake REQUIRED) # XSens Motion trackers / IMU drivers
include(cmakemodules/script_zlib.cmake REQUIRED) # Check for zlib

include(cmakemodules/process_emscripten_embedded_files.cmake REQUIRED)

# ---------------------------------------------------------------------------
# OPTIONS
#The options for the user when using "cmakesetup" or "ccmake":
Expand Down Expand Up @@ -416,7 +430,7 @@ if (MRPT_COMPILER_IS_CLANG)
# Use "modern" C99 ! ;-)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

if(NOT APPLE)
if(NOT APPLE AND NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL "Emscripten"))
# From: https://stackoverflow.com/a/16788372/1631514
# I would use the native library for each OS i.e. libstdc++ on GNU/Linux and libc++ on Mac OS X.
# libc++ is not 100% complete on GNU/Linux, and there's no real advantage to using it when libstdc++
Expand Down Expand Up @@ -609,10 +623,16 @@ add_subdirectory(doc)

# UNIT TESTS:
# ----------------------------------------------------------------------------
set(MRPT_BUILD_TESTING ON CACHE BOOL "Build MRPT tests")
if (DEFINED BUILD_TESTING)
set(_def_value ${BUILD_TESTING})
else()
set(_def_value ON)
endif()
set(MRPT_BUILD_TESTING ${_def_value} CACHE BOOL "Build MRPT tests")
if(MRPT_BUILD_TESTING)
add_subdirectory(tests) # Build my tests
endif()
unset(_def_value )

#-----------------------------------
# The python bindings
Expand Down
64 changes: 13 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,73 +53,35 @@ See [this PPA](https://launchpad.net/~joseluisblancoc/+archive/ubuntu/mrpt) for

sudo add-apt-repository ppa:joseluisblancoc/mrpt # develop branch
#sudo add-apt-repository ppa:joseluisblancoc/mrpt-stable # master (stable releases) branch
#sudo apt update # Only required for Ubuntu 16.04
sudo apt install libmrpt-dev mrpt-apps

Supported distributions:
* Ubuntu 20.04 LTS (Focal), Ubuntu 18.04 LTS (Bionic), 18.10 (Cosmic), 19.10 (Eoan)
* Ubuntu 16.04 LTS Xenial (EOL: April 2021)
* Using 16.04 requires installing gcc-7 due to some bugs in gcc-5:

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y g++-7

* Ubuntu 18.04 LTS (Bionic), Ubuntu 20.04 LTS (Focal), or newer.

### 3.2. Build from sources

Minimum compiler requisites:
* gcc-7 or newer.
* Ubuntu 16.04LTS Xenial: [Instructions](https://gist.github.com/jlblancoc/99521194aba975286c80f93e47966dc5) for installing gcc-7 in this version of Ubuntu.
* Ubuntu 18.04 or newer: default gcc version is ok.
* clang-4 or newer.
* Windows: Visual Studio 2017 version 15.3 or newer.
* cmake >= 3.3 required (>=3.4 for Windows).
* Eigen >= 3.3 required.

To build in Debian/Ubuntu follow the steps below. See [full build docs](http://www.mrpt.org/Building_and_Installing_Instructions) online
for Windows instructions or to learn all the details.

* Install **minimum** recommended dependencies:

```bash
sudo apt install build-essential pkg-config cmake libwxgtk3.0-dev libwxgtk3.0-gtk3-dev \
libopencv-dev libeigen3-dev libgtest-dev
```
MRPT builds against OpenCV 2.4.x, 3.x, 4.x, but it is recommended to use 3.0 or later.

See [build documentation](https://docs.mrpt.org/reference/latest/compiling.html) ([source](doc/source/compiling.rst)).

* **Recommended**: Install additional dependencies to enable most MRPT features (except ROS bridges):
### 3.3. Windows precompiled versions

```bash
sudo apt install libftdi-dev freeglut3-dev zlib1g-dev libusb-1.0-0-dev \
libudev-dev libfreenect-dev libdc1394-22-dev libavformat-dev libswscale-dev \
libassimp-dev libjpeg-dev libsuitesparse-dev libpcap-dev liboctomap-dev \
libglfw3-dev
```
Executables (`.exe`s and `.dll`s) and development libraries (`.h`s and `.lib`s) included:

* Install additional dependencies for `ros1bridge` using official Ubuntu repositories.
If you already have a ROS distribution installed, doing `source /opt/ros/xxx/setup.bash`
is enough, no further packages must be installed.
[Nightly built Windows installer](https://github.com/MRPT/mrpt/releases/tag/Windows-nightly-builds)

```bash
sudo apt install libcv-bridge-dev libgeometry-msgs-dev libnav-msgs-dev librosbag-storage-dev libroscpp-dev libsensor-msgs-dev libstd-srvs-dev libstereo-msgs-dev libtf2-dev libtf2-msgs-dev libbz2-dev
```
### 3.4. As a ROS1/ROS2 package

* Build with `cmake` as usual:
MRPT is also shipped as a ros1 & ros2 package named `mrpt2`, so it can be installed via:

```bash
mkdir build && cd build
cmake ..
make
sudo apt install ros-$ROS_DISTRO-mrpt2
```

### 3.3. Windows precompiled versions

Executables (`.exe`s and `.dll`s) and development libraries (`.h`s and `.lib`s) included:

[Nightly built Windows installer](https://github.com/MRPT/mrpt/releases/tag/Windows-nightly-builds)
`mrpt2` status in ROS build farms:

| Distro | `develop` branch | Stable release |
|---|---|---|
| ROS1 Noetic @ u20.04 | [![Build Status](https://build.ros.org/job/Ndev__mrpt2__ubuntu_focal_amd64/badge/icon)](https://build.ros.org/job/Ndev__mrpt2__ubuntu_focal_amd64/) | [![Build Status](https://build.ros.org/job/Nbin_uF64__mrpt2__ubuntu_focal_amd64__binary/badge/icon)](https://build.ros.org/job/Nbin_uF64__mrpt2__ubuntu_focal_amd64__binary/) |
| ROS2 Rolling @ u22.04 | [![Build Status](https://build.ros2.org/job/Rdev__mrpt2__ubuntu_jammy_amd64/badge/icon)](https://build.ros2.org/job/Rdev__mrpt2__ubuntu_jammy_amd64/) | [![Build Status](https://build.ros2.org/job/Rbin_uJ64__mrpt2__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uJ64__mrpt2__ubuntu_jammy_amd64__binary/) |

## 4. License
MRPT is released under the [new BSD license](http://www.mrpt.org/License/).
Expand Down
Loading

0 comments on commit c64f5f0

Please sign in to comment.