diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a84a7c5..f73e12f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,12 +2,12 @@ ci: autoupdate_branch: 'devel' repos: - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v16.0.6 + rev: v21.1.2 hooks: - id: clang-format args: [--style=Google] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -24,12 +24,12 @@ repos: - id: fix-byte-order-marker - id: mixed-line-ending - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 23.3.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.9.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.3.0 hooks: - id: flake8 - repo: https://github.com/cheshirekow/cmake-format-precommit diff --git a/include/sot/dynamic-pinocchio/dynamic-pinocchio.h b/include/sot/dynamic-pinocchio/dynamic-pinocchio.h index 6eb0130..4e4448c 100644 --- a/include/sot/dynamic-pinocchio/dynamic-pinocchio.h +++ b/include/sot/dynamic-pinocchio/dynamic-pinocchio.h @@ -66,9 +66,9 @@ namespace command { class SetFile; class CreateOpPoint; } // namespace command - /* --------------------------------------------------------------------- */ - /* --- CLASS ----------------------------------------------------------- */ - /* --------------------------------------------------------------------- */ +/* --------------------------------------------------------------------- */ +/* --- CLASS ----------------------------------------------------------- */ +/* --------------------------------------------------------------------- */ /*! @ingroup signals \brief This class provides an inverse dynamic model of the robot. diff --git a/tests/test_djj.cpp b/tests/test_djj.cpp index 6627221..577d27a 100644 --- a/tests/test_djj.cpp +++ b/tests/test_djj.cpp @@ -16,7 +16,7 @@ using namespace std; using namespace dynamicsJRLJapan; /* --- DISPLAY TREE --------------------------------------------------------- */ -void RecursiveDisplayOfJoints(const CjrlJoint *aJoint) { +void RecursiveDisplayOfJoints(const CjrlJoint* aJoint) { if (aJoint == 0) return; int NbChildren = aJoint->countChildJoints(); cout << " rank : " << aJoint->rankInConfiguration() << endl; @@ -26,8 +26,8 @@ void RecursiveDisplayOfJoints(const CjrlJoint *aJoint) { } } -void DisplayDynamicRobotInformation(CjrlDynamicRobot *aDynamicRobot) { - std::vector aVec = aDynamicRobot->jointVector(); +void DisplayDynamicRobotInformation(CjrlDynamicRobot* aDynamicRobot) { + std::vector aVec = aDynamicRobot->jointVector(); int r = aVec.size(); cout << "Number of joints :" << r << endl; for (int i = 0; i < r; i++) { @@ -48,7 +48,7 @@ void DisplayMatrix(MAL_MATRIX(&aJ, double)) { } /* --- DISPLAY MASS PROPERTIES OF A CHAIN --- */ -void GoDownTree(const CjrlJoint *startJoint) { +void GoDownTree(const CjrlJoint* startJoint) { cout << "Mass-inertie property of joint ranked :" << startJoint->rankInConfiguration() << endl; cout << "Mass of the body: " << startJoint->linkedBody()->mass() << endl; @@ -57,7 +57,7 @@ void GoDownTree(const CjrlJoint *startJoint) { cout << startJoint->currentTransformation() << endl; if (startJoint->countChildJoints() != 0) { - const CjrlJoint *childJoint = startJoint->childJoint(0); + const CjrlJoint* childJoint = startJoint->childJoint(0); GoDownTree(childJoint); } } @@ -65,7 +65,7 @@ void GoDownTree(const CjrlJoint *startJoint) { /* --- MAIN ----------------------------------------------------------------- */ /* --- MAIN ----------------------------------------------------------------- */ /* --- MAIN ----------------------------------------------------------------- */ -int main(int argc, char *argv[]) { +int main(int argc, char* argv[]) { if (argc != 4) { cerr << " This program takes 3 arguments: " << endl; cerr << "./TestHumanoidDynamicRobot PATH_TO_VRML_FILE " @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) { /* ------------------------------------------------------------------------ */ dynamicsJRLJapan::ObjectFactory aRobotDynamicsObjectConstructor; - CjrlHumanoidDynamicRobot *aHDR = + CjrlHumanoidDynamicRobot* aHDR = aRobotDynamicsObjectConstructor.createHumanoidDynamicRobot(); // DynamicMultiBody * aDMB @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) { /* ------------------------------------------------------------------------ */ // Display tree of the joints. - CjrlJoint *rootJoint = aHDR->rootJoint(); + CjrlJoint* rootJoint = aHDR->rootJoint(); RecursiveDisplayOfJoints(rootJoint); // Test the computation of the jacobian. @@ -151,8 +151,8 @@ int main(int argc, char *argv[]) { cout << "Rank of the left hand " << endl; cout << aHDR->leftWrist()->rankInConfiguration() << endl; - vector aVec = aHDR->jointVector(); - CjrlJoint *aJoint = aVec[22]; + vector aVec = aHDR->jointVector(); + CjrlJoint* aJoint = aVec[22]; aJoint->computeJacobianJointWrtConfig(); MAL_MATRIX(aJ, double); aJ = aJoint->jacobianJointWrtConfig(); diff --git a/tests/test_results.cpp b/tests/test_results.cpp index 3d0e7bf..7eda734 100644 --- a/tests/test_results.cpp +++ b/tests/test_results.cpp @@ -28,7 +28,7 @@ namespace djj = dynamicsJRLJapan; using namespace std; -int main(int argc, char *argv[]) { +int main(int argc, char* argv[]) { if (argc != 6) { cerr << " This program takes 4 arguments: " << endl; cerr << "./TestHumanoidDynamicRobot PATH_TO_VRML_FILE VRML_FILE_NAME " @@ -45,14 +45,14 @@ int main(int argc, char *argv[]) { string aMapFromJointToRank = argv[4]; dynamicsJRLJapan::ObjectFactory aRobotDynamicsObjectConstructor; - CjrlHumanoidDynamicRobot *aHDR = + CjrlHumanoidDynamicRobot* aHDR = aRobotDynamicsObjectConstructor.createHumanoidDynamicRobot(); string RobotFileName = aPath + aName; dynamicsJRLJapan::parseOpenHRPVRMLFile( *aHDR, RobotFileName, aMapFromJointToRank, aSpecificitiesFileName); - CjrlHumanoidDynamicRobot *aHDR2 = + CjrlHumanoidDynamicRobot* aHDR2 = aRobotDynamicsObjectConstructor.createHumanoidDynamicRobot(); // cout << "aHDMB2 Finished the initialization"<< endl; dynamicsJRLJapan::parseOpenHRPVRMLFile(