Skip to content

Commit

Permalink
Use on-system color-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 15, 2018
1 parent da0a4ac commit ccfeb48
Show file tree
Hide file tree
Showing 59 changed files with 82 additions and 125 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ install:
- sudo make install
- cd ../../..

# Install color-debug
- cd
- git clone https://github.com/roboticslab-uc3m/color-debug
- mkdir -p color-debug/build && cd "$_"
- cmake ..
- sudo make install

#-- (for AmorCartesianControl) Install AMOR API
- git clone [email protected]:roboticslab-uc3m/amor-api
- cd amor-api && mkdir build && cd build
Expand Down
22 changes: 5 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,11 @@ if(ENABLE_coverage)
endif()
endif()

# Superbuild phase - include color-debug.
include(FindOrBuildPackage)
find_or_build_package(COLOR_DEBUG)

# find_or_build_package() doesn't bring into scope COLOR_DEBUG_INCLUDE_DIRS
# nor other config variables. If a system copy is found, we have to call the
# find_package() command and proceed as usual.
if(USE_SYSTEM_COLOR_DEBUG)
find_package(COLOR_DEBUG REQUIRED)
include_directories(${COLOR_DEBUG_INCLUDE_DIRS})
add_library(COLOR_DEBUG UNKNOWN IMPORTED)
endif()

# Store list of exported targets in global scope.
set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_TARGETS)

# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Find YARP (main dependency).
# Find project's hard dependencies.
find_package(COLOR_DEBUG REQUIRED)
find_package(YARP REQUIRED)

# Load YARP modules.
Expand All @@ -95,6 +80,9 @@ endif()
# Configure installation paths for YARP resources.
yarp_configure_external_installation(roboticslab-kinematics-dynamics WITH_PLUGINS)

# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Dependency-related tweaks.
set(_target_kdl_version 1.4)

Expand Down
20 changes: 0 additions & 20 deletions cmake/ycm-modules/BuildCOLOR_DEBUG.cmake

This file was deleted.

