From 916ce0975ba98d9bcc6831e840d4b090be796e4d Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 27 Feb 2024 18:45:17 +0900 Subject: [PATCH 1/9] allow EnvironmentBodyRemover not to restore a grabbed body when the grabbing link does not exist as we do for active manipulator --- include/openrave/robot.h | 14 ++++++++ src/libopenrave/robot.cpp | 73 +++++++++++++++++++++++---------------- 2 files changed, 57 insertions(+), 30 deletions(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 8e994adcdf..53f68df6af 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1435,6 +1435,20 @@ class OPENRAVE_API RobotBase : public KinBody friend class Grabbed; }; +///\brief removes the robot from the environment temporarily while in scope +class OPENRAVE_API EnvironmentBodyRemover +{ +public: + EnvironmentBodyRemover(KinBodyPtr pBody); + ~EnvironmentBodyRemover(); + +private: + KinBodyPtr _pBody; + std::vector _pGrabbedInfos; ///< the list of the current grabbed info of pBody at the time of removal. + RobotBasePtr _pBodyRobot; + std::string _activeManipName; ///< the name of the current active manipulator of pBody at the time of removal. +}; + } // end namespace OpenRAVE #endif // ROBOT_H diff --git a/src/libopenrave/robot.cpp b/src/libopenrave/robot.cpp index a1855241fa..ba20703b30 100644 --- a/src/libopenrave/robot.cpp +++ b/src/libopenrave/robot.cpp @@ -447,42 +447,55 @@ void RobotBase::RobotStateSaver::Release() KinBodyStateSaver::Release(); } -///\brief removes the robot from the environment temporarily while in scope -class EnvironmentBodyRemover -{ -public: - EnvironmentBodyRemover(OpenRAVE::KinBodyPtr pBody) : _pBody(pBody), _grabbedStateSaver(pBody, OpenRAVE::KinBody::Save_GrabbedBodies) { - if( _pBody->IsRobot() ) { - // If the manip comes from a connected body, the information of which manip is active is lost once the robot - // is removed from env. Need to save the active manip name so that we can set it back later when the robot - // is re-added to the env. - _pBodyRobot = OpenRAVE::RaveInterfaceCast(_pBody); - if( !!_pBodyRobot->GetActiveManipulator() ) { - _activeManipName = _pBodyRobot->GetActiveManipulator()->GetName(); - } +EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody) : _pBody(pBody) { + if( _pBody->IsRobot() ) { + // If the manip comes from a connected body, the information of which manip is active is lost once the robot + // is removed from env. Need to save the active manip name so that we can set it back later when the robot + // is re-added to the env. + _pBodyRobot = RaveInterfaceCast(_pBody); + if( !!_pBodyRobot->GetActiveManipulator() ) { + _activeManipName = _pBodyRobot->GetActiveManipulator()->GetName(); } - _pBody->GetEnv()->Remove(_pBody); } + _pBody->GetGrabbedInfo(_pGrabbedInfos); + _pBody->GetEnv()->Remove(_pBody); +} - ~EnvironmentBodyRemover() { - _pBody->GetEnv()->Add(_pBody, IAM_StrictNameChecking); - _grabbedStateSaver.Restore(); - _grabbedStateSaver.Release(); - if( !!_pBodyRobot && !_activeManipName.empty() ) { - OpenRAVE::RobotBase::ManipulatorPtr pmanip = _pBodyRobot->GetManipulator(_activeManipName); - // it might be ok with manipulator doesn't exist if ConnectedBody acitve state changes. - if( !!pmanip ) { - _pBodyRobot->SetActiveManipulator(pmanip); +EnvironmentBodyRemover::~EnvironmentBodyRemover() { + _pBody->GetEnv()->Add(_pBody, IAM_StrictNameChecking); + if( !!_pBodyRobot && !_activeManipName.empty() ) { + RobotBase::ManipulatorPtr pmanip = _pBodyRobot->GetManipulator(_activeManipName); + // it might be ok with manipulator doesn't exist if ConnectedBody acitve state changes. + if( !!pmanip ) { + _pBodyRobot->SetActiveManipulator(pmanip); + } + else { + pmanip = _pBodyRobot->GetActiveManipulator(); + RAVELOG_WARN_FORMAT("env=%s, robot=%s, cannot restore previous active manip=%s because it does not exist anymore. current active manip=%s", _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName()%_activeManipName%(!!pmanip ? pmanip->GetName() : "")); + } + } + if( !_pGrabbedInfos.empty() ) { + // it might be ok with grabbing link doesn't exist if ConnectedBody acitve state changes. + std::vector::iterator itRemoveFirst = _pGrabbedInfos.begin(); + for( std::vector::const_iterator itGrabbedInfo = _pGrabbedInfos.begin(); itGrabbedInfo != _pGrabbedInfos.end(); ++itGrabbedInfo ) { + if( !_pBody->GetLink((*itGrabbedInfo)->_robotlinkname) ) { + RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because grabbing link '%s' does not exist anymore.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%(*itGrabbedInfo)->_grabbedname%(*itGrabbedInfo)->_robotlinkname); + } + else if( !_pBody->GetEnv()->GetKinBody((*itGrabbedInfo)->_grabbedname) ) { + RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because it does not exist in the environment.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%(*itGrabbedInfo)->_grabbedname); + } + else { + // will regrasp this info + if( itRemoveFirst != itGrabbedInfo ) { + *itRemoveFirst = std::move(*itGrabbedInfo); + } + ++itRemoveFirst; } } + const std::vector pConstGrabbedInfos(_pGrabbedInfos.begin(), itRemoveFirst); + _pBody->ResetGrabbed(pConstGrabbedInfos); } - -private: - OpenRAVE::KinBodyPtr _pBody; - OpenRAVE::KinBody::KinBodyStateSaver _grabbedStateSaver; - OpenRAVE::RobotBasePtr _pBodyRobot; - std::string _activeManipName; ///< the name of the current active manipulator of pBody at the time of removal. -}; +} void RobotBase::RobotStateSaver::_RestoreRobot(boost::shared_ptr probot) { From 75bd3d947374f6259f0dbbc2040488e0eacf98f2 Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 27 Feb 2024 18:46:47 +0900 Subject: [PATCH 2/9] bump version --- CMakeLists.txt | 4 ++-- docs/source/changelog.rst | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1214da3538..450abc50ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,8 @@ set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) # Define here the needed parameters set (OPENRAVE_VERSION_MAJOR 0) -set (OPENRAVE_VERSION_MINOR 139) -set (OPENRAVE_VERSION_PATCH 1) +set (OPENRAVE_VERSION_MINOR 140) +set (OPENRAVE_VERSION_PATCH 0) set (OPENRAVE_VERSION ${OPENRAVE_VERSION_MAJOR}.${OPENRAVE_VERSION_MINOR}.${OPENRAVE_VERSION_PATCH}) set (OPENRAVE_SOVERSION ${OPENRAVE_VERSION_MAJOR}.${OPENRAVE_VERSION_MINOR}) message(STATUS "Compiling OpenRAVE Version ${OPENRAVE_VERSION}, soversion=${OPENRAVE_SOVERSION}") diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index c204cd6ac4..a9e45d6fc6 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -6,6 +6,11 @@ ChangeLog Unreleased ========== +Version 0.140.0 +=============== + +* Allow EnvironmentBodyRemover not to restore a grabbed body when the grabbing link does not exist as we do for active manipulator + Version 0.139.1 =============== From a9b772cc650d1ad03541a0bb55679a2ff1f2084e Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Wed, 28 Feb 2024 13:50:35 +0900 Subject: [PATCH 3/9] need to check _setIgnoreRobotLinkNames existance as well --- src/libopenrave/robot.cpp | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/libopenrave/robot.cpp b/src/libopenrave/robot.cpp index ba20703b30..9931d7dad1 100644 --- a/src/libopenrave/robot.cpp +++ b/src/libopenrave/robot.cpp @@ -478,19 +478,33 @@ EnvironmentBodyRemover::~EnvironmentBodyRemover() { // it might be ok with grabbing link doesn't exist if ConnectedBody acitve state changes. std::vector::iterator itRemoveFirst = _pGrabbedInfos.begin(); for( std::vector::const_iterator itGrabbedInfo = _pGrabbedInfos.begin(); itGrabbedInfo != _pGrabbedInfos.end(); ++itGrabbedInfo ) { - if( !_pBody->GetLink((*itGrabbedInfo)->_robotlinkname) ) { - RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because grabbing link '%s' does not exist anymore.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%(*itGrabbedInfo)->_grabbedname%(*itGrabbedInfo)->_robotlinkname); + const KinBody::GrabbedInfoPtr pGrabbedInfo = *itGrabbedInfo; + bool needToDelete = false; + if( !_pBody->GetLink(pGrabbedInfo->_robotlinkname) ) { + RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because grabbing link '%s' does not exist anymore.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%pGrabbedInfo->_grabbedname%pGrabbedInfo->_robotlinkname); + needToDelete = true; } - else if( !_pBody->GetEnv()->GetKinBody((*itGrabbedInfo)->_grabbedname) ) { - RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because it does not exist in the environment.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%(*itGrabbedInfo)->_grabbedname); + else if( !_pBody->GetEnv()->GetKinBody(pGrabbedInfo->_grabbedname) ) { + RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because it does not exist in the environment.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%pGrabbedInfo->_grabbedname); + needToDelete = true; } else { - // will regrasp this info - if( itRemoveFirst != itGrabbedInfo ) { - *itRemoveFirst = std::move(*itGrabbedInfo); + for( std::set::const_iterator itLinkName = pGrabbedInfo->_setIgnoreRobotLinkNames.begin(); itLinkName != pGrabbedInfo->_setIgnoreRobotLinkNames.end(); ++itLinkName ) { + if( !_pBody->GetLink(*itLinkName) ) { + RAVELOG_WARN_FORMAT("env=%s, body=%s, cannot re-grab '%s' because '%s' in _setIgnoreRobotLinkNames does not exist anymore.", _pBody->GetEnv()->GetNameId()%_pBody->GetName()%pGrabbedInfo->_grabbedname%(*itLinkName)); + needToDelete = true; + break; + } } - ++itRemoveFirst; } + if( needToDelete ) { + continue; + } + // will regrasp this info + if( itRemoveFirst != itGrabbedInfo ) { + *itRemoveFirst = std::move(*itGrabbedInfo); + } + ++itRemoveFirst; } const std::vector pConstGrabbedInfos(_pGrabbedInfos.begin(), itRemoveFirst); _pBody->ResetGrabbed(pConstGrabbedInfos); From dd08d7f576985f40ffe455afe7cbb5df752dd1c3 Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Thu, 29 Feb 2024 16:35:35 +0900 Subject: [PATCH 4/9] clarify EnvironmentBodyRemover behavior by taking input arguments --- include/openrave/robot.h | 6 ++++-- src/libopenrave/robot.cpp | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 53f68df6af..d8aa7cf808 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1439,14 +1439,16 @@ class OPENRAVE_API RobotBase : public KinBody class OPENRAVE_API EnvironmentBodyRemover { public: - EnvironmentBodyRemover(KinBodyPtr pBody); - ~EnvironmentBodyRemover(); + EnvironmentBodyRemover(KinBodyPtr pBody, bool abortOnActiveManipulatorLost=false, bool abortOnGrabbedBodiesLost=true); + ~EnvironmentBodyRemover() noexcept(true); private: KinBodyPtr _pBody; std::vector _pGrabbedInfos; ///< the list of the current grabbed info of pBody at the time of removal. RobotBasePtr _pBodyRobot; std::string _activeManipName; ///< the name of the current active manipulator of pBody at the time of removal. + bool _abortOnActiveManipulatorLost; + bool _abortOnGrabbedBodiesLost; }; } // end namespace OpenRAVE diff --git a/src/libopenrave/robot.cpp b/src/libopenrave/robot.cpp index 9931d7dad1..340443ede9 100644 --- a/src/libopenrave/robot.cpp +++ b/src/libopenrave/robot.cpp @@ -447,7 +447,7 @@ void RobotBase::RobotStateSaver::Release() KinBodyStateSaver::Release(); } -EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody) : _pBody(pBody) { +EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody, bool abortOnActiveManipulatorLost, bool abortOnGrabbedBodiesLost) : _pBody(pBody), _abortOnActiveManipulatorLost(abortOnActiveManipulatorLost), _abortOnGrabbedBodiesLost(abortOnGrabbedBodiesLost) { if( _pBody->IsRobot() ) { // If the manip comes from a connected body, the information of which manip is active is lost once the robot // is removed from env. Need to save the active manip name so that we can set it back later when the robot @@ -461,7 +461,7 @@ EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody) : _pBody(pBody) _pBody->GetEnv()->Remove(_pBody); } -EnvironmentBodyRemover::~EnvironmentBodyRemover() { +EnvironmentBodyRemover::~EnvironmentBodyRemover() noexcept(true) { _pBody->GetEnv()->Add(_pBody, IAM_StrictNameChecking); if( !!_pBodyRobot && !_activeManipName.empty() ) { RobotBase::ManipulatorPtr pmanip = _pBodyRobot->GetManipulator(_activeManipName); @@ -469,9 +469,18 @@ EnvironmentBodyRemover::~EnvironmentBodyRemover() { if( !!pmanip ) { _pBodyRobot->SetActiveManipulator(pmanip); } - else { + else if( !_abortOnActiveManipulatorLost ) { pmanip = _pBodyRobot->GetActiveManipulator(); - RAVELOG_WARN_FORMAT("env=%s, robot=%s, cannot restore previous active manip=%s because it does not exist anymore. current active manip=%s", _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName()%_activeManipName%(!!pmanip ? pmanip->GetName() : "")); + RAVELOG_WARN_FORMAT("env=%s, robot=%s, cannot restore the original active manip=%s because it does not exist anymore. current active manip=%s", _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName()%_activeManipName%(!!pmanip ? pmanip->GetName() : "")); + } + else { + stringstream ss; + ss << "available manipulators are ["; + for( const RobotBase::ManipulatorPtr& pManip : _pBodyRobot->GetManipulators() ) { + ss << pManip->GetName() << ", "; + } + ss << "]"; + throw OPENRAVE_EXCEPTION_FORMAT(_("env=%s, robot=%s, cannot restore the original active manip=%s because it does not exist anymore. %s"), _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName()%_activeManipName%ss.str(), ORE_Failed); } } if( !_pGrabbedInfos.empty() ) { @@ -498,6 +507,9 @@ EnvironmentBodyRemover::~EnvironmentBodyRemover() { } } if( needToDelete ) { + if( _abortOnGrabbedBodiesLost ) { + throw OPENRAVE_EXCEPTION_FORMAT(_("env=%s, robot=%s, cannot restore the original grabbed bodies."), _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName(), ORE_Failed); + } continue; } // will regrasp this info From d551f1992ad9dfa68ccd8c3eec0134d5766a17f6 Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 19 Mar 2024 19:10:05 +0900 Subject: [PATCH 5/9] add enum type for EnvironmentBodyRemover options --- include/openrave/robot.h | 11 ++++++++--- src/libopenrave/robot.cpp | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 8cd78a934e..f0edcf7760 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1437,11 +1437,17 @@ class OPENRAVE_API RobotBase : public KinBody friend class Grabbed; }; +enum EnvironmentBodyRemoverRestoreOptions : uint8_t +{ + EBRRO_AbortOnActiveManipulatorLost = 0b01, ///< will abort if active manipulator cannot be restored. + EBRRO_AbortOnGrabbedBodiesLost = 0b10, ///< will abort if grabbed bodies cannot be restored. +}; + ///\brief removes the robot from the environment temporarily while in scope class OPENRAVE_API EnvironmentBodyRemover { public: - EnvironmentBodyRemover(KinBodyPtr pBody, bool abortOnActiveManipulatorLost=false, bool abortOnGrabbedBodiesLost=true); + EnvironmentBodyRemover(KinBodyPtr pBody, int restoreOptions=EBRRO_AbortOnActiveManipulatorLost); ~EnvironmentBodyRemover() noexcept(true); private: @@ -1449,8 +1455,7 @@ class OPENRAVE_API EnvironmentBodyRemover std::vector _pGrabbedInfos; ///< the list of the current grabbed info of pBody at the time of removal. RobotBasePtr _pBodyRobot; std::string _activeManipName; ///< the name of the current active manipulator of pBody at the time of removal. - bool _abortOnActiveManipulatorLost; - bool _abortOnGrabbedBodiesLost; + int _restoreOptions; }; } // end namespace OpenRAVE diff --git a/src/libopenrave/robot.cpp b/src/libopenrave/robot.cpp index 340443ede9..4a095115bd 100644 --- a/src/libopenrave/robot.cpp +++ b/src/libopenrave/robot.cpp @@ -447,7 +447,7 @@ void RobotBase::RobotStateSaver::Release() KinBodyStateSaver::Release(); } -EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody, bool abortOnActiveManipulatorLost, bool abortOnGrabbedBodiesLost) : _pBody(pBody), _abortOnActiveManipulatorLost(abortOnActiveManipulatorLost), _abortOnGrabbedBodiesLost(abortOnGrabbedBodiesLost) { +EnvironmentBodyRemover::EnvironmentBodyRemover(KinBodyPtr pBody, int restoreOptions) : _pBody(pBody), _restoreOptions(restoreOptions) { if( _pBody->IsRobot() ) { // If the manip comes from a connected body, the information of which manip is active is lost once the robot // is removed from env. Need to save the active manip name so that we can set it back later when the robot @@ -469,7 +469,7 @@ EnvironmentBodyRemover::~EnvironmentBodyRemover() noexcept(true) { if( !!pmanip ) { _pBodyRobot->SetActiveManipulator(pmanip); } - else if( !_abortOnActiveManipulatorLost ) { + else if( !(_restoreOptions & EBRRO_AbortOnActiveManipulatorLost) ) { pmanip = _pBodyRobot->GetActiveManipulator(); RAVELOG_WARN_FORMAT("env=%s, robot=%s, cannot restore the original active manip=%s because it does not exist anymore. current active manip=%s", _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName()%_activeManipName%(!!pmanip ? pmanip->GetName() : "")); } @@ -507,7 +507,7 @@ EnvironmentBodyRemover::~EnvironmentBodyRemover() noexcept(true) { } } if( needToDelete ) { - if( _abortOnGrabbedBodiesLost ) { + if( _restoreOptions & EBRRO_AbortOnGrabbedBodiesLost ) { throw OPENRAVE_EXCEPTION_FORMAT(_("env=%s, robot=%s, cannot restore the original grabbed bodies."), _pBodyRobot->GetEnv()->GetNameId()%_pBodyRobot->GetName(), ORE_Failed); } continue; From cbdb9bcded524a0bb20d9a2be056cc845768ab8f Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 19 Mar 2024 19:19:19 +0900 Subject: [PATCH 6/9] fix the default argument --- include/openrave/robot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index f0edcf7760..0c4604f7c3 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1447,7 +1447,7 @@ enum EnvironmentBodyRemoverRestoreOptions : uint8_t class OPENRAVE_API EnvironmentBodyRemover { public: - EnvironmentBodyRemover(KinBodyPtr pBody, int restoreOptions=EBRRO_AbortOnActiveManipulatorLost); + EnvironmentBodyRemover(KinBodyPtr pBody, int restoreOptions=EBRRO_AbortOnGrabbedBodiesLost); // abort on grabbed bodies lost for backward compatibility ~EnvironmentBodyRemover() noexcept(true); private: From 8397d765044f82c6bea091c9cd7a979ad1f132bc Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 19 Mar 2024 19:21:57 +0900 Subject: [PATCH 7/9] add the option not to abort --- include/openrave/robot.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 0c4604f7c3..18cb156ece 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1439,6 +1439,7 @@ class OPENRAVE_API RobotBase : public KinBody enum EnvironmentBodyRemoverRestoreOptions : uint8_t { + EBRRO_NoAbortOnInfoLost = 0, ///< will not abort even if active manipulator or grabbed bodies cannot be restored. EBRRO_AbortOnActiveManipulatorLost = 0b01, ///< will abort if active manipulator cannot be restored. EBRRO_AbortOnGrabbedBodiesLost = 0b10, ///< will abort if grabbed bodies cannot be restored. }; From a001c6aa29d1ddff5a12a8d55e9f431b2da198f8 Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 19 Mar 2024 19:24:24 +0900 Subject: [PATCH 8/9] add the option to abort if any info is lost --- include/openrave/robot.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 18cb156ece..0da062ac18 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1439,9 +1439,10 @@ class OPENRAVE_API RobotBase : public KinBody enum EnvironmentBodyRemoverRestoreOptions : uint8_t { - EBRRO_NoAbortOnInfoLost = 0, ///< will not abort even if active manipulator or grabbed bodies cannot be restored. + EBRRO_NoAbortOnInfoLost = 0, ///< will not abort even if any info cannot be restored. EBRRO_AbortOnActiveManipulatorLost = 0b01, ///< will abort if active manipulator cannot be restored. EBRRO_AbortOnGrabbedBodiesLost = 0b10, ///< will abort if grabbed bodies cannot be restored. + EBRRO_AbortOnInfoLost = EBRRO_AbortOnActiveManipulatorLost | EBRRO_AbortOnGrabbedBodiesLost; ///< will abort if any info cannot be restored. }; ///\brief removes the robot from the environment temporarily while in scope From ad73c5480728730d97406fc8f6b0e1150d74bbbb Mon Sep 17 00:00:00 2001 From: Eisoku Kuroiwa Date: Tue, 19 Mar 2024 19:28:28 +0900 Subject: [PATCH 9/9] fix typo --- include/openrave/robot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/openrave/robot.h b/include/openrave/robot.h index 0da062ac18..6d0cd99e61 100644 --- a/include/openrave/robot.h +++ b/include/openrave/robot.h @@ -1442,7 +1442,7 @@ enum EnvironmentBodyRemoverRestoreOptions : uint8_t EBRRO_NoAbortOnInfoLost = 0, ///< will not abort even if any info cannot be restored. EBRRO_AbortOnActiveManipulatorLost = 0b01, ///< will abort if active manipulator cannot be restored. EBRRO_AbortOnGrabbedBodiesLost = 0b10, ///< will abort if grabbed bodies cannot be restored. - EBRRO_AbortOnInfoLost = EBRRO_AbortOnActiveManipulatorLost | EBRRO_AbortOnGrabbedBodiesLost; ///< will abort if any info cannot be restored. + EBRRO_AbortOnInfoLost = EBRRO_AbortOnActiveManipulatorLost | EBRRO_AbortOnGrabbedBodiesLost, ///< will abort if any info cannot be restored. }; ///\brief removes the robot from the environment temporarily while in scope