-
Notifications
You must be signed in to change notification settings - Fork 38
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
Implement cubic spline class #344
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, I just spotted a few potential fixes in the documentation. I will try to exploit this class soon, thanks @GiulioRomualdi!
src/Planners/src/CubicSpline.cpp
Outdated
}; | ||
|
||
/** | ||
* Description of a 5-th polynomial. It contains the coefficients, the initial/final knots and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another 5-th order polynomial to be replaced with 3-rd
src/Planners/src/CubicSpline.cpp
Outdated
/** | ||
* @file CubicSpline.cpp | ||
* @authors Giulio Romualdi | ||
* @copyright 2020 Istituto Italiano di Tecnologia (IIT). This software may be modified and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another 2020 to be replaced here
CubicSpline::~CubicSpline() = default; | ||
|
||
bool CubicSpline::setInitialConditions(Eigen::Ref<const Eigen::VectorXd> velocity, | ||
Eigen::Ref<const Eigen::VectorXd> /**acceleration*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether the second parameter is left on purpose here. If so, how is it exploited?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acceleration
is not used however is required to keep the same interface between the two splines
} | ||
|
||
bool CubicSpline::setFinalConditions(Eigen::Ref<const Eigen::VectorXd> velocity, | ||
Eigen::Ref<const Eigen::VectorXd> /**acceleration*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
818cf38
to
b6cc6ef
Compare
This PR introduces the
Spline
class that is an abstract class.QuinticSpline
andCubicSpline
inherit fromSpline
.I finally modify the SwingFoot planner, so the user can choose between the two spline implementations.