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

Implement cubic spline class #344

Merged
merged 8 commits into from
Jun 23, 2021
Merged

Implement cubic spline class #344

merged 8 commits into from
Jun 23, 2021

Conversation

GiulioRomualdi
Copy link
Member

This PR introduces the Spline class that is an abstract class. QuinticSpline and CubicSpline inherit from Spline.

I finally modify the SwingFoot planner, so the user can choose between the two spline implementations.

@GiulioRomualdi GiulioRomualdi added the enhancement New feature or request label Jun 21, 2021
@GiulioRomualdi GiulioRomualdi self-assigned this Jun 21, 2021
Copy link
Contributor

@paolo-viceconte paolo-viceconte left a 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!

};

/**
* Description of a 5-th polynomial. It contains the coefficients, the initial/final knots and
Copy link
Contributor

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

/**
* @file CubicSpline.cpp
* @authors Giulio Romualdi
* @copyright 2020 Istituto Italiano di Tecnologia (IIT). This software may be modified and
Copy link
Contributor

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*/)
Copy link
Contributor

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?

Copy link
Member Author

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*/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@GiulioRomualdi GiulioRomualdi merged commit 530c18b into master Jun 23, 2021
@GiulioRomualdi GiulioRomualdi deleted the feature/cubic_spline branch June 23, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants