Skip to content

Commit

Permalink
Merge branch 'solver-bindings' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	CMakeLists.txt
  • Loading branch information
PeterBowman committed Jan 19, 2018
2 parents 093594c + 6c9084f commit cdc0133
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 36 deletions.
15 changes: 1 addition & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})

# Generate export header.
include(GenerateExportHeader)

# Dummy source file and library target for generate_export_header().
file(WRITE ${CMAKE_BINARY_DIR}/generated_src/empty.c "")
add_library(ROBOTICSLAB_KINEMATICS_DYNAMICS EXCLUDE_FROM_ALL ${CMAKE_BINARY_DIR}/generated_src/empty.c)

generate_export_header(ROBOTICSLAB_KINEMATICS_DYNAMICS
EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/generated_include/roboticslab-kinematics-dynamics-export.h)

install(FILES ${CMAKE_BINARY_DIR}/generated_include/roboticslab-kinematics-dynamics-export.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

# Enabling coverage.
option(ENABLE_coverage "Choose if you want to enable coverage collection" OFF)

Expand All @@ -93,7 +80,7 @@ if(USE_SYSTEM_COLOR_DEBUG)
endif()

# Store common include directories in global scope.
set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/generated_include)
set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_INCLUDE_DIRS)

# Store list of exported targets in global scope.
set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_TARGETS)
Expand Down
13 changes: 13 additions & 0 deletions bindings/kinematics_dynamics.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@

%{
/* Includes the header in the wrapper code */
#include "ICartesianSolver.h"
#include "ICartesianControl.h"
%}

/* Parse the header file to generate wrappers */
%include "ICartesianSolver.h"
%include "ICartesianControl.h"

%extend roboticslab::ICartesianControl
Expand All @@ -37,6 +39,17 @@
}
}

%{
#include <yarp/dev/all.h>
roboticslab::ICartesianSolver *viewICartesianSolver(yarp::dev::PolyDriver& d)
{
roboticslab::ICartesianSolver *result;
d.view(result);
return result;
}
%}
extern roboticslab::ICartesianSolver *viewICartesianSolver(yarp::dev::PolyDriver& d);

%{
#include <yarp/dev/all.h>
roboticslab::ICartesianControl *viewICartesianControl(yarp::dev::PolyDriver& d)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include <cmath>

#include <ColorDebug.hpp>

#include "KinematicRepresentation.hpp"

// ------------------- ICartesianControl Related ------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions libraries/YarpPlugins/AsibotSolver/ICartesianSolverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <yarp/math/SVD.h>
#include <yarp/sig/Matrix.h>

#include <ColorDebug.hpp>

#include "KinematicRepresentation.hpp"

// -----------------------------------------------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions libraries/YarpPlugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ include(YarpPlugin)
# Common YARP includes for subdirectories (needless since YARP 2.3.70).
include_directories(${YARP_INCLUDE_DIRS})

# Include export headers (ATM only deprecation notices).
include_directories(${CMAKE_BINARY_DIR}/generated_include)

# Make interface headers discoverable by subdirectories.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
19 changes: 0 additions & 19 deletions libraries/YarpPlugins/ICartesianSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

#include <vector>

#include "roboticslab-kinematics-dynamics-export.h"

#include <ColorDebug.hpp>

/**
* @file
* @brief Contains roboticslab::ICartesianSolver
Expand All @@ -29,21 +25,6 @@ class ICartesianSolver
//! Destructor
virtual ~ICartesianSolver() {}

/**
* @deprecated Use @ref getNumJoints instead.
*
* @brief Get number of links for which the solver has been configured
*
* @param numLinks Number of links.
*
* @return true on success, false otherwise
*/
ROBOTICSLAB_KINEMATICS_DYNAMICS_DEPRECATED virtual bool getNumLinks(int* numLinks)
{
CD_WARNING("getNumLinks deprecated: use getNumJoints instead.\n");
return getNumJoints(numLinks);
}

/**
* @brief Get number of joints for which the solver has been configured
*
Expand Down

0 comments on commit cdc0133

Please sign in to comment.