diff --git a/CHANGELOG.md b/CHANGELOG.md index 46b43a4f09..48882cf6ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ * Added Robot, Manipulator, Hand interfaces, and ConcreteRobot, ConcreteManipulator classes: [#325](https://github.com/personalrobotics/aikido/pull/325), [#392](https://github.com/personalrobotics/aikido/pull/392) * Added Kunz timer to Robot class: [#505](https://github.com/personalrobotics/aikido/pull/505) + * Made ConcreteRobot limit functions public: [#556](https://github.com/personalrobotics/aikido/pull/556) * RViz diff --git a/include/aikido/robot/ConcreteRobot.hpp b/include/aikido/robot/ConcreteRobot.hpp index ea6e50ab03..2fdaefe5ae 100644 --- a/include/aikido/robot/ConcreteRobot.hpp +++ b/include/aikido/robot/ConcreteRobot.hpp @@ -251,6 +251,20 @@ class ConcreteRobot : public Robot void setCRRTPlannerParameters( const util::CRRTPlannerParameters& crrtParameters); + /// Computes velocity limits from the MetaSkeleton. These should be + /// interpreted as absolute in both the positive and negative directions. + /// \param[in] metaSkeleton MetaSkeleton to compute limits for. + /// \return Symmetric velocity limits. + Eigen::VectorXd getVelocityLimits( + const dart::dynamics::MetaSkeleton& metaSkeleton) const; + + /// Computes acceleration limits from the MetaSkeleton. These should be + /// interpreted as absolute in both the positive and negative directions. + /// \param[in] metaSkeleton MetaSkeleton to compute limits for. + /// \return Symmetric acceleration limits. + Eigen::VectorXd getAccelerationLimits( + const dart::dynamics::MetaSkeleton& metaSkeleton) const; + private: // Named Configurations are read from a YAML file using ConfigurationMap @@ -258,14 +272,6 @@ class ConcreteRobot : public Robot std::unique_ptr cloneRNG(); - /// Compute velocity limits from the MetaSkeleton - Eigen::VectorXd getVelocityLimits( - const dart::dynamics::MetaSkeleton& metaSkeleton) const; - - /// Compute acceleration limits from the MetaSkeleton - Eigen::VectorXd getAccelerationLimits( - const dart::dynamics::MetaSkeleton& metaSkeleton) const; - /// If this robot belongs to another (Composite)Robot, /// mRootRobot is the topmost robot containing this robot. Robot* mRootRobot; diff --git a/src/robot/ConcreteRobot.cpp b/src/robot/ConcreteRobot.cpp index 7a8b4ce28b..29eedc17cf 100644 --- a/src/robot/ConcreteRobot.cpp +++ b/src/robot/ConcreteRobot.cpp @@ -247,20 +247,6 @@ void ConcreteRobot::step(const std::chrono::system_clock::time_point& timepoint) mTrajectoryExecutor->step(timepoint); } -//============================================================================== -Eigen::VectorXd ConcreteRobot::getVelocityLimits( - const MetaSkeleton& metaSkeleton) const -{ - return getSymmetricVelocityLimits(metaSkeleton, asymmetryTolerance); -} - -//============================================================================== -Eigen::VectorXd ConcreteRobot::getAccelerationLimits( - const MetaSkeleton& metaSkeleton) const -{ - return getSymmetricAccelerationLimits(metaSkeleton, asymmetryTolerance); -} - // ============================================================================== CollisionFreePtr ConcreteRobot::getSelfCollisionConstraint( const ConstMetaSkeletonStateSpacePtr& space, @@ -494,6 +480,20 @@ void ConcreteRobot::setCRRTPlannerParameters( mCRRTParameters = crrtParameters; } +//============================================================================== +Eigen::VectorXd ConcreteRobot::getVelocityLimits( + const MetaSkeleton& metaSkeleton) const +{ + return getSymmetricVelocityLimits(metaSkeleton, asymmetryTolerance); +} + +//============================================================================== +Eigen::VectorXd ConcreteRobot::getAccelerationLimits( + const MetaSkeleton& metaSkeleton) const +{ + return getSymmetricAccelerationLimits(metaSkeleton, asymmetryTolerance); +} + //============================================================================== std::unique_ptr ConcreteRobot::cloneRNG() {