diff --git a/source/armarx/control/pointing/core/Pointing.cpp b/source/armarx/control/pointing/core/Pointing.cpp index d39ff8b934cd453830ed075d8624e88efaf21016..2cf6932802f54ceb652816f7b753e43511230408 100644 --- a/source/armarx/control/pointing/core/Pointing.cpp +++ b/source/armarx/control/pointing/core/Pointing.cpp @@ -64,7 +64,7 @@ namespace armarx::control::pointing::core if (not robot) { ARMARX_ERROR << "Could not get synchronized robot '" << remote_.robotName << "'"; - throw PointingFailedException(); + throw armarx::exceptions::local::PointingFailedException(); } return robot; } @@ -96,12 +96,12 @@ namespace armarx::control::pointing::core if (ik.optimize() < 1e-6) { ARMARX_WARNING << "PointingIK didn't find a solution"; - throw PointingFailedException(); + throw armarx::exceptions::local::PointingFailedException(); } if (aborted) { ARMARX_INFO << "Pointing aborted."; - throw PointingAbortedException(); + throw armarx::exceptions::local::PointingAbortedException(); } } while (not ik.isTargetReached()); @@ -160,7 +160,7 @@ namespace armarx::control::pointing::core { ARMARX_INFO << "Pointing aborted. Stopping trajectory"; remote_.trajectoryPlayer->stopTrajectoryPlayer(); - throw PointingAbortedException(); + throw armarx::exceptions::local::PointingAbortedException(); } clock.waitFor(Duration::MilliSeconds(10)); } @@ -179,7 +179,7 @@ namespace armarx::control::pointing::core if (not shape) { ARMARX_ERROR << "Hand '" << eefName << "' has no shape '" << shape << "'"; - throw PointingFailedException(); + throw armarx::exceptions::local::PointingFailedException(); } return shape->getRobotNodeJointValueMap(); } diff --git a/source/armarx/control/pointing/core/Pointing.h b/source/armarx/control/pointing/core/Pointing.h index bd03e63a3b94d34f02c36d4e46e8c2892149a2be..0de3de67b6be25093e017c1981d5f7f350830f10 100644 --- a/source/armarx/control/pointing/core/Pointing.h +++ b/source/armarx/control/pointing/core/Pointing.h @@ -10,6 +10,21 @@ #include "Side.h" +namespace armarx::exceptions::local +{ + class PointingException : public armarx::LocalException + { + }; + + class PointingFailedException : public PointingException + { + }; + + class PointingAbortedException : public PointingException + { + }; +} // namespace armarx::exceptions::local + namespace armarx::control::pointing::core { @@ -50,19 +65,6 @@ namespace armarx::control::pointing::core double maxAcceleration; }; - class PointingException : public std::exception - { - }; - - class PointingFailedException : public PointingException - { - }; - - class PointingAbortedException : public PointingException - { - }; - - public: Pointing(const Remote& remote); @@ -74,9 +76,10 @@ namespace armarx::control::pointing::core * * @param params Parameterization of the pointing gesture. * - * @throws PointingFailedException Thrown if the pointing gesture could not be executed. - * @throws Thrown when the execution is aborted with @ref abort before reaching the target - * configuration. + * @throws armarx::exceptions::local::PointingFailedException Thrown if the pointing gesture + * could not be executed. + * @throws armarx::exceptions::local::PointingAbortedException Thrown when the execution is + * aborted with @ref abort() before reaching the target configuration. */ void execute(const Parameters params); diff --git a/source/armarx/control/pointing/skills/PointAt.cpp b/source/armarx/control/pointing/skills/PointAt.cpp index fbe895cfe32e67c0e7d7a2c0f3d8b112a26c069c..b10fa328335e32733e4df4da94730e2ccb51a8a2 100644 --- a/source/armarx/control/pointing/skills/PointAt.cpp +++ b/source/armarx/control/pointing/skills/PointAt.cpp @@ -37,11 +37,11 @@ namespace armarx::control::pointing::skills { impl_->execute(parameters); } - catch (core::Pointing::PointingFailedException&) + catch (armarx::exceptions::local::PointingFailedException&) { return MakeFailedResult(); } - catch (core::Pointing::PointingAbortedException&) + catch (armarx::exceptions::local::PointingAbortedException&) { return MakeAbortedResult(); } diff --git a/source/armarx/control/pointing/skills/PointAt.h b/source/armarx/control/pointing/skills/PointAt.h index ff3655fd36c53bb01985597340f7b0956103c998..3e52906b08167f17507df932b8d7dafc9c9763d0 100644 --- a/source/armarx/control/pointing/skills/PointAt.h +++ b/source/armarx/control/pointing/skills/PointAt.h @@ -7,6 +7,11 @@ namespace armarx::control::pointing::skills { + /** + * @brief Implementation of the PointAt-skill + * + * @ingroup Library-pointing + */ class PointAt : public armarx::skills::SimpleSpecializedSkill<arondto::PointAtParams> { public: