From f82833da28e462129dcc4e4b9ca3b57d1ed3c147 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 13 Dec 2023 16:40:00 -0600 Subject: [PATCH 01/10] Allow joint to recover after reaching position limits in servo mode (#1774) Signed-off-by: Addisu Z. Taddese --- dart/constraint/JointConstraint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dart/constraint/JointConstraint.cpp b/dart/constraint/JointConstraint.cpp index faa072d8f21a9..bf032f0ffb2a1 100644 --- a/dart/constraint/JointConstraint.cpp +++ b/dart/constraint/JointConstraint.cpp @@ -238,7 +238,7 @@ void JointConstraint::update() // the position error. const double C1 = mErrorAllowance * A1; - double bouncing_vel = -std::max(B1, C1) / timeStep; + double bouncing_vel = -std::min(B1, C1) / timeStep; assert(bouncing_vel >= 0); bouncing_vel = std::min(bouncing_vel, mMaxErrorReductionVelocity); @@ -280,7 +280,7 @@ void JointConstraint::update() // the position error. const double C2 = mErrorAllowance * A2; - double bouncing_vel = -std::min(B2, C2) / timeStep; + double bouncing_vel = -std::max(B2, C2) / timeStep; assert(bouncing_vel <= 0); bouncing_vel = std::max(bouncing_vel, -mMaxErrorReductionVelocity); From c420a029c4abb95489364f8b10c12058f0cd3255 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 14 Dec 2023 12:32:50 -0800 Subject: [PATCH 02/10] Update ci_ubuntu.yml Signed-off-by: Jeongseok (JS) Lee --- .github/workflows/ci_ubuntu.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_ubuntu.yml b/.github/workflows/ci_ubuntu.yml index b0775017668ce..a7f4f9b0a773b 100644 --- a/.github/workflows/ci_ubuntu.yml +++ b/.github/workflows/ci_ubuntu.yml @@ -6,6 +6,9 @@ on: push: branches: - "**" + pull_request: + branches: + - "**" schedule: # Cron syntax: [minute hour day_of_the_month month day_of_the_week] - cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00 From c63be9689d162c8368737402a7206c294ba8b238 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 14 Dec 2023 12:32:59 -0800 Subject: [PATCH 03/10] Update ci_macos.yml Signed-off-by: Jeongseok (JS) Lee --- .github/workflows/ci_macos.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 76b9ec91ba72c..9fe5899bfe9d6 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -6,6 +6,9 @@ on: push: branches: - "**" + pull_request: + branches: + - "**" schedule: # Cron syntax: [minute hour day_of_the_month month day_of_the_week] - cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00 From 82bbe525fc8f8b245f8f48bc5bf6b3333ae857fe Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 14 Dec 2023 12:33:08 -0800 Subject: [PATCH 04/10] Update ci_windows.yml Signed-off-by: Jeongseok (JS) Lee --- .github/workflows/ci_windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index a6e0a767f1942..c10ac97a98ddf 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -6,6 +6,9 @@ on: push: branches: - "**" + pull_request: + branches: + - "**" schedule: # Cron syntax: [minute hour day_of_the_month month day_of_the_week] - cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00 From 3e8133c79d67032ab35c05d8164f11a11d50f37b Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 14 Dec 2023 12:33:17 -0800 Subject: [PATCH 05/10] Update api_doc.yml Signed-off-by: Jeongseok (JS) Lee --- .github/workflows/api_doc.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/api_doc.yml b/.github/workflows/api_doc.yml index 65d78cc3e7d98..89b25ab11dd69 100644 --- a/.github/workflows/api_doc.yml +++ b/.github/workflows/api_doc.yml @@ -6,6 +6,9 @@ on: push: branches: - "**" + pull_request: + branches: + - "**" schedule: # Cron syntax: [minute hour day_of_the_month month day_of_the_week] - cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00 From b7f5dd1cee755fe0e7a43c8c83794f22452501c1 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Tue, 19 Dec 2023 06:31:38 -0800 Subject: [PATCH 06/10] Attempt to fix #1769 (#1778) --- dart/dynamics/BodyNode.cpp | 5 ++++- dart/dynamics/Skeleton.cpp | 7 +++++++ dart/gui/osg/Viewer.cpp | 13 +++++++++++++ dart/gui/osg/Viewer.hpp | 4 +++- dart/gui/osg/detail/CameraModeCallback.cpp | 3 +-- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dart/dynamics/BodyNode.cpp b/dart/dynamics/BodyNode.cpp index 0fb72950c0a91..b905f37873661 100644 --- a/dart/dynamics/BodyNode.cpp +++ b/dart/dynamics/BodyNode.cpp @@ -176,7 +176,10 @@ ConstSkeletonPtr SkeletonRefCountingBase::getSkeleton() const /// SET_FLAGS : A version of SKEL_SET_FLAGS that assumes a SkeletonPtr named /// 'skel' has already been locked #define SET_FLAGS(X) \ - skel->mTreeCache[mTreeIndex].mDirty.X = true; \ + if (mTreeIndex != INVALID_INDEX) \ + { \ + skel->mTreeCache[mTreeIndex].mDirty.X = true; \ + } \ skel->mSkelCache.mDirty.X = true; /// CHECK_FLAG : Check if the dirty flag X for the tree of this BodyNode is diff --git a/dart/dynamics/Skeleton.cpp b/dart/dynamics/Skeleton.cpp index 8d2c1bc037fce..aafea5798b91d 100644 --- a/dart/dynamics/Skeleton.cpp +++ b/dart/dynamics/Skeleton.cpp @@ -2357,6 +2357,13 @@ void Skeleton::registerNode(Node* _newNode) //============================================================================== void Skeleton::destructOldTree(std::size_t tree) { + // Invalidate the tree indices of every BodyNode that is being removed + DataCache& treeToDestroy = mTreeCache[tree]; + for (auto& bodyNode : treeToDestroy.mBodyNodes) + { + bodyNode->mTreeIndex = INVALID_INDEX; + } + mTreeCache.erase(mTreeCache.begin() + tree); mTreeNodeMaps.erase(mTreeNodeMaps.begin() + tree); diff --git a/dart/gui/osg/Viewer.cpp b/dart/gui/osg/Viewer.cpp index ee07a6ac3b6d9..5e6cefa445cb5 100644 --- a/dart/gui/osg/Viewer.cpp +++ b/dart/gui/osg/Viewer.cpp @@ -52,6 +52,19 @@ namespace dart { namespace gui { namespace osg { +std::string toString(CameraMode mode) +{ + switch (mode) + { + case CameraMode::RGBA: + return "RGBA"; + case CameraMode::DEPTH: + return "DEPTH"; + default: + return "UNKNOWN"; + } +} + class SaveScreen : public ::osg::Camera::DrawCallback { public: diff --git a/dart/gui/osg/Viewer.hpp b/dart/gui/osg/Viewer.hpp index fbf4390f12300..7b908e544a3da 100644 --- a/dart/gui/osg/Viewer.hpp +++ b/dart/gui/osg/Viewer.hpp @@ -83,10 +83,12 @@ enum class CameraMode /// To render the depth buffer /// - /// \warning The DEPTH mode currently not compatible with the ImGui wigets. + /// \warning The DEPTH mode currently not compatible with the ImGui widgets. DEPTH, }; +[[nodiscard]] std::string toString(CameraMode mode); + DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN class ViewerAttachment : public virtual ::osg::Group { diff --git a/dart/gui/osg/detail/CameraModeCallback.cpp b/dart/gui/osg/detail/CameraModeCallback.cpp index 7030c894dd6cb..6905decc8044a 100644 --- a/dart/gui/osg/detail/CameraModeCallback.cpp +++ b/dart/gui/osg/detail/CameraModeCallback.cpp @@ -131,8 +131,7 @@ void CameraModeCallback::setCameraMode(CameraMode mode) if (mode != CameraMode::RGBA && mode != CameraMode::DEPTH) { DART_WARN( - "Unsupported camera mode '{}'. Use RGBA or DEPTH.", - static_cast(mode)); + "Unsupported camera mode '{}'. Use RGBA or DEPTH.", toString(mode)); return; } From 284772fc466b18bde0ceeb74b15b2de87d65c380 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 4 Jan 2024 16:09:53 -0800 Subject: [PATCH 07/10] Fix build with urdfdom 4.0.0 (#1779) Signed-off-by: Steve Peters --- dart/utils/urdf/urdf_world_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/utils/urdf/urdf_world_parser.cpp b/dart/utils/urdf/urdf_world_parser.cpp index 6f88280fd2a5b..0bc0aa350855a 100644 --- a/dart/utils/urdf/urdf_world_parser.cpp +++ b/dart/utils/urdf/urdf_world_parser.cpp @@ -216,7 +216,7 @@ std::shared_ptr parseWorldURDF( auto* origin = entity_xml->FirstChildElement("origin"); if (origin) { - if (!parsePose(entity.origin, origin)) + if (!urdf_parsing::parsePose(entity.origin, origin)) { dtwarn << "[ERROR] Missing origin tag for '" << entity.model->getName() << "'\n"; From 5d5f357221f079cd0a95e93e0c61aac2ccda851f Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 4 Jan 2024 16:12:16 -0800 Subject: [PATCH 08/10] Bump version to 6.13.1 Signed-off-by: Jeongseok (JS) Lee --- package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 9562c8582caf6..40671cbfad402 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ a Catkin workspace. Catkin is not required to build DART. For more information, see: http://ros.org/reps/rep-0136.html --> dartsim - 6.13.0 + 6.13.1 DART (Dynamic Animation and Robotics Toolkit) is a collaborative, cross-platform, open source library created by the Georgia Tech Graphics From e64f433eac575d47a7edef4768128abd7ebd78a6 Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 4 Jan 2024 16:22:47 -0800 Subject: [PATCH 09/10] Update CHANGELOG.md for 6.13.1 release Signed-off-by: Jeongseok (JS) Lee --- CHANGELOG.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18d70a7aa145e..448868fa39e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ ## DART 6 +### [DART 6.13.1 (2024-01-04)](https://github.com/dartsim/dart/milestone/74?closed=1) + +* Tested Platforms + + * Ubuntu Focal on amd64 / GCC 9.4 / amd64 + * Ubuntu Jammy on amd64 / GCC 11.3 / amd64 + * macOS 12 (Monterey) / Clang 14 / amd64 + * Windows / MSVC 19.37 / amd64 + +* Dependency + + * Added required dependencies: fmt + * Added optional dependencies: spdlog + * Removed required dependencies: Boost + +* Build + + * Fixed build with urdfdom 4.0.0: [#1779](https://github.com/dartsim/dart/pull/1779) + * Fixed invalid array access in moving skeleton subtree: [#1778](https://github.com/dartsim/dart/pull/1778) + +* Dynamic + + * Fixed joint not recovering after reaching position limits in servo mode: [#1774](https://github.com/dartsim/dart/pull/1774) + ### [DART 6.13.0 (2022-12-31)](https://github.com/dartsim/dart/milestone/69?closed=1) * Supported Platforms From de55276f6932ad13e0d433c6a68e6e0ded2bdb0c Mon Sep 17 00:00:00 2001 From: "Jeongseok (JS) Lee" Date: Thu, 4 Jan 2024 16:35:30 -0800 Subject: [PATCH 10/10] Update CHANGELOG.md Signed-off-by: Jeongseok (JS) Lee --- CHANGELOG.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 448868fa39e46..6e83c75ee80b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,18 +9,12 @@ * macOS 12 (Monterey) / Clang 14 / amd64 * Windows / MSVC 19.37 / amd64 -* Dependency - - * Added required dependencies: fmt - * Added optional dependencies: spdlog - * Removed required dependencies: Boost - * Build * Fixed build with urdfdom 4.0.0: [#1779](https://github.com/dartsim/dart/pull/1779) * Fixed invalid array access in moving skeleton subtree: [#1778](https://github.com/dartsim/dart/pull/1778) -* Dynamic +* Dynamics * Fixed joint not recovering after reaching position limits in servo mode: [#1774](https://github.com/dartsim/dart/pull/1774)