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

Refactor Parabolic timer and add Parabolic smoother #206

Merged
merged 43 commits into from
May 14, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bb6a6f7
add parabolic smoother and refactor parabolic timer
dqyi11 May 1, 2017
c0685e8
fix travis build errors
May 1, 2017
c960c10
correct path conversion and test cases in timing
May 1, 2017
57c221f
refactor ownership
May 1, 2017
903b12e
fix bugs and add test cases
May 2, 2017
a33a50e
fix building errors
dqyi11 May 2, 2017
a5bbcf7
address Mike's comments
May 2, 2017
5eae8bd
address Mike's comments
May 3, 2017
1ed7efb
address Mike's comment
May 3, 2017
47fb916
Merge branch 'master' into feature/ParabolicSmootherHelper
May 3, 2017
82beb43
address Mike's comments
May 4, 2017
3f97e2c
increase the timelimit for success rate
May 4, 2017
5a6b908
remove dead comment
dqyi11 May 4, 2017
d61c63e
code formatting
May 4, 2017
65606f9
address JS's comments
May 4, 2017
9501e4e
Merge branch 'master' into feature/ParabolicSmootherHelper
jslee02 May 4, 2017
974d459
add parabolic smoother and refactor parabolic timer
dqyi11 May 1, 2017
e1ac97f
fix travis build errors
May 1, 2017
52a35a6
correct path conversion and test cases in timing
May 1, 2017
d6791e9
refactor ownership
May 1, 2017
2965a42
fix bugs and add test cases
May 2, 2017
3420e25
fix building errors
dqyi11 May 2, 2017
443d2ab
address Mike's comments
May 2, 2017
e1e593f
address Mike's comments
May 3, 2017
14b571a
address Mike's comment
May 3, 2017
b28720a
Use custom CMake modules for interactive_markers and tf (#198)
jslee02 May 3, 2017
37ee669
address Mike's comments
May 4, 2017
188687e
increase the timelimit for success rate
May 4, 2017
856e540
remove dead comment
dqyi11 May 4, 2017
1461f56
Code format: perception (#168)
jslee02 May 4, 2017
b55ea3b
Code format: statespace (#170)
jslee02 May 4, 2017
1729626
code formatting
May 4, 2017
28d3d19
Code format: rviz (#171)
jslee02 May 4, 2017
ecf22fc
address JS's comments
May 4, 2017
4c2d515
Code format: control (#191)
jslee02 May 4, 2017
b18e2ea
Merge branch 'feature/ParabolicSmootherHelper' of https://github.com/…
May 9, 2017
507df85
format
May 9, 2017
2e71c30
clean code
May 9, 2017
bed163d
Merge branch 'master' into feature/ParabolicSmootherHelper
jslee02 May 11, 2017
be0e014
address Mike's comments
May 12, 2017
806117a
merge
May 12, 2017
2ca1bf1
Merge branch 'master' into feature/ParabolicSmootherHelper
May 12, 2017
36ca91d
merge from master and format
May 12, 2017
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
22 changes: 10 additions & 12 deletions include/aikido/planner/parabolic/ParabolicSmoother.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#define AIKIDO_PLANNER_PARABOLIC_PARABOLICSMOOTHER_HPP_

#include <Eigen/Dense>
#include "aikido/constraint/Testable.hpp"
#include "aikido/trajectory/Interpolated.hpp"
#include "aikido/trajectory/Spline.hpp"
#include "aikido/constraint/Testable.hpp"

namespace aikido {
namespace planner {
namespace parabolic {

constexpr double DEFAULT_TIMELIMT = 3.0;
constexpr double DEFAULT_TIMELIMT = 3.0;
constexpr double DEFAULT_BLEND_RADIUS = 0.5;
constexpr int DEFAULT_BLEND_ITERATIONS = 4;
constexpr double DEFAULT_CHECK_RESOLUTION = 1e-4;
Expand Down Expand Up @@ -38,8 +38,8 @@ constexpr double DEFAULT_TOLERANCE = 1e-3;
/// \param _timelimit The maximum time to allow for doing shortcut
/// \param _checkResolution the resolution in discretizing a segment in
/// checking the feasibility of the segment
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// from the parabolic ramp along any axis, and then checks for
/// configuration and segment feasibility along that piecewise linear path.
/// \_rngSeed seed used by a random generator for sampling time in shortcut.
Expand All @@ -52,8 +52,7 @@ std::unique_ptr<trajectory::Spline> doShortcut(
aikido::util::RNG& _rngSeed,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This is the RNG, not a seed for the RNG. 😉

double _timelimit = DEFAULT_TIMELIMT,
double _checkResolution = DEFAULT_CHECK_RESOLUTION,
double _tolerance = DEFAULT_TOLERANCE
);
double _tolerance = DEFAULT_TOLERANCE);

/// Blend around waypoints in a trajectory using parabolic splines.
///
Expand Down Expand Up @@ -81,8 +80,8 @@ std::unique_ptr<trajectory::Spline> doShortcut(
/// \param _blendIterations the maximum iteration number in doing blend
/// \param _checkResolution the resolution in discretizing a segment in
/// checking the feasibility of the segment
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// from the parabolic ramp along any axis, and then checks for
/// configuration and segment feasibility along that piecewise linear path.
/// \return smoothed trajectory that satisfies acceleration constraints
Expand Down Expand Up @@ -113,8 +112,8 @@ std::unique_ptr<trajectory::Spline> doBlend(
/// \param _blendIterations the maximum iteration number in doing blend
/// \param _checkResolution the resolution in discretizing a segment in
/// checking the feasibility of the segment
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// \param _tolerance this tolerance is used in a piecewise linear
/// discretization that deviates no more than \c _tolerance
/// from the parabolic ramp along any axis, and then checks for
/// configuration and segment feasibility along that piecewise linear path.
/// \_rngSeed seed used by a random generator for sampling time in shortcut.
Expand All @@ -129,8 +128,7 @@ std::unique_ptr<trajectory::Spline> doShortcutAndBlend(
double _blendRadius = DEFAULT_BLEND_RADIUS,
int _blendIterations = DEFAULT_BLEND_ITERATIONS,
double _checkResolution = DEFAULT_CHECK_RESOLUTION,
double _tolerance = DEFAULT_TOLERANCE
);
double _tolerance = DEFAULT_TOLERANCE);

} // namespace parabolic
} // namespace planner
Expand Down
11 changes: 6 additions & 5 deletions include/aikido/planner/parabolic/ParabolicTimer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ namespace parabolic {
/// \param _maxAcceleration maximum acceleration for each dimension
/// \return time optimal trajectory that satisfies acceleration constraints
std::unique_ptr<aikido::trajectory::Spline> computeParabolicTiming(
const aikido::trajectory::Spline& _inputTrajectory,
const Eigen::VectorXd& _maxVelocity,
const Eigen::VectorXd& _maxAcceleration);
const aikido::trajectory::Spline& _inputTrajectory,
const Eigen::VectorXd& _maxVelocity,
const Eigen::VectorXd& _maxAcceleration);

/// Convert an interpolated trajectory to a spline trajectory
Copy link
Member

Choose a reason for hiding this comment

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

  1. Document that this function requires the _inputTrajectory to use a GeodesicInterpolator.
  2. Document that the function exactly preserves the geometic path, which is possible because of (1).
  3. Document that this function ignores velocities in the _inputTrajectory, which is unimportant because of (2).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkoval The velocities are used in conversion. Do you think it is ignored?

/// This function requires the \c _inputTrajectory to use a \c GeodesicInterpolator.
/// This function requires the \c _inputTrajectory to use a \c
/// GeodesicInterpolator.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Could you fix the wrapping? ClangFormat isn't good at it. 😞

Copy link
Member

Choose a reason for hiding this comment

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

Nit: I thought "So the conversion ..." was the continuing sentence without line breaking.

/// So the conversion exactly preserves the geometric path
/// \param _inputTrajectory interpolated trajectory
/// \return a spline trajectory
std::unique_ptr<aikido::trajectory::Spline> convertToSpline(
const aikido::trajectory::Interpolated& _inputTrajectory);
const aikido::trajectory::Interpolated& _inputTrajectory);

} // namespace parabolic
} // namespace planner
Expand Down
Loading