Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/curvebase refactor #48

Merged
merged 35 commits into from
Jan 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
248ceb9
rename hermite to localsupport2
mikebosse Jan 8, 2015
144ab5c
removed unneccessary files
mikebosse Jan 9, 2015
9f5a427
got rid of coefficients from base classes
mikebosse Jan 9, 2015
1e54e73
initialize and update from gtsam values for linear interpolation curves
mikebosse Jan 9, 2015
034bd59
started to implement gtsam traits and solved multiple compilation errors
rdube Jan 10, 2015
4687e58
some refactoring progress
gawela Jan 12, 2015
eb60956
bug fixes in linear interp vector space implmentation
mikebosse Jan 12, 2015
7e124df
refactor & deletion of KeyCoefficientTime
gawela Jan 12, 2015
5dba2ae
Merge branch 'feature/curvebase_refactor' of github.com:ethz-asl/curv…
gawela Jan 12, 2015
38d319e
refactored LocalSupport2CoefficientManager unit test
rdube Jan 13, 2015
d3149d7
started to refactor MITb_dataset unit test
rdube Jan 13, 2015
10000d7
solved small bug in coefficient manager
rdube Jan 13, 2015
6804cb9
refactored lineatInterpolationVectorSpaceCurve & fixed LocalSupport2C…
gawela Jan 13, 2015
60b2264
refactored SE3 Sinus circle unit test
rdube Jan 14, 2015
71a72f3
added optional tolerance to hasCoefficientAtTime function
gawela Jan 14, 2015
f844c82
Merge branch 'feature/curvebase_refactor' of github.com:ethz-asl/curv…
gawela Jan 14, 2015
0eea6b5
optional return of allocated keys in curve extend
gawela Jan 14, 2015
97c4818
file belongs to last commit (update of curve extend function)
gawela Jan 14, 2015
2648ea7
renamed setCoefficientByKey(s) to updateCoefficientByKey(s) and fixed…
gawela Jan 14, 2015
0b1eb79
renamed KeyCoefficientTimeMap to TimeToKeyCoefficientMap
gawela Jan 14, 2015
5dca7a6
renamed getEvalExpression to getValueExpression and getEvalDerivative…
gawela Jan 14, 2015
2b9039d
moved implementation of GTSAM Values init and update functinos to man…
gawela Jan 14, 2015
1ff94bb
shifted comment to github issue
gawela Jan 15, 2015
055c5d5
refactoring done, builds but wrong solution
rdube Jan 15, 2015
a1c354d
merged in last modifs
rdube Jan 15, 2015
1383896
refactored most of test_Expressions_Slerp_SE3.cpp
rdube Jan 16, 2015
71d16ba
Merge branch 'feature/curvebase_refactor' into fix/test_MITb
rdube Jan 16, 2015
83fcd52
working MITb_dataset unit test resulting from a fix in minkindr rotat…
rdube Jan 16, 2015
27f672f
adressed print error
gawela Jan 20, 2015
ad41f47
abondoned 2nd getValueExpression function
gawela Jan 20, 2015
9cfa85c
cleaned for compiler warnings
gawela Jan 20, 2015
f8d51a0
cleanup of warning
gawela Jan 20, 2015
22f796c
removed obsolete functions which are hosted by minkindr now
gawela Jan 20, 2015
9e331c7
removed dead code
gawela Jan 20, 2015
8815c77
modified evaluate() function to use exposed implementations in minkin…
rdube Jan 21, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions curves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,8 @@ if(USE_GTSAM)
endif()

cs_add_library(${PROJECT_NAME}
src/CoefficientImplementation.cpp
src/VectorSpaceCoefficientImplementation.cpp
src/CurveBase.cpp
src/Coefficient.cpp
src/KeyGenerator.cpp
src/HermiteCoefficientManager.cpp
src/EvaluatorBase.cpp
src/Coefficients.cpp
src/SlerpSE3Curve.cpp
src/SE3CoefficientImplementation.cpp
src/SE3Curve.cpp
)

Expand All @@ -33,11 +25,10 @@ target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})

catkin_add_gtest(${PROJECT_NAME}_tests
test/test_main.cpp
test/test_HermiteCoefficientManager.cpp
test/test_Coefficient.cpp
test/test_LocalSupport2CoefficientManager.cpp
test/test_Expressions.cpp
#test/test_Expressions_Slerp_SE3.cpp
#test/test_SE3_Sinus_Circle.cpp
test/test_Expressions_Slerp_SE3.cpp
test/test_SE3_Sinus_Circle.cpp
test/test_MITb_dataset.cpp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test
)
Expand Down
106 changes: 0 additions & 106 deletions curves/include/curves/Coefficient.hpp

This file was deleted.

99 changes: 0 additions & 99 deletions curves/include/curves/CoefficientImplementation.hpp

This file was deleted.

31 changes: 0 additions & 31 deletions curves/include/curves/Coefficients.hpp

This file was deleted.

48 changes: 38 additions & 10 deletions curves/include/curves/Curve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#ifndef CURVES_CURVE_HPP
#define CURVES_CURVE_HPP

#include "CurveBase.hpp"
#include "Evaluator.hpp"

#include "gtsam/nonlinear/Expression.h"
#include <boost/cstdint.hpp>

namespace curves {

typedef boost::int64_t Time;
typedef size_t Key;

template<typename CurveConfig>
class Curve : public CurveBase
class Curve
{
public:

Expand All @@ -25,13 +26,26 @@ class Curve : public CurveBase
/// The curve's derivative type.
typedef typename CurveConfig::DerivativeType DerivativeType;

typedef Evaluator<CurveConfig> EvaluatorType;

typedef typename EvaluatorType::Ptr EvaluatorTypePtr;

Curve() { }
virtual ~Curve() { }

///\defgroup Info
///\name Methods to get information about the curve.
///@{

/// Print the value of the coefficient, for debugging and unit tests
virtual void print(const std::string& str = "") const = 0;

/// \brief The dimension of the underlying manifold
//size_t dim() const; // get this form the curve's value type

/// The first valid time of the curve.
virtual Time getMinTime() const = 0;

/// The one past the last valid time for the curve.
virtual Time getMaxTime() const = 0;
///@}

/// \name Methods to evaluate the curve
///@{

Expand All @@ -45,7 +59,10 @@ class Curve : public CurveBase
// virtual EvaluatorTypePtr getEvaluator(const Time& time) const = 0;

/// \brief Get a gtsam::Expression which evaluates the curve at this time.
virtual gtsam::Expression<ValueType> getEvalExpression(const Time& time) const = 0;
virtual gtsam::Expression<ValueType> getValueExpression(const Time& time) const = 0;

/// \brief Get a gtsam::Expression which evaluates the derivative of the curve at this time.
virtual gtsam::Expression<DerivativeType> getDerivativeExpression(const Time& time, unsigned derivativeOrder) const = 0;

///@}

Expand All @@ -56,7 +73,8 @@ class Curve : public CurveBase
/// Try to make the curve fit to the values.
/// Underneath the curve should have some default policy for fitting.
virtual void extend(const std::vector<Time>& times,
const std::vector<ValueType>& values) = 0;
const std::vector<ValueType>& values,
std::vector<Key>* outKeys) = 0;

/// \brief Fit a new curve to these data points.
///
Expand All @@ -67,6 +85,16 @@ class Curve : public CurveBase
std::vector<Key>* outKeys = NULL) = 0;

///@}

/// Initialize a GTSAM values structure with the desired keys
virtual void initializeGTSAMValues(gtsam::FastVector<gtsam::Key> keys, gtsam::Values* values) const = 0;

/// Initialize a GTSAM values structure for all keys
virtual void initializeGTSAMValues(gtsam::Values* values) const = 0;

// updates the relevant curve coefficients from the GTSAM values structure
virtual void updateFromGTSAMValues(const gtsam::Values& values) = 0;

};

} // namespace curves
Expand Down
Loading