Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
ndcurves
Commits
143b7d00
Commit
143b7d00
authored
Feb 26, 2021
by
Steve T
Browse files
renamed into curves ND
parent
991a37b3
Changes
56
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
143b7d00
...
...
@@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
# Project properties
SET
(
PROJECT_ORG loco-3d
)
SET
(
PROJECT_NAME curves
)
SET
(
PROJECT_NAME
ND
curves
)
SET
(
PROJECT_DESCRIPTION
"creatie and manipulate spline and bezier curves."
)
SET
(
PROJECT_URL
"https://github.com/
${
PROJECT_ORG
}
/
${
PROJECT_NAME
}
"
)
...
...
include/curves/MathDefs.h
→
include/
ND
curves/MathDefs.h
View file @
143b7d00
...
...
@@ -20,7 +20,7 @@
#include
<vector>
#include
<utility>
namespace
curves
{
namespace
ND
curves
{
/// \brief An inverse kinematics architecture enforcing an arbitrary number of strict priority levels (Reference : Boulic et Al. 2003)
template
<
typename
_Matrix_Type_
>
void
PseudoInverse
(
_Matrix_Type_
&
pinvmat
)
{
...
...
@@ -50,5 +50,5 @@ Matrix3 skew(const Point& x) {
static
const
double
MARGIN
(
0.001
);
}
// namespace curves
}
// namespace
ND
curves
#endif //_SPLINEMATH
include/curves/bernstein.h
→
include/
ND
curves/bernstein.h
View file @
143b7d00
...
...
@@ -17,7 +17,7 @@
#include
<vector>
#include
<stdexcept>
namespace
curves
{
namespace
ND
curves
{
/// \brief Computes a binomial coefficient .
/// \param n : an unsigned integer.
/// \param k : an unsigned integer.
...
...
@@ -54,8 +54,8 @@ struct Bern {
/// \param other : the other Bernstein polynomial to check.
/// \return true if the two Bernstein polynomials are approximately equals.
virtual
bool
operator
==
(
const
Bern
&
other
)
const
{
return
curves
::
isApprox
<
Numeric
>
(
m_minus_i
,
other
.
m_minus_i
)
&&
curves
::
isApprox
<
Numeric
>
(
i_
,
other
.
i_
)
&&
curves
::
isApprox
<
Numeric
>
(
bin_m_i_
,
other
.
bin_m_i_
);
return
ND
curves
::
isApprox
<
Numeric
>
(
m_minus_i
,
other
.
m_minus_i
)
&&
ND
curves
::
isApprox
<
Numeric
>
(
i_
,
other
.
i_
)
&&
ND
curves
::
isApprox
<
Numeric
>
(
bin_m_i_
,
other
.
bin_m_i_
);
}
/// \brief Check if actual Bernstein polynomial and other are different.
...
...
@@ -92,8 +92,8 @@ std::vector<Bern<Numeric> > makeBernstein(const unsigned int n) {
}
return
res
;
}
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
typename
Numeric
,
curves
::
Bern
<
Numeric
>
)
DEFINE_CLASS_TEMPLATE_VERSION
(
typename
Numeric
,
ND
curves
::
Bern
<
Numeric
>
)
#endif //_CLASS_BERNSTEIN
include/curves/bezier_curve.h
→
include/
ND
curves/bezier_curve.h
View file @
143b7d00
...
...
@@ -22,7 +22,7 @@
#include
<iostream>
namespace
curves
{
namespace
ND
curves
{
/// \class BezierCurve.
/// \brief Represents a Bezier curve of arbitrary dimension and order.
/// For degree lesser than 4, the evaluation is analitycal. Otherwise
...
...
@@ -68,7 +68,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
mult_T_
(
mult_T
),
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
)),
degree_
(
size_
-
1
),
bernstein_
(
curves
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
bernstein_
(
ND
curves
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
if
(
bernstein_
.
size
()
!=
size_
)
{
throw
std
::
invalid_argument
(
"Invalid size of polynomial"
);
...
...
@@ -103,7 +103,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
mult_T_
(
mult_T
),
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
)
+
4
),
degree_
(
size_
-
1
),
bernstein_
(
curves
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
bernstein_
(
ND
curves
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
if
(
Safe
&&
(
size_
<
1
||
T_max_
<=
T_min_
))
{
throw
std
::
invalid_argument
(
"can't create bezier min bound is higher than max bound"
);
...
...
@@ -156,9 +156,9 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
* @return true if the two curves are approximately equals
*/
bool
isApprox
(
const
bezier_curve_t
&
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
())
const
{
bool
equal
=
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
bool
equal
=
ND
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
ND
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
dim_
==
other
.
dim
()
&&
degree_
==
other
.
degree
()
&&
size_
==
other
.
size_
&&
curves
::
isApprox
<
Numeric
>
(
mult_T_
,
other
.
mult_T_
)
&&
bernstein_
==
other
.
bernstein_
;
ND
curves
::
isApprox
<
Numeric
>
(
mult_T_
,
other
.
mult_T_
)
&&
bernstein_
==
other
.
bernstein_
;
if
(
!
equal
)
return
false
;
for
(
size_t
i
=
0
;
i
<
size_
;
++
i
)
{
if
(
!
control_points_
.
at
(
i
).
isApprox
(
other
.
control_points_
.
at
(
i
),
prec
))
return
false
;
...
...
@@ -471,7 +471,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
n_ij
=
bin
(
n
,
i
-
j
);
mn_i
=
bin
(
m
+
n
,
i
);
num_t
mul
=
num_t
(
mj
*
n_ij
)
/
num_t
(
mn_i
);
current_point
+=
mul
*
curves
::
cross
(
waypointAtIndex
(
j
),
g
.
waypointAtIndex
(
i
-
j
));
current_point
+=
mul
*
ND
curves
::
cross
(
waypointAtIndex
(
j
),
g
.
waypointAtIndex
(
i
-
j
));
}
new_waypoints
.
push_back
(
current_point
);
}
...
...
@@ -492,7 +492,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point> {
throw
std
::
invalid_argument
(
"Can't perform cross product on Bezier curves with dimensions != 3 "
);
t_point_t
new_waypoints
;
for
(
typename
t_point_t
::
const_iterator
cit
=
waypoints
().
begin
();
cit
!=
waypoints
().
end
();
++
cit
){
new_waypoints
.
push_back
(
curves
::
cross
(
*
cit
,
point
));
new_waypoints
.
push_back
(
ND
curves
::
cross
(
*
cit
,
point
));
}
return
bezier_curve_t
(
new_waypoints
.
begin
(),
new_waypoints
.
end
(),
min
(),
max
(),
mult_T_
);
}
...
...
@@ -728,9 +728,9 @@ bezier_curve<T,N,S,P> operator*(const double k, const bezier_curve<T,N,S,P>& p1)
return
res
*=
k
;
}
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
),
SINGLE_ARG
(
curves
::
bezier_curve
<
Time
,
Numeric
,
Safe
,
Point
>
))
SINGLE_ARG
(
ND
curves
::
bezier_curve
<
Time
,
Numeric
,
Safe
,
Point
>
))
#endif //_CLASS_BEZIERCURVE
include/curves/constant_curve.h
→
include/
ND
curves/constant_curve.h
View file @
143b7d00
...
...
@@ -11,7 +11,7 @@
#include
"curve_abc.h"
namespace
curves
{
namespace
ND
curves
{
/// \class constant_curve.
/// \brief Represents a constant_curve curve, always returning the same value and a null derivative
///
...
...
@@ -115,7 +115,7 @@ struct constant_curve : public curve_abc<Time, Numeric, Safe, Point, Point_deriv
*/
virtual
bool
isApprox
(
const
constant_curve_t
&
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
())
const
{
return
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
return
ND
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
ND
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
dim_
==
other
.
dim
()
&&
value_
.
isApprox
(
other
.
value_
,
prec
);
}
...
...
@@ -169,9 +169,9 @@ struct constant_curve : public curve_abc<Time, Numeric, Safe, Point, Point_deriv
}
};
// struct constant_curve
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
,
typename
Point_derivate
),
SINGLE_ARG
(
curves
::
constant_curve
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
>
))
SINGLE_ARG
(
ND
curves
::
constant_curve
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
>
))
#endif // _CLASS_CONSTANTCURVE
include/curves/cross_implementation.h
→
include/
ND
curves/cross_implementation.h
View file @
143b7d00
...
...
@@ -8,9 +8,9 @@
#ifndef _CLASS_CROSSIMP
#define _CLASS_CROSSIMP
#include
"curves/fwd.h"
#include
"
ND
curves/fwd.h"
namespace
curves
{
namespace
ND
curves
{
inline
Eigen
::
Vector3d
cross
(
const
Eigen
::
VectorXd
&
a
,
const
Eigen
::
VectorXd
&
b
){
Eigen
::
Vector3d
c
;
...
...
@@ -32,5 +32,5 @@ template<typename N, bool S>
linear_variable
<
N
,
S
>
cross
(
const
linear_variable
<
N
,
S
>&
a
,
const
linear_variable
<
N
,
S
>&
b
){
return
a
.
cross
(
b
);
}
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_CROSSIMP
include/curves/cubic_hermite_spline.h
→
include/
ND
curves/cubic_hermite_spline.h
View file @
143b7d00
...
...
@@ -21,7 +21,7 @@
#include
<boost/serialization/utility.hpp>
// To serialize std::pair
namespace
curves
{
namespace
ND
curves
{
/// \class CubicHermiteSpline.
/// \brief Represents a set of cubic hermite splines defining a continuous function \f$p(t)\f$.
/// A hermite cubic spline is a minimal degree polynom interpolating a function in two
...
...
@@ -118,7 +118,7 @@ struct cubic_hermite_spline : public curve_abc<Time, Numeric, Safe, Point> {
*/
bool
isApprox
(
const
cubic_hermite_spline_t
&
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
())
const
{
bool
equal
=
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
bool
equal
=
ND
curves
::
isApprox
<
num_t
>
(
T_min_
,
other
.
min
())
&&
ND
curves
::
isApprox
<
num_t
>
(
T_max_
,
other
.
max
())
&&
dim_
==
other
.
dim
()
&&
degree_
==
other
.
degree
()
&&
size_
==
other
.
size
()
&&
time_control_points_
==
other
.
time_control_points_
&&
duration_splines_
==
other
.
duration_splines_
;
if
(
!
equal
)
return
false
;
...
...
@@ -366,8 +366,8 @@ struct cubic_hermite_spline : public curve_abc<Time, Numeric, Safe, Point> {
ar
&
boost
::
serialization
::
make_nvp
(
"degree"
,
degree_
);
}
};
// End struct Cubic hermite spline
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
),
SINGLE_ARG
(
curves
::
cubic_hermite_spline
<
Time
,
Numeric
,
Safe
,
Point
>
))
SINGLE_ARG
(
ND
curves
::
cubic_hermite_spline
<
Time
,
Numeric
,
Safe
,
Point
>
))
#endif //_CLASS_CUBICHERMITESPLINE
include/curves/curve_abc.h
→
include/
ND
curves/curve_abc.h
View file @
143b7d00
...
...
@@ -19,7 +19,7 @@
#include
<boost/smart_ptr/shared_ptr.hpp>
#include
<functional>
namespace
curves
{
namespace
ND
curves
{
template
<
typename
T
>
bool
isApprox
(
const
T
a
,
const
T
b
,
const
T
eps
=
1e-6
)
{
...
...
@@ -76,7 +76,7 @@ struct curve_abc : std::unary_function<Time, Point>, public serialization::Seria
*/
bool
isEquivalent
(
const
curve_t
*
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
(),
const
size_t
order
=
5
)
const
{
bool
equal
=
curves
::
isApprox
<
num_t
>
(
min
(),
other
->
min
())
&&
curves
::
isApprox
<
num_t
>
(
max
(),
other
->
max
())
&&
bool
equal
=
ND
curves
::
isApprox
<
num_t
>
(
min
(),
other
->
min
())
&&
ND
curves
::
isApprox
<
num_t
>
(
max
(),
other
->
max
())
&&
(
dim
()
==
other
->
dim
());
if
(
!
equal
)
{
return
false
;
...
...
@@ -144,8 +144,8 @@ struct curve_abc : std::unary_function<Time, Point>, public serialization::Seria
}
};
BOOST_SERIALIZATION_ASSUME_ABSTRACT
(
curve_abc
)
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
,
typename
Point_derivate
),
SINGLE_ARG
(
curves
::
curve_abc
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
>
))
SINGLE_ARG
(
ND
curves
::
curve_abc
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
>
))
#endif //_STRUCT_CURVE_ABC
include/curves/curve_constraint.h
→
include/
ND
curves/curve_constraint.h
View file @
143b7d00
...
...
@@ -17,7 +17,7 @@
#include
<functional>
#include
<vector>
namespace
curves
{
namespace
ND
curves
{
template
<
typename
Point
>
struct
curve_constraints
:
serialization
::
Serializable
{
typedef
Point
point_t
;
...
...
@@ -83,5 +83,5 @@ struct curve_constraints : serialization::Serializable {
ar
&
boost
::
serialization
::
make_nvp
(
"dim"
,
dim_
);
}
};
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_CUBICZEROVELACC
include/curves/curve_conversion.h
→
include/
ND
curves/curve_conversion.h
View file @
143b7d00
...
...
@@ -12,7 +12,7 @@
#include
<iostream>
namespace
curves
{
namespace
ND
curves
{
/// \brief Converts a cubic hermite spline or a bezier curve to a polynomial.
/// \param curve : the bezier curve/cubic hermite spline defined between [Tmin,Tmax] to convert.
/// \return the equivalent polynomial.
...
...
@@ -94,5 +94,5 @@ Hermite hermite_from_curve(const typename Hermite::curve_abc_t& curve) {
time_control_points
.
push_back
(
T_max
);
return
Hermite
(
control_points
.
begin
(),
control_points
.
end
(),
time_control_points
);
}
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_CURVE_CONVERSION
include/curves/exact_cubic.h
→
include/
ND
curves/exact_cubic.h
View file @
143b7d00
...
...
@@ -29,7 +29,7 @@
#include
<functional>
#include
<vector>
namespace
curves
{
namespace
ND
curves
{
/// \class ExactCubic.
/// \brief Represents a set of cubic splines defining a continuous function
/// crossing each of the waypoint given in its initialization.
...
...
@@ -308,9 +308,9 @@ struct exact_cubic : public piecewise_curve<Time, Numeric, Safe, Point> {
ar
&
BOOST_SERIALIZATION_BASE_OBJECT_NVP
(
piecewise_curve_t
);
}
};
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
,
typename
T_Point
,
typename
SplineBase
),
SINGLE_ARG
(
curves
::
exact_cubic
<
Time
,
Numeric
,
Safe
,
Point
,
T_Point
,
SplineBase
>
))
SINGLE_ARG
(
ND
curves
::
exact_cubic
<
Time
,
Numeric
,
Safe
,
Point
,
T_Point
,
SplineBase
>
))
#endif //_CLASS_EXACTCUBIC
include/curves/fwd.h
→
include/
ND
curves/fwd.h
View file @
143b7d00
...
...
@@ -13,7 +13,7 @@
#include
<vector>
#include
<boost/smart_ptr/shared_ptr.hpp>
namespace
curves
{
namespace
ND
curves
{
template
<
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
,
typename
Point_derivate
>
struct
curve_abc
;
...
...
@@ -107,6 +107,6 @@ typedef SO3Linear<double, double, true> SO3Linear_t;
typedef
SE3Curve
<
double
,
double
,
true
>
SE3Curve_t
;
typedef
piecewise_curve
<
double
,
double
,
true
,
transform_t
,
point6_t
,
curve_SE3_t
>
piecewise_SE3_t
;
}
// namespace curves
}
// namespace
ND
curves
#endif // CURVES_FWD_H
include/curves/helpers/effector_spline.h
→
include/
ND
curves/helpers/effector_spline.h
View file @
143b7d00
...
...
@@ -19,9 +19,9 @@
#ifndef _CLASS_EFFECTORSPLINE
#define _CLASS_EFFECTORSPLINE
#include
"curves/exact_cubic.h"
#include
"
ND
curves/exact_cubic.h"
namespace
curves
{
namespace
ND
curves
{
namespace
helpers
{
typedef
double
Numeric
;
typedef
double
Time
;
...
...
@@ -111,5 +111,5 @@ exact_cubic_t* effector_spline(In wayPointsBegin, In wayPointsEnd, const Point&
return
new
exact_cubic_t
(
splines
);
}
}
// namespace helpers
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_EFFECTORSPLINE
include/curves/helpers/effector_spline_rotation.h
→
include/
ND
curves/helpers/effector_spline_rotation.h
View file @
143b7d00
...
...
@@ -19,11 +19,11 @@
#ifndef _CLASS_EFFECTOR_SPLINE_ROTATION
#define _CLASS_EFFECTOR_SPLINE_ROTATION
#include
"curves/helpers/effector_spline.h"
#include
"curves/curve_abc.h"
#include
"
ND
curves/helpers/effector_spline.h"
#include
"
ND
curves/curve_abc.h"
#include
<Eigen/Geometry>
namespace
curves
{
namespace
ND
curves
{
namespace
helpers
{
typedef
Eigen
::
Matrix
<
Numeric
,
4
,
1
>
quat_t
;
typedef
Eigen
::
Ref
<
quat_t
>
quat_ref_t
;
...
...
@@ -82,7 +82,7 @@ class rotation_spline : public curve_abc_quat_t {
*/
bool
isApprox
(
const
rotation_spline
&
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
())
const
{
return
curves
::
isApprox
<
Numeric
>
(
min_
,
other
.
min_
)
&&
curves
::
isApprox
<
Numeric
>
(
max_
,
other
.
max_
)
&&
return
ND
curves
::
isApprox
<
Numeric
>
(
min_
,
other
.
min_
)
&&
ND
curves
::
isApprox
<
Numeric
>
(
max_
,
other
.
max_
)
&&
dim_
==
other
.
dim_
&&
quat_from_
.
isApprox
(
other
.
quat_from_
,
prec
)
&&
quat_to_
.
isApprox
(
other
.
quat_to_
,
prec
)
&&
time_reparam_
.
isApprox
(
other
.
time_reparam_
,
prec
);
}
...
...
@@ -288,5 +288,5 @@ class effector_spline_rotation {
};
// End class effector_spline_rotation
}
// namespace helpers
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_EFFECTOR_SPLINE_ROTATION
include/curves/linear_variable.h
→
include/
ND
curves/linear_variable.h
View file @
143b7d00
...
...
@@ -21,7 +21,7 @@
#include
<Eigen/Core>
#include
<stdexcept>
namespace
curves
{
namespace
ND
curves
{
template
<
typename
Numeric
=
double
,
bool
Safe
=
true
>
struct
linear_variable
:
public
serialization
::
Serializable
{
typedef
Eigen
::
Matrix
<
Numeric
,
Eigen
::
Dynamic
,
1
>
vector_x_t
;
...
...
@@ -116,7 +116,7 @@ struct linear_variable : public serialization::Serializable {
// (B1 x + c1) X (B2 x + c2) = (-c2X B1) x + (bX B2) x + b1Xb2
typename
linear_variable_t
::
matrix_3_t
newB
=
skew
<
typename
linear_variable_t
::
matrix_3_t
,
typename
linear_variable_t
::
vector_3_t
>
(
-
other
.
c
())
*
B
()
+
skew
<
typename
linear_variable_t
::
matrix_3_t
,
typename
linear_variable_t
::
vector_3_t
>
(
c
())
*
other
.
B
();
typename
linear_variable_t
::
vector_3_t
newC
=
curves
::
cross
(
c
(),
other
.
c
());
typename
linear_variable_t
::
vector_3_t
newC
=
ND
curves
::
cross
(
c
(),
other
.
c
());
return
linear_variable_t
(
newB
,
newC
);
}
...
...
@@ -226,8 +226,8 @@ std::ostream &operator<<(std::ostream &os, const linear_variable<N, S>& l) {
return
os
<<
"linear_variable:
\n
\t
B:
\n
"
<<
l
.
B
()
<<
"
\t
c:
\n
"
<<
l
.
c
().
transpose
();
}
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Numeric
,
bool
Safe
),
SINGLE_ARG
(
curves
::
linear_variable
<
Numeric
,
Safe
>
))
SINGLE_ARG
(
ND
curves
::
linear_variable
<
Numeric
,
Safe
>
))
#endif //_CLASS_LINEAR_VARIABLE
include/curves/optimization/definitions.h
→
include/
ND
curves/optimization/definitions.h
View file @
143b7d00
...
...
@@ -9,12 +9,12 @@
#ifndef _CLASS_DEFINITIONS_H
#define _CLASS_DEFINITIONS_H
#include
<curves/bezier_curve.h>
#include
<curves/linear_variable.h>
#include
<curves/quadratic_variable.h>
#include
<curves/curve_constraint.h>
#include
<
ND
curves/bezier_curve.h>
#include
<
ND
curves/linear_variable.h>
#include
<
ND
curves/quadratic_variable.h>
#include
<
ND
curves/curve_constraint.h>
namespace
curves
{
namespace
ND
curves
{
namespace
optimization
{
enum
constraint_flag
{
...
...
@@ -81,5 +81,5 @@ struct problem_definition : public curve_constraints<Point> {
};
}
// namespace optimization
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_DEFINITIONS_H
include/curves/optimization/details.h
→
include/
ND
curves/optimization/details.h
View file @
143b7d00
...
...
@@ -9,13 +9,13 @@
#ifndef _CLASS_LINEAR_PROBLEM_DETAILS
#define _CLASS_LINEAR_PROBLEM_DETAILS
#include
<curves/bezier_curve.h>
#include
<curves/linear_variable.h>
#include
<curves/curve_constraint.h>
#include
<curves/optimization/definitions.h>
#include
<curves/bernstein.h>
#include
<
ND
curves/bezier_curve.h>
#include
<
ND
curves/linear_variable.h>
#include
<
ND
curves/curve_constraint.h>
#include
<
ND
curves/optimization/definitions.h>
#include
<
ND
curves/bernstein.h>
namespace
curves
{
namespace
ND
curves
{
namespace
optimization
{
template
<
typename
Point
,
typename
Numeric
,
bool
Safe
=
true
>
struct
problem_data
{
...
...
@@ -338,5 +338,5 @@ inline constraint_flag& operator^=(constraint_flag& a, constraint_flag b) {
}
}
// namespace optimization
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_LINEAR_PROBLEM_DETAILS
include/curves/optimization/integral_cost.h
→
include/
ND
curves/optimization/integral_cost.h
View file @
143b7d00
...
...
@@ -9,12 +9,12 @@
#ifndef _CLASS_QUADRATIC_COST
#define _CLASS_QUADRATIC_COST
#include
"curves/optimization/definitions.h"
#include
"curves/optimization/details.h"
#include
"
ND
curves/optimization/definitions.h"
#include
"
ND
curves/optimization/details.h"
#include
<Eigen/Core>
namespace
curves
{
namespace
ND
curves
{
namespace
optimization
{
enum
integral_cost_flag
{
...
...
@@ -47,5 +47,5 @@ quadratic_variable<Numeric> compute_integral_cost(const problem_data<Point, Nume
}
}
// namespace optimization
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_QUADRATIC_COST
include/curves/optimization/quadratic_problem.h
→
include/
ND
curves/optimization/quadratic_problem.h
View file @
143b7d00
...
...
@@ -9,13 +9,13 @@
#ifndef _CLASS_LINEAR_PROBLEM
#define _CLASS_LINEAR_PROBLEM
#include
"curves/optimization/definitions.h"
#include
"curves/optimization/details.h"
#include
"curves/optimization/integral_cost.h"
#include
"
ND
curves/optimization/definitions.h"
#include
"
ND
curves/optimization/details.h"
#include
"
ND
curves/optimization/integral_cost.h"
#include
<Eigen/Core>
namespace
curves
{
namespace
ND
curves
{
namespace
optimization
{
template
<
typename
Point
,
typename
Numeric
,
bool
Safe
>
...
...
@@ -38,5 +38,5 @@ quadratic_problem<Point, Numeric> generate_problem(const problem_definition<Poin
return
prob
;
}
}
// namespace optimization
}
// namespace curves
}
// namespace
ND
curves
#endif //_CLASS_LINEAR_PROBLEM
include/curves/piecewise_curve.h
→
include/
ND
curves/piecewise_curve.h
View file @
143b7d00
...
...
@@ -15,7 +15,7 @@
#include
<fstream>
#include
<sstream>
namespace
curves
{
namespace
ND
curves
{
/// \class PiecewiseCurve.
/// \brief Represent a piecewise curve. We can add some new curve,
/// but the starting time of the curve to add should be equal to the ending time of the actual
...
...
@@ -601,10 +601,10 @@ struct piecewise_curve : public curve_abc<Time, Numeric, Safe, Point, Point_deri
ar
&
boost
::
serialization
::
make_nvp
(
"T_max"
,
T_max_
);
}
};
// End struct piecewise curve
}
// namespace curves
}
// namespace
ND
curves
DEFINE_CLASS_TEMPLATE_VERSION
(
SINGLE_ARG
(
typename
Time
,
typename
Numeric
,
bool
Safe
,
typename
Point
,
typename
Point_derivate
,
typename
CurveType
),
SINGLE_ARG
(
curves
::
piecewise_curve
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
,
CurveType
>
))
SINGLE_ARG
(
ND
curves
::
piecewise_curve
<
Time
,
Numeric
,
Safe
,
Point
,
Point_derivate
,
CurveType
>
))
#endif // _CLASS_PIECEWISE_CURVE
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment