Skip to content

Latest commit

 

History

History
119 lines (73 loc) · 4 KB

File metadata and controls

119 lines (73 loc) · 4 KB

Linux installation from sources using colcon

colcon is a command line tool based on CMake aimed at building sets of software packages in a tidy and easy way. The instructions for installing the using colcon application from sources and its required dependencies are provided in this page.

Installation

Follow the instructions below to build , after making sure all required dependencies are installed in your system (developer_manual_installation_sources_linux_dependencies).

Download eProsima dependencies

  1. Create a AML-IP directory and download the .repos file that will be used to install and its dependencies:

    mkdir -p ~/AML-IP/src
    cd ~/AML-IP
    wget https://raw.githubusercontent.com/eProsima/AML-IP/main/amlip.repos
    vcs import src < amlip.repos

    Note

    In case there are already some eProsima libraries installed in the system, it is not required to download and build every dependency in the .repos file, but just those projects that are not already in the system. Refer to section eprosima_dependencies in order to check how to source those libraries.

Build packages

  1. Build the packages:

    colcon build --packages-up-to-regex amlip

Note

Not all the sub-packages of all the dependencies are required. In order to build only the packages required, use the colcon option --packages-up-to <package-to-build>. e.g. the C++ library is completely built using --packages-up-to amlip_cpp For more details about the colcon available arguments, please refer to packages selection page of the colcon manual.

Note

Being based on CMake, it is possible to pass the CMake configuration options to the colcon build command. For more information on the specific syntax, please refer to the CMake specific arguments page of the colcon manual. For more details about the available CMake options, please refer to the cmake_options section.

Run Tests

Tests are not automatically built within the project. Use CMake option BUILD_TESTS when building the project in order to activate tests. This could also be done by a colcon.meta file to only activate tests in the desired packages.

  1. Build the packages with tests:

    colcon build --packages-select-regex amlip --cmake-args "-DBUILD_TESTS=ON"
  2. Run tests. Use --packages-select <package-name> to only execute tests of a specific package:

    colcon test --event-handlers=console_direct+ --packages-select amlip_cpp

Source installation

To source the installation of the previously built (in order to use its tools or link against it), use the following command:

source install/setup.bash

Build demos

There is a demo sub-package that can be installed along with the project. In order to install this package use one of these 2 commands:

# To build all sub-packages
colcon build
# To only build demo package and its dependencies
colcon build --packages-up-to amlip_demo_nodes