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 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 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 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 18d70a7aa145e..6e83c75ee80b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ ## 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 + +* 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) + +* Dynamics + + * 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 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); 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; } 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"; 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