From 557dbb20372f004f501f762289a2ddc7603a46c9 Mon Sep 17 00:00:00 2001 From: sniyaz Date: Fri, 14 Aug 2020 00:13:07 -0700 Subject: [PATCH 1/3] Delete old PP code. --- include/aikido/robot/ConcreteManipulator.hpp | 18 ---- include/aikido/robot/ConcreteRobot.hpp | 32 ------- include/aikido/robot/Robot.hpp | 31 ------- src/robot/ConcreteManipulator.cpp | 28 ------ src/robot/ConcreteRobot.cpp | 94 -------------------- 5 files changed, 203 deletions(-) diff --git a/include/aikido/robot/ConcreteManipulator.hpp b/include/aikido/robot/ConcreteManipulator.hpp index 24a42a18f8..2d0c59e3ec 100644 --- a/include/aikido/robot/ConcreteManipulator.hpp +++ b/include/aikido/robot/ConcreteManipulator.hpp @@ -31,24 +31,6 @@ class ConcreteManipulator : public Manipulator // Documentation inherited. virtual ConstHandPtr getHand() const override; - // Documentation inherited. - virtual std::unique_ptr smoothPath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - const constraint::TestablePtr& constraint) override; - - // Documentation inherited. - virtual std::unique_ptr retimePath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path) override; - - // Documentation inherited. - virtual std::unique_ptr retimePathWithKunz( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - double maxDeviation, - double timestep) override; - // Documentation inherited. virtual std::future executeTrajectory( const trajectory::TrajectoryPtr& trajectory) const override; diff --git a/include/aikido/robot/ConcreteRobot.hpp b/include/aikido/robot/ConcreteRobot.hpp index fddac85dfd..c312cc5f99 100644 --- a/include/aikido/robot/ConcreteRobot.hpp +++ b/include/aikido/robot/ConcreteRobot.hpp @@ -53,24 +53,6 @@ class ConcreteRobot : public Robot virtual ~ConcreteRobot() = default; - // Documentation inherited. - virtual aikido::trajectory::UniqueSplinePtr smoothPath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - const constraint::TestablePtr& constraint) override; - - // Documentation inherited. - virtual aikido::trajectory::UniqueSplinePtr retimePath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path) override; - - // Documentation inherited. - virtual std::unique_ptr retimePathWithKunz( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - double maxDeviation, - double timestep) override; - // Documentation inherited. virtual std::future executeTrajectory( const trajectory::TrajectoryPtr& trajectory) const override; @@ -112,20 +94,6 @@ class ConcreteRobot : public Robot const dart::dynamics::MetaSkeletonPtr& metaSkeleton, const constraint::dart::CollisionFreePtr& collisionFree) const override; - // Get a smoothing post postprocessor that respects velocity and acceleration - // limits, as well as the passed constraint. - /// \param[in] metaSkeleton The MetaSkeleton whose limits must be respected. - std::shared_ptr - getTrajectoryPostProcessor( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - bool enableShortcut, - bool enableBlend, - double shortcutTimelimit, - double blendRadius, - int blendIterations, - double feasibilityCheckResolution, - double feasibilityApproxTolerance) const; - /// Get a postprocessor that respects velocity and acceleration limits. The /// specific postprocessor returned is controlled by `postProcessorParams`. /// \param[in] metaSkeleton Metaskeleton of the path. diff --git a/include/aikido/robot/Robot.hpp b/include/aikido/robot/Robot.hpp index c97a08b2c9..d95ac1083b 100644 --- a/include/aikido/robot/Robot.hpp +++ b/include/aikido/robot/Robot.hpp @@ -28,37 +28,6 @@ class Robot public: virtual ~Robot() = default; - /// Returns a timed trajectory that can be executed by the robot. - /// \param[in] metaSkeleton Metaskeleton of the path. - /// \param[in] path Geometric path to execute. - /// \param[in] constraint Must be satisfied after postprocessing. Typically - /// collision constraint is passed. - virtual std::unique_ptr smoothPath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - const constraint::TestablePtr& constraint) - = 0; - - /// Returns a timed trajectory that can be executed by the robot. - /// \param[in] metaSkeleton Metaskeleton of the path. - /// \param[in] path Geometric path to execute. - virtual std::unique_ptr retimePath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path) - = 0; - - /// Returns a timed trajectory computed with KunzRetimer - /// \param[in] metaSkeleton Metaskeleton of the path. - /// \param[in] path Geometric path to execute. - /// \param[in] maxDeviation Maximum deviation allowed from original path. - /// \param[in] timestep Time step between trajectory points. - virtual std::unique_ptr retimePathWithKunz( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - double maxDeviation, - double timestep) - = 0; - /// Executes a trajectory /// \param[in] trajectory Timed trajectory to execute virtual std::future executeTrajectory( diff --git a/src/robot/ConcreteManipulator.cpp b/src/robot/ConcreteManipulator.cpp index ab94266f94..a664e611fd 100644 --- a/src/robot/ConcreteManipulator.cpp +++ b/src/robot/ConcreteManipulator.cpp @@ -19,34 +19,6 @@ ConstHandPtr ConcreteManipulator::getHand() const return mHand; } -//============================================================================== -std::unique_ptr ConcreteManipulator::smoothPath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - const constraint::TestablePtr& constraint) -{ - return mRobot->smoothPath(metaSkeleton, path, constraint); -} - -//============================================================================== -std::unique_ptr ConcreteManipulator::retimePath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path) -{ - return mRobot->retimePath(metaSkeleton, path); -} - -//============================================================================== -std::unique_ptr -ConcreteManipulator::retimePathWithKunz( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - double maxDeviation, - double timestep) -{ - return mRobot->retimePathWithKunz(metaSkeleton, path, maxDeviation, timestep); -} - //============================================================================== std::future ConcreteManipulator::executeTrajectory( const trajectory::TrajectoryPtr& trajectory) const diff --git a/src/robot/ConcreteRobot.cpp b/src/robot/ConcreteRobot.cpp index 29eedc17cf..084958ad34 100644 --- a/src/robot/ConcreteRobot.cpp +++ b/src/robot/ConcreteRobot.cpp @@ -120,73 +120,6 @@ ConcreteRobot::ConcreteRobot( mParentSkeleton = mMetaSkeleton->getBodyNode(0)->getSkeleton(); } -//============================================================================== -UniqueSplinePtr ConcreteRobot::smoothPath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - const constraint::TestablePtr& constraint) -{ - Eigen::VectorXd velocityLimits = getVelocityLimits(*metaSkeleton); - Eigen::VectorXd accelerationLimits = getAccelerationLimits(*metaSkeleton); - auto smoother - = std::make_shared(velocityLimits, accelerationLimits); - - auto interpolated = dynamic_cast(path); - if (interpolated) - return smoother->postprocess( - *interpolated, *(cloneRNG().get()), constraint); - - auto spline = dynamic_cast(path); - if (spline) - return smoother->postprocess(*spline, *(cloneRNG().get()), constraint); - - throw std::invalid_argument("Path should be either Spline or Interpolated."); -} - -//============================================================================== -UniqueSplinePtr ConcreteRobot::retimePath( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path) -{ - Eigen::VectorXd velocityLimits = getVelocityLimits(*metaSkeleton); - Eigen::VectorXd accelerationLimits = getAccelerationLimits(*metaSkeleton); - auto retimer - = std::make_shared(velocityLimits, accelerationLimits); - - auto interpolated = dynamic_cast(path); - if (interpolated) - return retimer->postprocess(*interpolated, *(cloneRNG().get())); - - auto spline = dynamic_cast(path); - if (spline) - return retimer->postprocess(*spline, *(cloneRNG().get())); - - throw std::invalid_argument("Path should be either Spline or Interpolated."); -} - -//============================================================================== -UniqueSplinePtr ConcreteRobot::retimePathWithKunz( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - const aikido::trajectory::Trajectory* path, - double maxDeviation, - double timestep) -{ - Eigen::VectorXd velocityLimits = getVelocityLimits(*metaSkeleton); - Eigen::VectorXd accelerationLimits = getAccelerationLimits(*metaSkeleton); - auto retimer = std::make_shared( - velocityLimits, accelerationLimits, maxDeviation, timestep); - - auto interpolated = dynamic_cast(path); - if (interpolated) - return retimer->postprocess(*interpolated, *(cloneRNG().get())); - - auto spline = dynamic_cast(path); - if (spline) - return retimer->postprocess(*spline, *(cloneRNG().get())); - - throw std::invalid_argument("Path should be either Spline or Interpolated."); -} - //============================================================================== std::future ConcreteRobot::executeTrajectory( const TrajectoryPtr& trajectory) const @@ -304,33 +237,6 @@ TestablePtr ConcreteRobot::getFullCollisionConstraint( return std::make_shared(space, constraints); } -//============================================================================== -std::shared_ptr -ConcreteRobot::getTrajectoryPostProcessor( - const dart::dynamics::MetaSkeletonPtr& metaSkeleton, - bool enableShortcut, - bool enableBlend, - double shortcutTimelimit, - double blendRadius, - int blendIterations, - double feasibilityCheckResolution, - double feasibilityApproxTolerance) const -{ - Eigen::VectorXd velocityLimits = getVelocityLimits(*metaSkeleton); - Eigen::VectorXd accelerationLimits = getAccelerationLimits(*metaSkeleton); - - return std::make_shared( - velocityLimits, - accelerationLimits, - enableShortcut, - enableBlend, - shortcutTimelimit, - blendRadius, - blendIterations, - feasibilityCheckResolution, - feasibilityApproxTolerance); -} - //============================================================================== TrajectoryPtr ConcreteRobot::planToConfiguration( const MetaSkeletonStateSpacePtr& stateSpace, From 6ea4c3c5a25477fbaf00700f3c0c5168d7c97dbd Mon Sep 17 00:00:00 2001 From: sniyaz Date: Wed, 26 Aug 2020 21:53:23 -0700 Subject: [PATCH 2/3] Update CL. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64c393bc0b..49a7d024e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Planner * Defined post-processor parameter structs in AIKIDO: [#579](https://github.com/personalrobotics/aikido/pull/579) + * Deleted old post-processor code: [#581](https://github.com/personalrobotics/aikido/pull/581) ### 0.3.0 (2020-05-22) From 112d459f8ce65d722a8759dd6ab869fc8f91289f Mon Sep 17 00:00:00 2001 From: Brian Hou Date: Wed, 26 Aug 2020 21:58:13 -0700 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a7d024e2..5502a5684b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * Planner * Defined post-processor parameter structs in AIKIDO: [#579](https://github.com/personalrobotics/aikido/pull/579) - * Deleted old post-processor code: [#581](https://github.com/personalrobotics/aikido/pull/581) + * Deleted old post-processor interface: [#581](https://github.com/personalrobotics/aikido/pull/581) ### 0.3.0 (2020-05-22)