Skip to content

Commit

Permalink
Merge branch '6.13/build_mode_flag'
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 24, 2024
2 parents a5b2b79 + 9059a19 commit 383140b
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 34 deletions.
2 changes: 1 addition & 1 deletion dart/collision/Option.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma message( \
"This header has been deprecated in DART 6.1. " \
"Please include CollisionOption.hpp intead.")
"Please include CollisionOption.hpp instead.")

#include <dart/collision/CollisionOption.hpp>

Expand Down
2 changes: 1 addition & 1 deletion dart/collision/Result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma message( \
"This header has been deprecated in DART 6.1. " \
"Please include CollisionResult.hpp intead.")
"Please include CollisionResult.hpp instead.")

#include <dart/collision/CollisionResult.hpp>

Expand Down
2 changes: 2 additions & 0 deletions dart/common/MemoryAllocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#ifndef DART_COMMON_MEMORYALLOCATOR_HPP_
#define DART_COMMON_MEMORYALLOCATOR_HPP_

#include <dart/config.hpp>

#include <dart/common/Castable.hpp>

#include <iostream>
Expand Down
2 changes: 2 additions & 0 deletions dart/constraint/ConstrainedGroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#ifndef DART_CONSTRAINT_CONSTRAINEDGROUP_HPP_
#define DART_CONSTRAINT_CONSTRAINEDGROUP_HPP_

#include <dart/config.hpp>

#include <dart/constraint/SmartPointer.hpp>

