From 989aaaeb72b7349e1c9c8c9dc539db415a238bdd Mon Sep 17 00:00:00 2001 From: "Dr. Denis" Date: Thu, 25 Jan 2024 18:07:41 +0100 Subject: [PATCH] [Format] Correct formatting of JointLimits URDF file. (#1339) --- .../joint_limits/joint_limits_urdf.hpp | 6 +++--- joint_limits/test/joint_limits_urdf_test.cpp | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/joint_limits/include/joint_limits/joint_limits_urdf.hpp b/joint_limits/include/joint_limits/joint_limits_urdf.hpp index daa0d707d8..cdcbaf9c9d 100644 --- a/joint_limits/include/joint_limits/joint_limits_urdf.hpp +++ b/joint_limits/include/joint_limits/joint_limits_urdf.hpp @@ -14,8 +14,8 @@ /// \author Adolfo Rodriguez Tsouroukdissian -#ifndef JOINT_LIMITS_URDF_HPP -#define JOINT_LIMITS_URDF_HPP +#ifndef JOINT_LIMITS__JOINT_LIMITS_URDF_HPP_ +#define JOINT_LIMITS__JOINT_LIMITS_URDF_HPP_ #include "joint_limits/joint_limits.hpp" #include "urdf_model/joint.h" @@ -82,4 +82,4 @@ inline bool getSoftJointLimits(urdf::JointConstSharedPtr urdf_joint, SoftJointLi return true; } } // namespace joint_limits -#endif // JOINT_LIMITS_URDF_HPP +#endif // JOINT_LIMITS__JOINT_LIMITS_URDF_HPP_ diff --git a/joint_limits/test/joint_limits_urdf_test.cpp b/joint_limits/test/joint_limits_urdf_test.cpp index 27d660afd7..562293d475 100644 --- a/joint_limits/test/joint_limits_urdf_test.cpp +++ b/joint_limits/test/joint_limits_urdf_test.cpp @@ -17,7 +17,6 @@ #include "gtest/gtest.h" using std::string; -using namespace joint_limits; class JointLimitsUrdfTest : public ::testing::Test { @@ -53,14 +52,14 @@ TEST_F(JointLimitsUrdfTest, GetJointLimits) { // Unset URDF joint { - JointLimits limits; + joint_limits::JointLimits limits; urdf::JointSharedPtr urdf_joint_bad; EXPECT_FALSE(getJointLimits(urdf_joint_bad, limits)); } // Unset URDF limits { - JointLimits limits; + joint_limits::JointLimits limits; urdf::JointSharedPtr urdf_joint_bad(new urdf::Joint); EXPECT_FALSE(getJointLimits(urdf_joint_bad, limits)); } @@ -69,7 +68,7 @@ TEST_F(JointLimitsUrdfTest, GetJointLimits) { urdf_joint->type = urdf::Joint::CONTINUOUS; - JointLimits limits; + joint_limits::JointLimits limits; EXPECT_TRUE(getJointLimits(urdf_joint, limits)); // Position @@ -92,7 +91,7 @@ TEST_F(JointLimitsUrdfTest, GetJointLimits) { urdf_joint->type = urdf::Joint::REVOLUTE; - JointLimits limits; + joint_limits::JointLimits limits; EXPECT_TRUE(getJointLimits(urdf_joint, limits)); // Position @@ -117,7 +116,7 @@ TEST_F(JointLimitsUrdfTest, GetJointLimits) { urdf_joint->type = urdf::Joint::PRISMATIC; - JointLimits limits; + joint_limits::JointLimits limits; EXPECT_TRUE(getJointLimits(urdf_joint, limits)); // Position @@ -141,25 +140,23 @@ TEST_F(JointLimitsUrdfTest, GetJointLimits) TEST_F(JointLimitsUrdfTest, GetSoftJointLimits) { - using namespace joint_limits; - // Unset URDF joint { - SoftJointLimits soft_limits; + joint_limits::SoftJointLimits soft_limits; urdf::JointSharedPtr urdf_joint_bad; EXPECT_FALSE(getSoftJointLimits(urdf_joint_bad, soft_limits)); } // Unset URDF limits { - SoftJointLimits soft_limits; + joint_limits::SoftJointLimits soft_limits; urdf::JointSharedPtr urdf_joint_bad(new urdf::Joint); EXPECT_FALSE(getSoftJointLimits(urdf_joint_bad, soft_limits)); } // Valid URDF joint { - SoftJointLimits soft_limits; + joint_limits::SoftJointLimits soft_limits; EXPECT_TRUE(getSoftJointLimits(urdf_joint, soft_limits)); // Soft limits