Unverified Commit 5fd4ed0f authored by Fernbach Pierre's avatar Fernbach Pierre Committed by GitHub
Browse files

Merge pull request #17 from wxmerkt/wxm-fix-warnings

Fix all compiler warnings
parents 9a96a4cf c1466e48
......@@ -23,8 +23,6 @@ Polynomial polynomial_from_curve(const curveTypeToConvert& curve) {
t_point_t coefficients;
curveTypeToConvert current(curve);
coefficients.push_back(curve(curve.min()));
num_t T = curve.max() - curve.min();
num_t T_div = 1.0;
num_t fact = 1;
for (std::size_t i = 1; i <= curve.degree_; ++i) {
fact *= (num_t)i;
......@@ -78,7 +76,6 @@ Hermite hermite_from_curve(const curveTypeToConvert& curve) {
curveTypeToConvert current(curve);
num_t T_min = current.min();
num_t T_max = current.max();
num_t T = T_max - T_min;
// Positions and derivatives
point_t p0 = current(T_min);
point_t p1 = current(T_max);
......
......@@ -30,7 +30,7 @@ struct Serializable {
public:
/// \brief Loads a Derived object from a text file.
template <class Derived>
void loadFromText(const std::string& filename) throw(std::invalid_argument) {
void loadFromText(const std::string& filename) {
std::ifstream ifs(filename.c_str());
if (ifs) {
boost::archive::text_iarchive ia(ifs);
......@@ -44,7 +44,7 @@ struct Serializable {
/// \brief Saved a Derived object as a text file.
template <class Derived>
void saveAsText(const std::string& filename) const throw(std::invalid_argument) {
void saveAsText(const std::string& filename) const {
std::ofstream ofs(filename.c_str());
if (ofs) {
boost::archive::text_oarchive oa(ofs);
......@@ -58,7 +58,7 @@ struct Serializable {
/// \brief Loads a Derived object from an XML file.
template <class Derived>
void loadFromXML(const std::string& filename, const std::string& tag_name) throw(std::invalid_argument) {
void loadFromXML(const std::string& filename, const std::string& tag_name) {
assert(!tag_name.empty());
std::ifstream ifs(filename.c_str());
if (ifs) {
......@@ -73,7 +73,7 @@ struct Serializable {
/// \brief Saved a Derived object as an XML file.
template <class Derived>
void saveAsXML(const std::string& filename, const std::string& tag_name) const throw(std::invalid_argument) {
void saveAsXML(const std::string& filename, const std::string& tag_name) const {
assert(!tag_name.empty());
std::ofstream ofs(filename.c_str());
if (ofs) {
......@@ -88,7 +88,7 @@ struct Serializable {
/// \brief Loads a Derived object from an binary file.
template <class Derived>
void loadFromBinary(const std::string& filename) throw(std::invalid_argument) {
void loadFromBinary(const std::string& filename) {
std::ifstream ifs(filename.c_str());
if (ifs) {
boost::archive::binary_iarchive ia(ifs);
......@@ -102,7 +102,7 @@ struct Serializable {
/// \brief Saved a Derived object as an binary file.
template <class Derived>
void saveAsBinary(const std::string& filename) const throw(std::invalid_argument) {
void saveAsBinary(const std::string& filename) const {
std::ofstream ofs(filename.c_str());
if (ofs) {
boost::archive::binary_oarchive oa(ofs);
......
......@@ -10,10 +10,11 @@ SET(${PY_NAME}_BINDINGS_SOURCES
ADD_LIBRARY(${PY_NAME} SHARED ${${PY_NAME}_BINDINGS_SOURCES})
SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")
TARGET_COMPILE_OPTIONS(${PY_NAME} PRIVATE "-Wno-conversion")
PKG_CONFIG_USE_DEPENDENCY(${PY_NAME} eigenpy)
TARGET_LINK_LIBRARIES(${PY_NAME} ${Boost_LIBRARIES})
MESSAGE(WARNING "Boost libraries are : ${Boost_LIBRARIES}")
# MESSAGE(WARNING "Boost libraries are : ${Boost_LIBRARIES}")
IF(APPLE)
# We need to change the extension for python bindings
......
......@@ -403,13 +403,13 @@ void addFinalTransform(piecewise_SE3_curve_t& self, const matrix4_t& end, const
BOOST_PYTHON_MODULE(curves) {
/** BEGIN eigenpy init**/
eigenpy::enableEigenPy();
eigenpy::enableEigenPySpecific<pointX_t, pointX_t>();
eigenpy::enableEigenPySpecific<pointX_list_t, pointX_list_t>();
eigenpy::enableEigenPySpecific<coeff_t, coeff_t>();
eigenpy::enableEigenPySpecific<point_list_t, point_list_t>();
eigenpy::enableEigenPySpecific<matrix3_t, matrix3_t>();
eigenpy::enableEigenPySpecific<matrix4_t, matrix4_t>();
// eigenpy::enableEigenPySpecific<quaternion_t,quaternion_t>();
ENABLE_SPECIFIC_MATRIX_TYPE(pointX_t);
ENABLE_SPECIFIC_MATRIX_TYPE(pointX_list_t);
ENABLE_SPECIFIC_MATRIX_TYPE(coeff_t);
ENABLE_SPECIFIC_MATRIX_TYPE(point_list_t);
ENABLE_SPECIFIC_MATRIX_TYPE(matrix3_t);
ENABLE_SPECIFIC_MATRIX_TYPE(matrix4_t);
// ENABLE_SPECIFIC_MATRIX_TYPE(quaternion_t);
eigenpy::exposeQuaternion();
/*eigenpy::exposeAngleAxis();
eigenpy::exposeQuaternion();*/
......@@ -551,30 +551,30 @@ BOOST_PYTHON_MODULE(curves) {
class_<polynomial_t, bases<curve_abc_t> >("polynomial", init<>())
.def("__init__",
make_constructor(&wrapPolynomialConstructor1, default_call_policies(), args("coeffs", "min", "max")),
"Create polynomial spline from an Eigen matrix of coefficient defined for t \in [min,max]."
"Create polynomial spline from an Eigen matrix of coefficient defined for t in [min,max]."
" The matrix should contain one coefficient per column, from the zero order coefficient,up to the highest "
"order."
" Spline order is given by the number of the columns -1.")
.def("__init__", make_constructor(&wrapPolynomialConstructor2, default_call_policies(), arg("coeffs")),
"Create polynomial spline from an Eigen matrix of coefficient defined for t \in [0,1]."
"Create polynomial spline from an Eigen matrix of coefficient defined for t in [0,1]."
" The matrix should contain one coefficient per column, from the zero order coefficient,up to the highest "
"order."
" Spline order is given by the number of the columns -1.")
.def("__init__",
make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree1, default_call_policies(),
args("init", "end", "min", "max")),
"Create a polynomial of degree 1 defined for t \in [min,max], "
"Create a polynomial of degree 1 defined for t in [min,max], "
"such that c(min) == init and c(max) == end.")
.def("__init__",
make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree3, default_call_policies(),
args("init", "d_init", "end", "d_end", "min", "max")),
"Create a polynomial of degree 3 defined for t \in [min,max], "
"Create a polynomial of degree 3 defined for t in [min,max], "
"such that c(min) == init and c(max) == end"
" dc(min) == d_init and dc(max) == d_end")
.def("__init__",
make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree5, default_call_policies(),
args("init", "d_init", "dd_init", "end", "d_end", "dd_end", "min", "max")),
"Create a polynomial of degree 5 defined for t \in [min,max], "
"Create a polynomial of degree 5 defined for t in [min,max], "
"such that c(min) == init and c(max) == end"
" dc(min) == d_init and dc(max) == d_end"
" ddc(min) == dd_init and ddc(max) == dd_end")
......@@ -848,12 +848,12 @@ class_<piecewise_SE3_curve_t, bases<curve_abc_t> >("piecewise_SE3_curve", init<>
.def("__init__",
make_constructor(&wrapSO3LinearConstructorFromMatrix, default_call_policies(),
args("init_rotation", "end_rotation", "min", "max")),
"Create a SO3 Linear curve between two rotations, defined for t \in [min,max]."
"Create a SO3 Linear curve between two rotations, defined for t in [min,max]."
" The input rotations are expressed as 3x3 matrix.")
.def("__init__",
make_constructor(&wrapSO3LinearConstructorFromQuaternion, default_call_policies(),
args("init_rotation", "end_rotation", "min", "max")),
"Create a SO3 Linear curve between two rotations, defined for t \in [min,max]."
"Create a SO3 Linear curve between two rotations, defined for t in [min,max]."
" The input rotations are expressed as Quaternions.")
.def("computeAsQuaternion", &SO3Linear_t::computeAsQuaternion,
"Output the quaternion of the rotation at the given time. This rotation is obtained by a Spherical Linear "
......@@ -878,13 +878,13 @@ class_<piecewise_SE3_curve_t, bases<curve_abc_t> >("piecewise_SE3_curve", init<>
.def("__init__",
make_constructor(&wrapSE3CurveFromTransform, default_call_policies(),
args("init_transform", "end_transform", "min", "max")),
"Create a SE3 curve between two transform, defined for t \in [min,max]."
"Create a SE3 curve between two transform, defined for t in [min,max]."
" Using linear interpolation for translation and slerp for rotation between init and end."
" The input transform are expressed as 4x4 matrix.")
.def("__init__",
make_constructor(&wrapSE3CurveFromPosAndRotation, default_call_policies(),
args("init_translation", "end_translation","init_rotation","end_rotation", "min", "max")),
"Create a SE3 curve between two transform, defined for t \in [min,max]."
"Create a SE3 curve between two transform, defined for t in [min,max]."
" Using linear interpolation for translation and slerp for rotation between init and end."
" The input translations are expressed as 3d vector and the rotations as 3x3 matrix.")
.def("__init__",
......@@ -936,7 +936,7 @@ class_<piecewise_SE3_curve_t, bases<curve_abc_t> >("piecewise_SE3_curve", init<>
.def("__init__",
make_constructor(&wrapSE3CurveFromSE3Pinocchio, default_call_policies(),
args("init_SE3", "end_SE3", "min", "max")),
"Create a SE3 curve between two SE3 objects from Pinocchio, defined for t \in [min,max]."
"Create a SE3 curve between two SE3 objects from Pinocchio, defined for t in [min,max]."
" Using linear interpolation for translation and slerp for rotation between init and end.")
.def("evaluateAsSE3", &se3ReturnPinocchio, "Evaluate the curve at the given time. Return as a pinocchio.SE3 object",
args("self", "t"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment