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

Update ParabolicSmoother/ParabolicTimer to support Splines #324

Merged
merged 11 commits into from
Feb 8, 2018

Conversation

sniyaz
Copy link

@sniyaz sniyaz commented Feb 6, 2018

Magi requires that we have post processors support both Interpolated and Spline trajectories. This is a small PR that makes the parabolic post processor classes support the new methods added in #302.

@codecov
Copy link

codecov bot commented Feb 6, 2018

Codecov Report

Merging #324 into master will increase coverage by 0.03%.
The diff coverage is 61.11%.

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   81.04%   81.08%   +0.03%     
==========================================
  Files         204      205       +1     
  Lines        6005     6010       +5     
==========================================
+ Hits         4867     4873       +6     
+ Misses       1138     1137       -1
Impacted Files Coverage Δ
...ude/aikido/planner/parabolic/ParabolicSmoother.hpp 100% <ø> (ø) ⬆️
include/aikido/planner/TrajectoryPostProcessor.hpp 100% <ø> (ø) ⬆️
...nclude/aikido/planner/parabolic/ParabolicTimer.hpp 100% <ø> (ø)
src/planner/parabolic/ParabolicTimer.cpp 84.41% <100%> (+7.79%) ⬆️
src/planner/parabolic/ParabolicSmoother.cpp 86% <53.33%> (-7.48%) ⬇️
src/common/RNG.cpp 86.66% <0%> (-13.34%) ⬇️
src/planner/ompl/CRRT.cpp 76.16% <0%> (+0.58%) ⬆️

/// \param _inputTraj The untimed *spline* trajectory for the arm to process.
/// \param _rng Random number generator.
virtual std::unique_ptr<aikido::trajectory::Spline> postprocess(
const std::unique_ptr<trajectory::Spline>& _inputTraj,
Copy link
Member

Choose a reason for hiding this comment

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

I don't believe postprocess wants to take the ownership of trajectories. Could we change this to just const reference type as well as the above Interpolated version? If this introduces too much work and out of this PR's scope, we could do this as a separate PR.

Copy link
Author

Choose a reason for hiding this comment

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

Sure! These classes are pretty new, so changing the API shouldn’t break things too much.

const std::unique_ptr<trajectory::Spline>& _inputTraj,
const aikido::common::RNG* _rng)
{
if (!_rng)
Copy link
Member

Choose a reason for hiding this comment

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

Could we change the type of _rng to const reference if we throw an exception for nullptr anyway?

@sniyaz
Copy link
Author

sniyaz commented Feb 6, 2018

@jslee02, responded to your code review comments! 😄

@jslee02
Copy link
Member

jslee02 commented Feb 7, 2018

@sniyaz Thanks for the change!

It would be great to have tests for this new functions. 😈

@sniyaz
Copy link
Author

sniyaz commented Feb 8, 2018

@jslee02 I've added new tests for ParabolicTimer that also test Spline trajectories.

Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

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

@sniyaz Thanks for adding the tests! Looks good to go! 👍

@sniyaz sniyaz merged commit b712133 into master Feb 8, 2018
@sniyaz sniyaz deleted the sniyaz/spline_postprocessor branch February 8, 2018 06:07
jslee02 added a commit that referenced this pull request Feb 8, 2018
brianhou pushed a commit that referenced this pull request Feb 8, 2018
gilwoolee pushed a commit that referenced this pull request Jan 21, 2019
Magi requires that we have post processors support both Interpolated and Spline trajectories. This is a small PR that makes the parabolic post processor classes support the new methods added in #302.
gilwoolee pushed a commit that referenced this pull request Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants