From 5dd0d5e63c9dae08976656cb1c8473ca7a34c058 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 11:42:58 -0600 Subject: [PATCH] PRBT IkFast patch from robostack (#2395) (#2397) (cherry picked from commit bd45079ef9902e2760f8196230c17a0992199833) Co-authored-by: Tyler Weaver --- .../src/prbt_manipulator_ikfast_moveit_plugin.cpp | 4 ++-- .../src/prbt_manipulator_ikfast_solver.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp index a0143f8fa1..ce2497a571 100644 --- a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp +++ b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp @@ -804,12 +804,12 @@ bool IKFastKinematicsPlugin::getPositionFK(const std::vector& link_ return false; } - IkReal angles[num_joints_]; + std::vector angles(num_joints_, 0); for (unsigned char i = 0; i < num_joints_; i++) angles[i] = joint_angles[i]; // IKFast56/61 - ComputeFk(angles, eetrans, eerot); + ComputeFk(angles.data(), eetrans, eerot); for (int i = 0; i < 3; ++i) p_out.p.data[i] = eetrans[i]; diff --git a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp index b22d0f73d8..53cb3bfda7 100644 --- a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp +++ b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp @@ -26,8 +26,7 @@ using namespace ikfast; // check if the included ikfast version matches what this file was compiled with -#define IKFAST_COMPILE_ASSERT(x) extern int __dummy[static_cast(x)] -IKFAST_COMPILE_ASSERT(IKFAST_VERSION==0x1000004a); +static_assert(IKFAST_VERSION==61); // version found in ikfast.h #include #include