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
a434b747
Commit
a434b747
authored
Apr 17, 2019
by
JasonChmn
Browse files
Edit namespace, folder, file names from curve to curves
parent
5d290de4
Changes
27
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
a434b747
...
...
@@ -37,7 +37,7 @@ ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST
()
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
ADD_SUBDIRECTORY
(
include/curve
)
ADD_SUBDIRECTORY
(
include/curve
s
)
ADD_SUBDIRECTORY
(
tests
)
SETUP_HPP_PROJECT_FINALIZE
()
cmake
@
cea261e3
Compare
61e5574a
...
cea261e3
Subproject commit
61e5574a0615706aab06986f6aecf665ddc31141
Subproject commit
cea261e3da7d383844530070356bca76d20197a8
include/curve/CMakeLists.txt
→
include/curve
s
/CMakeLists.txt
View file @
a434b747
...
...
@@ -15,7 +15,7 @@ SET(${PROJECT_NAME}_HEADERS
INSTALL
(
FILES
${${
PROJECT_NAME
}
_HEADERS
}
DESTINATION include/curve
DESTINATION include/curve
s
)
ADD_SUBDIRECTORY
(
helpers
)
include/curve/MathDefs.h
→
include/curve
s
/MathDefs.h
View file @
a434b747
...
...
@@ -20,7 +20,7 @@
#include
<vector>
#include
<utility>
namespace
curve
{
namespace
curve
s
{
//REF: boulic et al An inverse kinematics architecture enforcing an arbitrary number of strict priority levels
template
<
typename
_Matrix_Type_
>
...
...
@@ -40,5 +40,5 @@ void PseudoInverse(_Matrix_Type_& pinvmat)
pinvmat
=
(
svd
.
matrixV
()
*
m_sigma_inv
*
svd
.
matrixU
().
transpose
());
}
}
// namespace curve
}
// namespace curve
s
#endif //_SPLINEMATH
include/curve/bernstein.h
→
include/curve
s
/bernstein.h
View file @
a434b747
...
...
@@ -18,7 +18,7 @@
#include
<vector>
#include
<stdexcept>
namespace
curve
namespace
curve
s
{
///
/// \brief Computes factorial of a number.
...
...
@@ -74,6 +74,6 @@ std::vector<Bern<Numeric> > makeBernstein(const unsigned int n)
res
.
push_back
(
Bern
<
Numeric
>
(
n
,
i
));
return
res
;
}
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_BERNSTEIN
include/curve/bezier_curve.h
→
include/curve
s
/bezier_curve.h
View file @
a434b747
...
...
@@ -21,7 +21,7 @@
#include
<iostream>
namespace
curve
namespace
curve
s
{
/// \class BezierCurve.
/// \brief Represents a Bezier curve of arbitrary dimension and order.
...
...
@@ -54,7 +54,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
,
mult_T_
(
1.
)
,
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
))
,
degree_
(
size_
-
1
)
,
bernstein_
(
curve
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
,
bernstein_
(
curve
s
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
assert
(
bernstein_
.
size
()
==
size_
);
In
it
(
PointsBegin
);
...
...
@@ -76,7 +76,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
,
mult_T_
(
1.
)
,
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
))
,
degree_
(
size_
-
1
)
,
bernstein_
(
curve
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
,
bernstein_
(
curve
s
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
assert
(
bernstein_
.
size
()
==
size_
);
In
it
(
PointsBegin
);
...
...
@@ -101,7 +101,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
,
mult_T_
(
mult_T
)
,
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
))
,
degree_
(
size_
-
1
)
,
bernstein_
(
curve
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
,
bernstein_
(
curve
s
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
assert
(
bernstein_
.
size
()
==
size_
);
In
it
(
PointsBegin
);
...
...
@@ -124,7 +124,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
,
mult_T_
(
1.
)
,
size_
(
std
::
distance
(
PointsBegin
,
PointsEnd
)
+
4
)
,
degree_
(
size_
-
1
)
,
bernstein_
(
curve
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
,
bernstein_
(
curve
s
::
makeBernstein
<
num_t
>
((
unsigned
int
)
degree_
))
{
if
(
Safe
&&
(
size_
<
1
||
T_
<=
0.
))
throw
std
::
out_of_range
(
"can't create bezier min bound is higher than max bound"
);
...
...
include/curve/bezier_polynom_conversion.h
→
include/curve
s
/bezier_polynom_conversion.h
View file @
a434b747
...
...
@@ -21,7 +21,7 @@
#include
<iostream>
namespace
curve
namespace
curve
s
{
/// \brief Provides methods for converting a curve from a bernstein representation
/// to a polynom representation.
...
...
@@ -64,6 +64,6 @@ Bezier from_polynom(const Polynom& polynom)
typedef Bezier::cit_point_t cit_point_t;
typedef Bezier::bezier_curve_t bezier_curve_t;
}*/
}
// namespace curve
}
// namespace curve
s
#endif //_BEZIER_POLY_CONVERSION
include/curve/cubic_spline.h
→
include/curve
s
/cubic_spline.h
View file @
a434b747
...
...
@@ -20,7 +20,7 @@
#include
<stdexcept>
namespace
curve
namespace
curve
s
{
/// \brief Creates coefficient vector of a cubic spline defined on the interval
/// \f$[t_{min}, t_{max}]\f$. It follows the equation :
...
...
@@ -41,6 +41,6 @@ polynom<Time,Numeric,Dim,Safe,Point,T_Point> create_cubic(Point const& a, Point
T_Point
coeffs
=
make_cubic_vector
<
Point
,
T_Point
>
(
a
,
b
,
c
,
d
);
return
polynom
<
Time
,
Numeric
,
Dim
,
Safe
,
Point
,
T_Point
>
(
coeffs
.
begin
(),
coeffs
.
end
(),
t_min
,
t_max
);
}
}
// namespace curve
}
// namespace curve
s
#endif //_STRUCT_CUBICSPLINE
include/curve/curve_abc.h
→
include/curve
s
/curve_abc.h
View file @
a434b747
...
...
@@ -16,7 +16,7 @@
#include
<functional>
namespace
curve
namespace
curve
s
{
/// \struct curve_abc
/// \brief Represents a curve of dimension Dim
...
...
@@ -63,6 +63,6 @@ struct curve_abc : std::unary_function<Time, Point>
/*Helpers*/
};
}
// namespace curve
}
// namespace curve
s
#endif //_STRUCT_CURVE_ABC
include/curve/curve_constraint.h
→
include/curve
s
/curve_constraint.h
View file @
a434b747
...
...
@@ -17,7 +17,7 @@
#include
<functional>
#include
<vector>
namespace
curve
namespace
curve
s
{
template
<
typename
Point
>
struct
curve_constraints
...
...
@@ -32,5 +32,5 @@ struct curve_constraints
point_t
end_vel
;
point_t
end_acc
;
};
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_CUBICZEROVELACC
include/curve/exact_cubic.h
→
include/curve
s
/exact_cubic.h
View file @
a434b747
...
...
@@ -29,7 +29,7 @@
#include
<functional>
#include
<vector>
namespace
curve
namespace
curve
s
{
/// \class ExactCubic.
/// \brief Represents a set of cubic splines defining a continuous function
...
...
@@ -201,6 +201,6 @@ struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point>
t_spline_t
subSplines_
;
// const
/*Attributes*/
};
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_EXACTCUBIC
include/curve/helpers/CMakeLists.txt
→
include/curve
s
/helpers/CMakeLists.txt
View file @
a434b747
...
...
@@ -5,5 +5,5 @@ SET(${PROJECT_NAME}_HELPERS_HEADERS
INSTALL
(
FILES
${${
PROJECT_NAME
}
_HELPERS_HEADERS
}
DESTINATION include/curve/helpers
DESTINATION include/curve
s
/helpers
)
include/curve/helpers/effector_spline.h
→
include/curve
s
/helpers/effector_spline.h
View file @
a434b747
...
...
@@ -20,9 +20,9 @@
#ifndef _CLASS_EFFECTORSPLINE
#define _CLASS_EFFECTORSPLINE
#include
"curve/spline_deriv_constraint.h"
#include
"curve
s
/spline_deriv_constraint.h"
namespace
curve
namespace
curve
s
{
namespace
helpers
{
...
...
@@ -118,5 +118,5 @@ exact_cubic_t* effector_spline(
return
new
exact_cubic_t
(
splines
);
}
}
// namespace helpers
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_EFFECTORSPLINE
include/curve/helpers/effector_spline_rotation.h
→
include/curve
s
/helpers/effector_spline_rotation.h
View file @
a434b747
...
...
@@ -20,11 +20,11 @@
#ifndef _CLASS_EFFECTOR_SPLINE_ROTATION
#define _CLASS_EFFECTOR_SPLINE_ROTATION
#include
"curve/helpers/effector_spline.h"
#include
"curve/curve_abc.h"
#include
"curve
s
/helpers/effector_spline.h"
#include
"curve
s
/curve_abc.h"
#include
<Eigen/Geometry>
namespace
curve
namespace
curve
s
{
namespace
helpers
{
...
...
@@ -252,5 +252,5 @@ class effector_spline_rotation
};
}
// namespace helpers
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_EFFECTOR_SPLINE_ROTATION
include/curve/linear_variable.h
→
include/curve
s
/linear_variable.h
View file @
a434b747
...
...
@@ -19,7 +19,7 @@
#include
<Eigen/Core>
#include
<stdexcept>
namespace
curve
namespace
curve
s
{
template
<
int
Dim
,
typename
Numeric
=
double
>
struct
linear_variable
{
...
...
@@ -196,6 +196,6 @@ variables<V> operator/(const variables<V>& w,const double k)
return
res
;
}
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_LINEAR_VARIABLE
include/curve/optimization/OptimizeSpline.h
→
include/curve
s
/optimization/OptimizeSpline.h
View file @
a434b747
...
...
@@ -12,15 +12,15 @@
#ifndef _CLASS_SPLINEOPTIMIZER
#define _CLASS_SPLINEOPTIMIZER
#include
"curve/MathDefs.h"
#include
"curve/exact_cubic.h"
#include
"curve
s
/MathDefs.h"
#include
"curve
s
/exact_cubic.h"
#include
"mosek/mosek.h"
#include
<Eigen/SparseCore>
#include
<utility>
namespace
curve
namespace
curve
s
{
/// \class SplineOptimizer
/// \brief Mosek connection to produce optimized splines
...
...
@@ -516,5 +516,5 @@ inline exact_cubic<Time, Numeric, Dim, Safe, Point>*
return
res
;
}
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_SPLINEOPTIMIZER
include/curve/polynom.h
→
include/curve
s
/polynom.h
View file @
a434b747
...
...
@@ -23,7 +23,7 @@
#include
<functional>
#include
<stdexcept>
namespace
curve
namespace
curve
s
{
/// \class polynom
/// \brief Represents a polynomf arbitrary order defined on the interval
...
...
@@ -199,6 +199,6 @@ struct polynom : public curve_abc<Time, Numeric, Dim, Safe, Point>
return
res
;
}
};
//class polynom
}
// namespace curve
}
// namespace curve
s
#endif //_STRUCT_POLYNOM
include/curve/quintic_spline.h
→
include/curve
s
/quintic_spline.h
View file @
a434b747
...
...
@@ -20,7 +20,7 @@
#include
<stdexcept>
namespace
curve
namespace
curve
s
{
/// \brief Creates coefficient vector of a quintic spline defined on the interval
/// \f$[t_{min}, t_{max}]\f$. It follows the equation :
...
...
@@ -44,6 +44,6 @@ polynom<Time,Numeric,Dim,Safe,Point,T_Point> create_quintic(Point const& a, Poin
T_Point
coeffs
=
make_quintic_vector
<
Point
,
T_Point
>
(
a
,
b
,
c
,
d
,
e
,
f
);
return
polynom
<
Time
,
Numeric
,
Dim
,
Safe
,
Point
,
T_Point
>
(
coeffs
.
begin
(),
coeffs
.
end
(),
t_min
,
t_max
);
}
}
// namespace curve
}
// namespace curve
s
#endif //_STRUCT_QUINTIC_SPLINE
include/curve/spline_deriv_constraint.h
→
include/curve
s
/spline_deriv_constraint.h
View file @
a434b747
...
...
@@ -28,7 +28,7 @@
#include
<functional>
#include
<vector>
namespace
curve
namespace
curve
s
{
/// \class spline_deriv_constraint.
/// \brief Represents a set of cubic splines defining a continuous function
...
...
@@ -137,6 +137,6 @@ struct spline_deriv_constraint : public exact_cubic<Time, Numeric, Dim, Safe, Po
private:
/* Constructors - destructors */
};
}
// namespace curve
}
// namespace curve
s
#endif //_CLASS_CUBICZEROVELACC
python/CMakeLists.txt
View file @
a434b747
SET
(
${
PY_NAME
}
_BINDINGS_SOURCES
curve_python.cpp
curve
s
_python.cpp
python_variables.cpp
python_variables.h
)
...
...
@@ -15,4 +15,4 @@ ENDIF(APPLE)
INSTALL
(
TARGETS
${
PY_NAME
}
DESTINATION
${
PYTHON_SITELIB
}
)
ADD_PYTHON_UNIT_TEST
(
"python-curve"
"python/test/test.py"
"python"
)
ADD_PYTHON_UNIT_TEST
(
"python-curve
s
"
"python/test/test.py"
"python"
)
Prev
1
2
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