From d17f2eb9dee2c0ed7ad45efcbeb139c32543c177 Mon Sep 17 00:00:00 2001 From: Roelof Oomen Date: Wed, 19 Jul 2023 12:15:26 +0200 Subject: [PATCH 1/2] - ManipulatorInfo constructor now accepts tcp_offset as variant to match data member. - Fixed typos in rep and rop factories. --- tesseract_common/include/tesseract_common/manipulator_info.h | 2 +- tesseract_common/src/manipulator_info.cpp | 2 +- tesseract_kinematics/core/src/rep_factory.cpp | 2 +- tesseract_kinematics/core/src/rop_factory.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tesseract_common/include/tesseract_common/manipulator_info.h b/tesseract_common/include/tesseract_common/manipulator_info.h index 0dd1ffede10..4215bb80daa 100644 --- a/tesseract_common/include/tesseract_common/manipulator_info.h +++ b/tesseract_common/include/tesseract_common/manipulator_info.h @@ -49,7 +49,7 @@ struct ManipulatorInfo ManipulatorInfo(std::string manipulator_, std::string working_frame_, std::string tcp_frame_, - const Eigen::Isometry3d& tcp_offset_ = Eigen::Isometry3d::Identity()); + const std::variant& tcp_offset_ = Eigen::Isometry3d::Identity()); /** @brief Name of the manipulator group */ std::string manipulator; diff --git a/tesseract_common/src/manipulator_info.cpp b/tesseract_common/src/manipulator_info.cpp index 1ad93570ca8..2e173a881a9 100644 --- a/tesseract_common/src/manipulator_info.cpp +++ b/tesseract_common/src/manipulator_info.cpp @@ -41,7 +41,7 @@ namespace tesseract_common ManipulatorInfo::ManipulatorInfo(std::string manipulator_, std::string working_frame_, std::string tcp_frame_, - const Eigen::Isometry3d& tcp_offset_) + const std::variant& tcp_offset_) : manipulator(std::move(manipulator_)) , working_frame(std::move(working_frame_)) , tcp_frame(std::move(tcp_frame_)) diff --git a/tesseract_kinematics/core/src/rep_factory.cpp b/tesseract_kinematics/core/src/rep_factory.cpp index 867435417d6..ff1ed85bb3e 100644 --- a/tesseract_kinematics/core/src/rep_factory.cpp +++ b/tesseract_kinematics/core/src/rep_factory.cpp @@ -153,7 +153,7 @@ InverseKinematics::UPtr REPInvKinFactory::create(const std::string& solver_name, inv_kin = plugin_factory.createInvKin(m_info.class_name, m_info, scene_graph, scene_state); if (inv_kin == nullptr) - throw std::runtime_error("REPInvKinFactory, failed to create positioner forward kinematics!"); + throw std::runtime_error("REPInvKinFactory, failed to create positioner inverse kinematics!"); } else { diff --git a/tesseract_kinematics/core/src/rop_factory.cpp b/tesseract_kinematics/core/src/rop_factory.cpp index 77c73382b9a..fa91616096f 100644 --- a/tesseract_kinematics/core/src/rop_factory.cpp +++ b/tesseract_kinematics/core/src/rop_factory.cpp @@ -154,7 +154,7 @@ InverseKinematics::UPtr ROPInvKinFactory::create(const std::string& solver_name, inv_kin = plugin_factory.createInvKin(m_info.class_name, m_info, scene_graph, scene_state); if (inv_kin == nullptr) - throw std::runtime_error("ROPInvKinFactory, failed to create positioner forward kinematics!"); + throw std::runtime_error("ROPInvKinFactory, failed to create positioner inverse kinematics!"); } else { From db262174b6796cf551e7aca3cae24b4033e694f0 Mon Sep 17 00:00:00 2001 From: Roelof Oomen Date: Fri, 21 Jul 2023 07:38:08 +0200 Subject: [PATCH 2/2] clang-tidy --- tesseract_common/include/tesseract_common/manipulator_info.h | 2 +- tesseract_common/src/manipulator_info.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tesseract_common/include/tesseract_common/manipulator_info.h b/tesseract_common/include/tesseract_common/manipulator_info.h index 4215bb80daa..70afda1fe23 100644 --- a/tesseract_common/include/tesseract_common/manipulator_info.h +++ b/tesseract_common/include/tesseract_common/manipulator_info.h @@ -49,7 +49,7 @@ struct ManipulatorInfo ManipulatorInfo(std::string manipulator_, std::string working_frame_, std::string tcp_frame_, - const std::variant& tcp_offset_ = Eigen::Isometry3d::Identity()); + std::variant tcp_offset_ = Eigen::Isometry3d::Identity()); /** @brief Name of the manipulator group */ std::string manipulator; diff --git a/tesseract_common/src/manipulator_info.cpp b/tesseract_common/src/manipulator_info.cpp index 2e173a881a9..b1538ae937c 100644 --- a/tesseract_common/src/manipulator_info.cpp +++ b/tesseract_common/src/manipulator_info.cpp @@ -41,11 +41,11 @@ namespace tesseract_common ManipulatorInfo::ManipulatorInfo(std::string manipulator_, std::string working_frame_, std::string tcp_frame_, - const std::variant& tcp_offset_) + std::variant tcp_offset_) : manipulator(std::move(manipulator_)) , working_frame(std::move(working_frame_)) , tcp_frame(std::move(tcp_frame_)) - , tcp_offset(tcp_offset_) + , tcp_offset(std::move(tcp_offset_)) { }