5 changes: 2 additions & 3 deletions doc/kinematics-dynamics-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ First install the dependencies:
- [Install CMake](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-cmake.md)
- [Install YARP](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md)
- [Install KDL](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-kdl.md)
- [Install color-debug](https://github.com/roboticslab-uc3m/color-debug)

Additionally, this project depends on YCM to download and build external packages. Although this process is intended to run automatically during the CMake configuration phase, you may still want to install YCM and said packages by yourself. In that respect, refer to [Install YCM](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md) and to the installation guides of any package listed below:

- [color-debug](https://github.com/roboticslab-uc3m/color-debug)
Additionally, this project depends on YCM to download and use additional CMake modules. Although this process is intended to run automatically during the CMake configuration phase, you may still want to install YCM by yourself. In that respect, refer to [Install YCM](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md).

Only for `testBasicCartesianControl` and `streamingDeviceController`, we use `FakeControlboard` and `ProximitySensorsClient` from [yarp-devices](https://github.com/roboticslab-uc3m/yarp-devices), respectively:

Expand Down
5 changes: 2 additions & 3 deletions libraries/KdlVectorConverterLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ if(ENABLE_KdlVectorConverterLib)
add_library(KdlVectorConverterLib KdlVectorConverter.cpp
KdlVectorConverter.hpp)

add_dependencies(KdlVectorConverterLib COLOR_DEBUG)

set_target_properties(KdlVectorConverterLib PROPERTIES PUBLIC_HEADER KdlVectorConverter.hpp)

target_link_libraries(KdlVectorConverterLib PUBLIC ${orocos_kdl_LIBRARIES})
target_link_libraries(KdlVectorConverterLib PUBLIC ${orocos_kdl_LIBRARIES}
PRIVATE ROBOTICSLAB::ColorDebug)

target_include_directories(KdlVectorConverterLib PUBLIC ${orocos_kdl_INCLUDE_DIRS}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand Down
2 changes: 1 addition & 1 deletion libraries/KdlVectorConverterLib/KdlVectorConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "KdlVectorConverter.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// -----------------------------------------------------------------------------

Expand Down
5 changes: 2 additions & 3 deletions libraries/KinematicRepresentationLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ if(ENABLE_KinematicRepresentationLib)
add_library(KinematicRepresentationLib KinematicRepresentation.hpp
KinematicRepresentation.cpp)

add_dependencies(KinematicRepresentationLib COLOR_DEBUG)

set_target_properties(KinematicRepresentationLib PROPERTIES PUBLIC_HEADER KinematicRepresentation.hpp)

target_link_libraries(KinematicRepresentationLib PRIVATE ${orocos_kdl_LIBRARIES})
target_link_libraries(KinematicRepresentationLib PRIVATE ${orocos_kdl_LIBRARIES}
ROBOTICSLAB::ColorDebug)

target_include_directories(KinematicRepresentationLib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <kdl/frames.hpp>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

namespace roboticslab
{
Expand Down
10 changes: 6 additions & 4 deletions libraries/TrajectoryLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ if(ENABLE_TrajectoryLib)
KdlTrajectory.hpp)

# Set up our library.
add_library(TrajectoryLib ${_trayectory_lib_sources})

add_dependencies(TrajectoryLib COLOR_DEBUG)
add_library(TrajectoryLib ITrajectory.hpp
ICartesianTrajectory.hpp
KdlTrajectory.cpp
KdlTrajectory.hpp)

set_property(TARGET TrajectoryLib PROPERTY PUBLIC_HEADER ICartesianTrajectory.hpp
ITrajectory.hpp
KdlTrajectory.hpp)

target_link_libraries(TrajectoryLib PUBLIC ${orocos_kdl_LIBRARIES}
PRIVATE KdlVectorConverterLib)
PRIVATE KdlVectorConverterLib
ROBOTICSLAB::ColorDebug)

target_include_directories(TrajectoryLib PUBLIC ${orocos_kdl_INCLUDE_DIRS}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand Down
2 changes: 1 addition & 1 deletion libraries/TrajectoryLib/KdlTrajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <kdl/velocityprofile_trap.hpp>
#include <kdl/path_line.hpp>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "KdlVectorConverter.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <cmath>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// -----------------------------------------------------------------------------

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/AmorCartesianControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ if(NOT SKIP_AmorCartesianControl)
DeviceDriverImpl.cpp
ICartesianControlImpl.cpp)

add_dependencies(AmorCartesianControl COLOR_DEBUG)

target_link_libraries(AmorCartesianControl YARP::YARP_OS
YARP::YARP_dev
AMOR::amor_api
ROBOTICSLAB::ColorDebug
KinematicRepresentationLib
KinematicsDynamicsInterfaces)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <yarp/os/Property.h>
#include <yarp/os/Value.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "KinematicRepresentation.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <yarp/os/Time.h>
#include <yarp/os/Vocab.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "KinematicRepresentation.hpp"

Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/AsibotSolver/AsibotConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cmath>
#include <sstream>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

using namespace roboticslab;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <numeric>
#include <utility>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

using namespace roboticslab;

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/AsibotSolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ if(NOT SKIP_AsibotSolver)
AsibotConfiguration.cpp
AsibotConfigurationLeastOverallAngularDisplacement.cpp)

add_dependencies(AsibotSolver COLOR_DEBUG)

target_link_libraries(AsibotSolver YARP::YARP_OS
YARP::YARP_dev
YARP::YARP_sig
YARP::YARP_math
ROBOTICSLAB::ColorDebug
KinematicRepresentationLib
KinematicsDynamicsInterfaces)

Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/AsibotSolver/DeviceDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <yarp/math/Math.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <yarp/math/Math.h>
#include <yarp/math/SVD.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "KinematicRepresentation.hpp"

Expand Down
2 changes: 1 addition & 1 deletion libraries/YarpPlugins/AsibotSolver/TrajGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef __TRAJ_GEN_HPP__
#define __TRAJ_GEN_HPP__

#include <ColorDebug.hpp>
#include <ColorDebug.h>

/**
* @ingroup kinematics-dynamics-libraries
Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/BasicCartesianControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ yarp_add_plugin(BasicCartesianControl BasicCartesianControl.hpp
ICartesianControlImpl.cpp
RateThreadImpl.cpp)

add_dependencies(BasicCartesianControl COLOR_DEBUG)

target_link_libraries(BasicCartesianControl YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
TrajectoryLib
KinematicsDynamicsInterfaces)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "BasicCartesianControl.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <yarp/os/Vocab.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

#include "KdlTrajectory.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <cmath> //-- abs
#include <yarp/os/Time.h>
#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- RateThread Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ yarp_add_plugin(BasicTwoLimbCartesianControl BasicTwoLimbCartesianControl.hpp
ICartesianControlImpl.cpp
RateThreadImpl.cpp)

add_dependencies(BasicTwoLimbCartesianControl COLOR_DEBUG)

target_link_libraries(BasicTwoLimbCartesianControl YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
TrajectoryLib
Gait)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "BasicTwoLimbCartesianControl.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "BasicTwoLimbCartesianControl.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- ICartesianControl Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "BasicTwoLimbCartesianControl.hpp"

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- RateThread Related ------------------------------------

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CartesianControlClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ yarp_add_plugin(CartesianControlClient CartesianControlClient.hpp
ICartesianControlImpl.cpp
FkStreamResponder.cpp)

add_dependencies(CartesianControlClient COLOR_DEBUG)

target_link_libraries(CartesianControlClient YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
KinematicsDynamicsInterfaces)

yarp_install(TARGETS CartesianControlClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <yarp/os/Network.h>
#include <yarp/os/Time.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <yarp/os/Time.h>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// -----------------------------------------------------------------------------

Expand Down
3 changes: 1 addition & 2 deletions libraries/YarpPlugins/CartesianControlServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ yarp_add_plugin(CartesianControlServer CartesianControlServer.hpp
RpcResponder.cpp
StreamResponder.cpp)

add_dependencies(CartesianControlServer COLOR_DEBUG)

target_link_libraries(CartesianControlServer YARP::YARP_OS
YARP::YARP_dev
ROBOTICSLAB::ColorDebug
KinematicRepresentationLib
KinematicsDynamicsInterfaces)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <string>

#include <ColorDebug.hpp>
#include <ColorDebug.h>

// ------------------- DeviceDriver Related ------------------------------------

Expand Down
Loading

0 comments on commit ccfeb48

Please sign in to comment.