#include <Eigen/Dense>
Expand Down
4 changes: 2 additions & 2 deletions dart/constraint/DantzigLCPSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace dart {
namespace constraint {

/// \deprecated This header has been deprecated in DART 6.7. Please include
/// DantzigBoxedLcpSolver.hpp intead.
/// DantzigBoxedLcpSolver.hpp instead.
///
/// DantzigLCPSolver is a LCP solver that uses ODE's implementation of Dantzig
/// algorithm
Expand All @@ -64,7 +64,7 @@ class DantzigLCPSolver : public LCPSolver
/// Return true if the matrix is symmetric
bool isSymmetric(std::size_t _n, double* _A);

/// Return true if the diagonla block of matrix is symmetric
/// Return true if the diagonal block of matrix is symmetric
bool isSymmetric(
std::size_t _n, double* _A, std::size_t _begin, std::size_t _end);

Expand Down
6 changes: 2 additions & 4 deletions dart/constraint/JointConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,7 @@ void JointConstraint::getInformation(ConstraintInfo* lcp)
continue;

#if DART_BUILD_MODE_DEBUG
if (std::abs(lcp->w[index]) > 1e-6)
{
if (std::abs(lcp->w[index]) > 1e-6) {
dterr << "Invalid " << index
<< "-th slack variable. Expected: 0.0. Actual: " << lcp->w[index]
<< ".\n";
Expand All @@ -389,8 +388,7 @@ void JointConstraint::getInformation(ConstraintInfo* lcp)
lcp->hi[index] = mImpulseUpperBound[i];

#if DART_BUILD_MODE_DEBUG
if (lcp->findex[index] != -1)
{
if (lcp->findex[index] != -1) {
dterr << "Invalid " << index
<< "-th friction index. Expected: -1. Actual: "
<< lcp->findex[index] << ".\n";
Expand Down
2 changes: 1 addition & 1 deletion dart/constraint/PGSLCPSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class PGSLCPSolver : public LCPSolver
/// Return true if the matrix is symmetric
bool isSymmetric(std::size_t _n, double* _A);

/// Return true if the diagonla block of matrix is symmetric
/// Return true if the diagonal block of matrix is symmetric
bool isSymmetric(
std::size_t _n, double* _A, std::size_t _begin, std::size_t _end);

Expand Down
2 changes: 1 addition & 1 deletion dart/dynamics/MultiSphereShape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma message( \
"This header has been deprecated in DART 6.2. " \
"Please include MultiSphereConvexHullShape.hpp intead.")
"Please include MultiSphereConvexHullShape.hpp instead.")

#include <dart/dynamics/MultiSphereConvexHullShape.hpp>

Expand Down
6 changes: 2 additions & 4 deletions dart/dynamics/Skeleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2156,10 +2156,8 @@ void Skeleton::registerBodyNode(BodyNode* _newBodyNode)
updateCacheDimensions(_newBodyNode->mTreeIndex);

#if DART_BUILD_MODE_DEBUG
for (std::size_t i = 0; i < mSkelCache.mBodyNodes.size(); ++i)
{
if (mSkelCache.mBodyNodes[i]->mIndexInSkeleton != i)
{
for (std::size_t i = 0; i < mSkelCache.mBodyNodes.size(); ++i) {
if (mSkelCache.mBodyNodes[i]->mIndexInSkeleton != i) {
dterr << "[Skeleton::registerBodyNode] BodyNode named ["
<< mSkelCache.mBodyNodes[i]->getName() << "] in Skeleton ["
<< getName() << "] is mistaken about its index in the Skeleton ( "
Expand Down
2 changes: 1 addition & 1 deletion dart/utils/urdf/URDFTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#pragma message( \
"This header has been deprecated in DART 6.2. " \
"Please include dart/utils/urdf/BackwardCompatibility.hpp intead.")
"Please include dart/utils/urdf/BackwardCompatibility.hpp instead.")

#include <dart/utils/urdf/BackwardCompatibility.hpp>

Expand Down
29 changes: 10 additions & 19 deletions tests/integration/test_Dynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2020,8 +2020,7 @@ void DynamicsTest::testCenterOfMassFreeFall(const common::Uri& uri)

auto dof = skel->getNumDofs();

if (nullptr == rootFreeJoint || !skel->isMobile() || 0 == dof)
{
if (nullptr == rootFreeJoint || !skel->isMobile() || 0 == dof) {
#if DART_BUILD_MODE_DEBUG
dtmsg << "Skipping COM free fall test for Skeleton [" << skel->getName()
<< "] since the Skeleton doesn't have FreeJoint at the root body "
Expand Down Expand Up @@ -2260,8 +2259,7 @@ void DynamicsTest::testImpulseBasedDynamics(const common::Uri& uri)
//==============================================================================
TEST_F(DynamicsTest, testJacobians)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2272,8 +2270,7 @@ TEST_F(DynamicsTest, testJacobians)
//==============================================================================
TEST_F(DynamicsTest, testFiniteDifference)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2286,8 +2283,7 @@ TEST_F(DynamicsTest, testFiniteDifference)
//==============================================================================
TEST_F(DynamicsTest, testForwardKinematics)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2298,8 +2294,7 @@ TEST_F(DynamicsTest, testForwardKinematics)
//==============================================================================
TEST_F(DynamicsTest, testInverseDynamics)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand Down Expand Up @@ -2336,8 +2331,7 @@ TEST_F(DynamicsTest, compareEquationsOfMotion)
//==============================================================================
TEST_F(DynamicsTest, testCenterOfMass)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2348,8 +2342,7 @@ TEST_F(DynamicsTest, testCenterOfMass)
//==============================================================================
TEST_F(DynamicsTest, testCenterOfMassFreeFall)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2360,8 +2353,7 @@ TEST_F(DynamicsTest, testCenterOfMassFreeFall)
//==============================================================================
TEST_F(DynamicsTest, testConstraintImpulse)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2372,8 +2364,7 @@ TEST_F(DynamicsTest, testConstraintImpulse)
//==============================================================================
TEST_F(DynamicsTest, testImpulseBasedDynamics)
{
for (std::size_t i = 0; i < getList().size(); ++i)
{
for (std::size_t i = 0; i < getList().size(); ++i) {
#if DART_BUILD_MODE_DEBUG
dtdbg << getList()[i].toString() << std::endl;
#endif
Expand All @@ -2386,7 +2377,7 @@ TEST_F(DynamicsTest, HybridDynamics)
{
const double tol = 1e-8;
const double timeStep = 1e-3;
#if DART_BUILD_MODE_DEBUG
#if DART_BUILD_MODE_DEBUG
const std::size_t numFrames = 50; // 0.05 secs
#else
const std::size_t numFrames = 5e+3; // 5 secs
Expand Down

0 comments on commit 383140b

Please sign in to comment.