Skip to content

Commit

Permalink
[Format] Correct formatting of JointLimits URDF file. (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Jan 25, 2024
1 parent 207f496 commit 989aaae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions joint_limits/include/joint_limits/joint_limits_urdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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_
19 changes: 8 additions & 11 deletions joint_limits/test/joint_limits_urdf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "gtest/gtest.h"

using std::string;
using namespace joint_limits;

class JointLimitsUrdfTest : public ::testing::Test
{
Expand Down Expand Up @@ -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));
}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 989aaae

Please sign in to comment.