Commit 11cfa45c authored by JasonChmn's avatar JasonChmn
Browse files

remove flag in CMAKE and put time initialization for piecewise curve in constructor

parent 97e6ad97
...@@ -6,10 +6,6 @@ INCLUDE(cmake/test.cmake) ...@@ -6,10 +6,6 @@ INCLUDE(cmake/test.cmake)
INCLUDE(cmake/python.cmake) INCLUDE(cmake/python.cmake)
INCLUDE(cmake/hpp.cmake) INCLUDE(cmake/hpp.cmake)
IF(UNIX OR APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -std=c++11")
ENDIF()
SET(PROJECT_ORG loco-3d) SET(PROJECT_ORG loco-3d)
SET(PROJECT_NAME curves) SET(PROJECT_NAME curves)
SET(PROJECT_DESCRIPTION SET(PROJECT_DESCRIPTION
......
...@@ -45,7 +45,8 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P ...@@ -45,7 +45,8 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P
{ {
size_ = 0; size_ = 0;
add_polynomial_curve(pol); add_polynomial_curve(pol);
//coefficients_storage = ppc_protobuf_t.piecewise_polynomial_curve_protobuf.New(); time_polynomial_curves_.push_back(pol.min());
T_min_ = pol.min();
} }
virtual ~piecewise_polynomial_curve(){} virtual ~piecewise_polynomial_curve(){}
...@@ -76,12 +77,6 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P ...@@ -76,12 +77,6 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P
void add_polynomial_curve(polynomial_t pol) void add_polynomial_curve(polynomial_t pol)
{ {
// Set the minimum time of curve
if (size_==0)
{
time_polynomial_curves_.push_back(pol.min());
T_min_ = pol.min();
}
// Check time continuity : Begin time of pol must be equal to T_max_ of actual piecewise curve. // Check time continuity : Begin time of pol must be equal to T_max_ of actual piecewise curve.
if (size_!=0 && pol.min()!=T_max_) if (size_!=0 && pol.min()!=T_max_)
{ {
...@@ -163,19 +158,6 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P ...@@ -163,19 +158,6 @@ struct piecewise_polynomial_curve : public curve_abc<Time, Numeric, Dim, Safe, P
return left_id-1; return left_id-1;
} }
/*
double set_coefficient_to_protobuf(Numeric value, Index id_curve_segment, Index row, Index col)
{
coefficients_storage.list_matrices(id_curve_segment).set_coefficients(col*coefficients_storage.cols()+row, value);
}
double get_coefficient_from_protobuf(Index id_curve_segment, Index row, Index col)
{
// To access the data in proto, use data[i*cols+j]
return coefficients_storage.list_matrices(id_curve_segment).coefficients(col*coefficients_storage.cols()+row);
}
*/
/*Helpers*/ /*Helpers*/
public: public:
/// \brief Get the minimum time for which the curve is defined /// \brief Get the minimum time for which the curve is defined
......
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