Commit 7ea3f207 authored by Jordan Lack's avatar Jordan Lack

Merge branch 'feature/RDL-92' of gitlab.com:jlack/rdl into feature/RDL-118

parents 627f9539 649504cb
Pipeline #60824112 (#933) skipped
......@@ -23,8 +23,7 @@ SET ( RDL_SOURCES
src/SpatialAcceleration.cpp
src/MotionVector.cpp
src/FrameObject.cpp
src/RigidBodyInertia.cpp
include/rdl_dynamics/types.hpp)
src/RigidBodyInertia.cpp)
include_directories( ${INCLUDES_DIR} ${EIGEN3_INCLUDE_DIR})
......
......@@ -112,6 +112,7 @@ class ReferenceFrame : public std::enable_shared_from_this<ReferenceFrame>
* @param movableBodyId The ID of the movable body this frame is attached to. For frames attached to fixed bodies, this
**should be FixedBody::mMovableParent
*/
// cppcheck-suppress passedByValue
ReferenceFrame(const std::string& frameName, ReferenceFramePtr parentFrame, const RobotDynamics::Math::SpatialTransform& transformFromParent, bool isBodyFrame,
unsigned int movableBodyId)
: frameName(frameName)
......@@ -177,6 +178,7 @@ class ReferenceFrame : public std::enable_shared_from_this<ReferenceFrame>
* @param transformToPack Resulting transform to the desired frame will be stored here
* @param desiredFrame The resulting transform will transform vectors into desiredFrame
*/
// cppcheck-suppress passedByValue
inline void getTransformToDesiredFrame(RobotDynamics::Math::SpatialTransform& transformToPack, ReferenceFramePtr desiredFrame)
{
transformToPack = getTransformToDesiredFrame(desiredFrame);
......@@ -378,6 +380,7 @@ class ReferenceFrame : public std::enable_shared_from_this<ReferenceFrame>
class FixedReferenceFrame : public ReferenceFrame
{
public:
// cppcheck-suppress passedByValue
FixedReferenceFrame(const std::string& frameName, ReferenceFramePtr parentFrame, const RobotDynamics::Math::SpatialTransform& transformFromParent,
unsigned int movableBodyId)
: ReferenceFrame(frameName, parentFrame, transformFromParent, false, movableBodyId)
......
......@@ -71,9 +71,9 @@ TEST_F(UrdfReaderTests, testFirstJointFixedNonTrivialTransform)
ASSERT_EQ(model.qdot_size, 1);
RobotDynamics::updateKinematics(model, q, qdot, qddot);
RobotDynamics::ReferenceFrame* frame = model.bodyFrameMap["j1_link"];
RobotDynamics::ReferenceFramePtr frame = model.referenceFrameMap["j1_link"];
EXPECT_TRUE(model.bodyFrameMap["j1_link"]->getInverseTransformToRoot().r.isApprox(RobotDynamics::Math::Vector3d(0.0, 0.16, 0.8377), 1e-4));
EXPECT_TRUE(model.referenceFrameMap["j1_link"]->getInverseTransformToRoot().r.isApprox(RobotDynamics::Math::Vector3d(0.0, 0.16, 0.8377), 1e-4));
}
TEST_F(UrdfReaderTests, testFixedArm)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment