test_cartesian_interpolator.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2019, PickNik LLC.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the PickNik nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Michael Lautman */
36 
42 
43 using namespace moveit::core;
44 
45 class SimpleRobot : public testing::Test
46 {
47 protected:
48  void SetUp() override
49  {
50  RobotModelBuilder builder("simple", "a");
51  builder.addChain("a->b", "continuous");
52  builder.addChain("b->c", "prismatic");
53  builder.addGroupChain("a", "c", "group");
54  robot_model_ = builder.build();
55  }
56 
57  void TearDown() override
58  {
59  }
60 
61 protected:
62  RobotModelConstPtr robot_model_;
63 
64  static std::size_t generateTestTraj(std::vector<std::shared_ptr<RobotState>>& traj,
65  const RobotModelConstPtr& robot_model_);
66 };
67 
68 std::size_t SimpleRobot::generateTestTraj(std::vector<std::shared_ptr<RobotState>>& traj,
69  const RobotModelConstPtr& robot_model_)
70 {
71  traj.clear();
72 
73  std::shared_ptr<RobotState> robot_state(new RobotState(robot_model_));
74  robot_state->setToDefaultValues();
75  double ja, jc;
76 
77  // 3 waypoints with default joints
78  for (std::size_t traj_ix = 0; traj_ix < 3; ++traj_ix)
79  {
80  traj.push_back(std::make_shared<RobotState>(*robot_state));
81  }
82 
83  ja = robot_state->getVariablePosition("a-b-joint"); // revolute joint
84  jc = robot_state->getVariablePosition("b-c-joint"); // prismatic joint
85 
86  // 4th waypoint with a small jump of 0.01 in revolute joint and prismatic joint. This should not be considered a jump
87  ja = ja - 0.01;
88  robot_state->setVariablePosition("a-b-joint", ja);
89  jc = jc - 0.01;
90  robot_state->setVariablePosition("b-c-joint", jc);
91  traj.push_back(std::make_shared<RobotState>(*robot_state));
92 
93  // 5th waypoint with a large jump of 1.01 in first revolute joint
94  ja = ja + 1.01;
95  robot_state->setVariablePosition("a-b-joint", ja);
96  traj.push_back(std::make_shared<RobotState>(*robot_state));
97 
98  // 6th waypoint with a large jump of 1.01 in first prismatic joint
99  jc = jc + 1.01;
100  robot_state->setVariablePosition("b-c-joint", jc);
101  traj.push_back(std::make_shared<RobotState>(*robot_state));
102 
103  // 7th waypoint with no jump
104  traj.push_back(std::make_shared<RobotState>(*robot_state));
105 
106  return traj.size();
107 }
108 
109 TEST_F(SimpleRobot, testGenerateTrajectory)
110 {
111  std::vector<std::shared_ptr<RobotState>> traj;
112 
113  // The full trajectory should be of length 7
114  const std::size_t expected_full_traj_len = 7;
115 
116  // Generate a test trajectory
117  std::size_t full_traj_len = generateTestTraj(traj, robot_model_);
118 
119  // Test the generateTestTraj still generates a trajectory of length 7
120  EXPECT_EQ(full_traj_len, expected_full_traj_len); // full traj should be 7 waypoints long
121 }
122 
123 TEST_F(SimpleRobot, checkAbsoluteJointSpaceJump)
124 {
125  const JointModelGroup* joint_model_group = robot_model_->getJointModelGroup("group");
126  std::vector<std::shared_ptr<RobotState>> traj;
127 
128  // A revolute joint jumps 1.01 at the 5th waypoint and a prismatic joint jumps 1.01 at the 6th waypoint
129  const std::size_t expected_revolute_jump_traj_len = 4;
130  const std::size_t expected_prismatic_jump_traj_len = 5;
131 
132  // Pre-compute expected results for tests
133  std::size_t full_traj_len = generateTestTraj(traj, robot_model_);
134  const double expected_revolute_jump_fraction = (double)expected_revolute_jump_traj_len / (double)full_traj_len;
135  const double expected_prismatic_jump_fraction = (double)expected_prismatic_jump_traj_len / (double)full_traj_len;
136 
137  // Container for results
138  double fraction;
139 
140  // Direct call of absolute version
141  fraction = CartesianInterpolator::checkAbsoluteJointSpaceJump(joint_model_group, traj, 1.0, 1.0);
142  EXPECT_EQ(expected_revolute_jump_traj_len, traj.size()); // traj should be cut
143  EXPECT_NEAR(expected_revolute_jump_fraction, fraction, 0.01);
144 
145  // Indirect call using checkJointSpaceJumps
146  generateTestTraj(traj, robot_model_);
147  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(1.0, 1.0));
148  EXPECT_EQ(expected_revolute_jump_traj_len, traj.size()); // traj should be cut before the revolute jump
149  EXPECT_NEAR(expected_revolute_jump_fraction, fraction, 0.01);
150 
151  // Test revolute joints
152  generateTestTraj(traj, robot_model_);
153  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(1.0, 0.0));
154  EXPECT_EQ(expected_revolute_jump_traj_len, traj.size()); // traj should be cut before the revolute jump
155  EXPECT_NEAR(expected_revolute_jump_fraction, fraction, 0.01);
156 
157  // Test prismatic joints
158  generateTestTraj(traj, robot_model_);
159  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(0.0, 1.0));
160  EXPECT_EQ(expected_prismatic_jump_traj_len, traj.size()); // traj should be cut before the prismatic jump
161  EXPECT_NEAR(expected_prismatic_jump_fraction, fraction, 0.01);
162 
163  // Ignore all absolute jumps
164  generateTestTraj(traj, robot_model_);
165  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(0.0, 0.0));
166  EXPECT_EQ(full_traj_len, traj.size()); // traj should not be cut
167  EXPECT_NEAR(1.0, fraction, 0.01);
168 }
169 
170 TEST_F(SimpleRobot, checkRelativeJointSpaceJump)
171 {
172  const JointModelGroup* joint_model_group = robot_model_->getJointModelGroup("group");
173  std::vector<std::shared_ptr<RobotState>> traj;
174 
175  // The first large jump of 1.01 occurs at the 5th waypoint so the test should trim the trajectory to length 4
176  const std::size_t expected_relative_jump_traj_len = 4;
177 
178  // Pre-compute expected results for tests
179  std::size_t full_traj_len = generateTestTraj(traj, robot_model_);
180  const double expected_relative_jump_fraction = (double)expected_relative_jump_traj_len / (double)full_traj_len;
181 
182  // Container for results
183  double fraction;
184 
185  // Direct call of relative version: 1.01 > 2.97 * (0.01 * 2 + 1.01 * 2)/6.
186  fraction = CartesianInterpolator::checkRelativeJointSpaceJump(joint_model_group, traj, 2.97);
187  EXPECT_EQ(expected_relative_jump_traj_len, traj.size()); // traj should be cut before the first jump of 1.01
188  EXPECT_NEAR(expected_relative_jump_fraction, fraction, 0.01);
189 
190  // Indirect call of relative version using checkJointSpaceJumps
191  generateTestTraj(traj, robot_model_);
192  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(2.97));
193  EXPECT_EQ(expected_relative_jump_traj_len, traj.size()); // traj should be cut before the first jump of 1.01
194  EXPECT_NEAR(expected_relative_jump_fraction, fraction, 0.01);
195 
196  // Trajectory should not be cut: 1.01 < 2.98 * (0.01 * 2 + 1.01 * 2)/6.
197  generateTestTraj(traj, robot_model_);
198  fraction = CartesianInterpolator::checkJointSpaceJump(joint_model_group, traj, JumpThreshold(2.98));
199  EXPECT_EQ(full_traj_len, traj.size()); // traj should not be cut
200  EXPECT_NEAR(1.0, fraction, 0.01);
201 }
202 
203 class PandaRobot : public testing::Test
204 {
205 protected:
206  static void SetUpTestSuite() // setup resources shared between tests
207  {
208  robot_model_ = loadTestingRobotModel("panda");
209  jmg_ = robot_model_->getJointModelGroup("panda_arm");
210  link_ = robot_model_->getLinkModel("panda_link8");
211  ASSERT_TRUE(link_);
212  loadIKPluginForGroup(jmg_, "panda_link0", link_->getName());
213  }
214 
215  static void TearDownTestSuite()
216  {
217  robot_model_.reset();
218  }
219 
220  void SetUp() override
221  {
222  start_state_ = std::make_shared<RobotState>(robot_model_);
223  ASSERT_TRUE(start_state_->setToDefaultValues(jmg_, "ready"));
224  start_pose_ = start_state_->getGlobalLinkTransform(link_);
225  }
226 
227  double computeCartesianPath(std::vector<std::shared_ptr<RobotState>>& result, const Eigen::Vector3d& translation,
228  bool global)
229  {
230  return CartesianInterpolator::computeCartesianPath(start_state_.get(), jmg_, result, link_, translation, global,
234  }
235  double computeCartesianPath(std::vector<std::shared_ptr<RobotState>>& result, const Eigen::Isometry3d& target,
236  bool global, const Eigen::Isometry3d& offset = Eigen::Isometry3d::Identity())
237  {
238  return CartesianInterpolator::computeCartesianPath(start_state_.get(), jmg_, result, link_, target, global,
239  MaxEEFStep(0.1), CartesianPrecision{ 0.01, 0.01 },
242  }
243 
244 protected:
245  static RobotModelPtr robot_model_;
247  static const LinkModel* link_;
248 
249  double prec_ = 1e-8;
250  RobotStatePtr start_state_;
251  Eigen::Isometry3d start_pose_;
252  std::vector<std::shared_ptr<RobotState>> result_;
253 };
254 RobotModelPtr PandaRobot::robot_model_;
256 const LinkModel* PandaRobot::link_ = nullptr;
257 
258 TEST_F(PandaRobot, testVectorGlobal)
259 {
260  Eigen::Vector3d translation(0.2, 0, 0); // move by 0.2 along world's x axis
261  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, translation, true), 0.2); // moved full distance of 0.2
262  // first pose of trajectory should be identical to start_pose
263  EXPECT_EIGEN_EQ(result_.front()->getGlobalLinkTransform(link_), start_pose_);
264  // last pose of trajectory should have same orientation, and offset of 0.2 along world's x-axis
265  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).linear(), start_pose_.linear(), prec_);
266  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(),
267  start_pose_.translation() + translation, prec_);
268 }
269 TEST_F(PandaRobot, testVectorLocal)
270 {
271  Eigen::Vector3d translation(0.2, 0, 0); // move by 0.2 along link's x axis
272  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, translation, false), 0.2); // moved full distance of 0.2
273  // first pose of trajectory should be identical to start_pose
274  EXPECT_EIGEN_EQ(result_.front()->getGlobalLinkTransform(link_), start_pose_);
275  // last pose of trajectory should have same orientation, and offset of 0.2 along link's x-axis
276  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).linear(), start_pose_.linear(), prec_);
277  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(), start_pose_ * translation, prec_);
278 }
279 
280 TEST_F(PandaRobot, testTranslationGlobal)
281 {
282  Eigen::Isometry3d goal = start_pose_;
283  goal.translation().x() += 0.2; // move by 0.2 along world's x-axis
284 
285  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, goal, true), 1.0); // 100% of distance generated
286  // first pose of trajectory should be identical to start_pose
287  EXPECT_EIGEN_EQ(result_.front()->getGlobalLinkTransform(link_), start_pose_);
288  // last pose of trajectory should have same orientation, but offset of 0.2 along world's x-axis
289  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).linear(), start_pose_.linear(), prec_);
290  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(), goal.translation(), prec_);
291 }
292 TEST_F(PandaRobot, testTranslationLocal)
293 {
294  Eigen::Isometry3d offset(Eigen::Translation3d(0.2, 0, 0)); // move along link's x-axis
295  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, offset, false), 1.0); // 100% of distance generated
296  // first pose of trajectory should be identical to start_pose
297  EXPECT_EIGEN_EQ(result_.front()->getGlobalLinkTransform(link_), start_pose_);
298  // last pose of trajectory should have same orientation, but offset of 0.2 along link's x-axis
299  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).linear(), start_pose_.linear(), prec_);
300  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(), start_pose_ * offset.translation(),
301  prec_);
302 }
303 
304 TEST_F(PandaRobot, testRotationLocal)
305 {
306  // 45° rotation about links's x-axis
307  Eigen::Isometry3d rot(Eigen::AngleAxisd(M_PI / 4, Eigen::Vector3d::UnitX()));
308  Eigen::Isometry3d goal = start_pose_ * rot;
309 
310  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, rot, false), 1.0); // 100% of distance generated
311  // first pose of trajectory should be identical to start_pose
312  EXPECT_EIGEN_EQ(result_.front()->getGlobalLinkTransform(link_), start_pose_);
313  // last pose of trajectory should have same position,
314  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(), start_pose_.translation(), prec_);
315  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_), goal, prec_);
316 }
317 TEST_F(PandaRobot, testRotationGlobal)
318 {
319  // 45° rotation about links's x-axis
320  Eigen::Isometry3d rot(Eigen::AngleAxisd(M_PI / 4, Eigen::Vector3d::UnitX()));
321  Eigen::Isometry3d goal = start_pose_ * rot;
322 
323  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, goal, true), 1.0); // 100% of distance generated
324  // first pose of trajectory should be identical to start_pose
325  EXPECT_EIGEN_NEAR(result_.front()->getGlobalLinkTransform(link_), start_pose_, prec_);
326  // last pose of trajectory should have same position,
327  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_).translation(), start_pose_.translation(), prec_);
328  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_), goal, prec_);
329 }
330 TEST_F(PandaRobot, testRotationOffset)
331 {
332  // define offset to virtual center frame
333  Eigen::Isometry3d offset = Eigen::Translation3d(0, 0, 0.2) * Eigen::AngleAxisd(-M_PI / 4, Eigen::Vector3d::UnitZ());
334  // 45° rotation about center's x-axis
335  Eigen::Isometry3d rot(Eigen::AngleAxisd(M_PI / 4, Eigen::Vector3d::UnitX()));
336  Eigen::Isometry3d goal = start_pose_ * offset * rot;
337 
338  ASSERT_DOUBLE_EQ(computeCartesianPath(result_, goal, true, offset), 1.0); // 100% of distance generated
339  // first pose of trajectory should be identical to start_pose
340  EXPECT_EIGEN_NEAR(result_.front()->getGlobalLinkTransform(link_), start_pose_, prec_);
341 
342  // All waypoints of trajectory should have same position in virtual frame
343  for (const auto& waypoint : result_)
344  EXPECT_EIGEN_NEAR((waypoint->getGlobalLinkTransform(link_) * offset).translation(),
345  (start_pose_ * offset).translation(), prec_);
346  // goal should be reached by virtual frame
347  EXPECT_EIGEN_NEAR(result_.back()->getGlobalLinkTransform(link_) * offset, goal, prec_);
348 }
349 
350 int main(int argc, char** argv)
351 {
352  testing::InitGoogleTest(&argc, argv);
353  ros::init(argc, argv, "test_cartesian_interpolator");
354  return RUN_ALL_TESTS();
355 }
moveit::core::LinkModel
A link from the robot. Contains the constant transform applied to the link and its geometry.
Definition: link_model.h:71
moveit::core
Core components of MoveIt.
Definition: kinematics_base.h:83
PandaRobot
Definition: test_cartesian_interpolator.cpp:203
moveit::core::GroupStateValidityCallbackFn
boost::function< bool(RobotState *robot_state, const JointModelGroup *joint_group, const double *joint_group_variable_values)> GroupStateValidityCallbackFn
Signature for functions that can verify that if the group joint_group in robot_state is set to joint_...
Definition: robot_state.h:136
PandaRobot::SetUp
void SetUp() override
Definition: test_cartesian_interpolator.cpp:220
PandaRobot::SetUpTestSuite
static void SetUpTestSuite()
Definition: test_cartesian_interpolator.cpp:206
moveit::core::RobotModelBuilder::addGroupChain
RobotModelBuilder & addGroupChain(const std::string &base_link, const std::string &tip_link, const std::string &name="")
Adds a new group using a chain of links. The group is the parent joint of each link in the chain.
Definition: robot_model_test_utils.cpp:436
SimpleRobot::SetUp
void SetUp() override
Definition: test_cartesian_interpolator.cpp:48
moveit::core::JumpThreshold
Struct for containing jump_threshold.
Definition: cartesian_interpolator.h:130
moveit::core::JointModelGroup
Definition: joint_model_group.h:134
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
PandaRobot::robot_model_
static RobotModelPtr robot_model_
Definition: test_cartesian_interpolator.cpp:245
moveit::core::CartesianInterpolator::checkRelativeJointSpaceJump
static double checkRelativeJointSpaceJump(const JointModelGroup *group, std::vector< std::shared_ptr< RobotState >> &traj, double jump_threshold_factor)
Tests for relative joint space jumps of the trajectory traj.
Definition: cartesian_interpolator.cpp:466
moveit::core::RobotState
Representation of a robot's state. This includes position, velocity, acceleration and effort.
Definition: robot_state.h:155
robot_model.h
PandaRobot::computeCartesianPath
double computeCartesianPath(std::vector< std::shared_ptr< RobotState >> &result, const Eigen::Vector3d &translation, bool global)
Definition: test_cartesian_interpolator.cpp:227
moveit::core::CartesianInterpolator::computeCartesianPath
static double computeCartesianPath(const RobotState *start_state, const JointModelGroup *group, std::vector< std::shared_ptr< RobotState >> &traj, const LinkModel *link, const Eigen::Vector3d &translation, bool global_reference_frame, const MaxEEFStep &max_step, const CartesianPrecision &precision, const GroupStateValidityCallbackFn &validCallback=GroupStateValidityCallbackFn(), const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions())
Compute the sequence of joint values that correspond to a straight Cartesian path for a particular li...
SimpleRobot::generateTestTraj
static std::size_t generateTestTraj(std::vector< std::shared_ptr< RobotState >> &traj, const RobotModelConstPtr &robot_model_)
Definition: test_cartesian_interpolator.cpp:68
PandaRobot::result_
std::vector< std::shared_ptr< RobotState > > result_
Definition: test_cartesian_interpolator.cpp:252
EXPECT_NEAR
#define EXPECT_NEAR(a, b, prec)
PandaRobot::computeCartesianPath
double computeCartesianPath(std::vector< std::shared_ptr< RobotState >> &result, const Eigen::Isometry3d &target, bool global, const Eigen::Isometry3d &offset=Eigen::Isometry3d::Identity())
Definition: test_cartesian_interpolator.cpp:235
PandaRobot::link_
static const LinkModel * link_
Definition: test_cartesian_interpolator.cpp:247
PandaRobot::start_pose_
Eigen::Isometry3d start_pose_
Definition: test_cartesian_interpolator.cpp:251
cartesian_interpolator.h
moveit::core::MaxEEFStep
Struct for containing max_step for computeCartesianPath.
Definition: cartesian_interpolator.h:157
moveit::core::RobotModelBuilder::build
moveit::core::RobotModelPtr build()
Builds and returns the robot model added to the builder.
Definition: robot_model_test_utils.cpp:484
moveit::core::CartesianInterpolator::checkJointSpaceJump
static double checkJointSpaceJump(const JointModelGroup *group, std::vector< std::shared_ptr< RobotState >> &traj, const JumpThreshold &jump_threshold)
Tests joint space jumps of a trajectory.
Definition: cartesian_interpolator.cpp:448
PandaRobot::jmg_
static JointModelGroup * jmg_
Definition: test_cartesian_interpolator.cpp:246
SimpleRobot
Definition: test_cartesian_interpolator.cpp:45
main
int main(int argc, char **argv)
Definition: test_cartesian_interpolator.cpp:350
moveit::core::CartesianInterpolator::checkAbsoluteJointSpaceJump
static double checkAbsoluteJointSpaceJump(const JointModelGroup *group, std::vector< std::shared_ptr< RobotState >> &traj, double revolute_jump_threshold, double prismatic_jump_threshold)
Tests for absolute joint space jumps of the trajectory traj.
Definition: cartesian_interpolator.cpp:503
robot_model_test_utils.h
SimpleRobot::robot_model_
RobotModelConstPtr robot_model_
Definition: test_cartesian_interpolator.cpp:62
EXPECT_EIGEN_NEAR
#define EXPECT_EIGEN_NEAR(val1, val2, prec_)
Definition: eigen_test_utils.h:76
PandaRobot::TearDownTestSuite
static void TearDownTestSuite()
Definition: test_cartesian_interpolator.cpp:215
kinematics::KinematicsQueryOptions
A set of options for the kinematics solver.
Definition: kinematics_base.h:109
moveit::core::RobotModelBuilder
Easily build different robot models for testing. Essentially a programmer-friendly light wrapper arou...
Definition: robot_model_test_utils.h:158
M_PI
#define M_PI
moveit::core::RobotModelBuilder::addChain
RobotModelBuilder & addChain(const std::string &section, const std::string &type, const std::vector< geometry_msgs::Pose > &joint_origins={}, urdf::Vector3 joint_axis=urdf::Vector3(1.0, 0.0, 0.0))
Adds a chain of links and joints to the builder. The joint names are generated automatically as "<par...
Definition: robot_model_test_utils.cpp:204
EXPECT_EIGEN_EQ
#define EXPECT_EIGEN_EQ(val1, val2)
Definition: eigen_test_utils.h:72
SimpleRobot::TearDown
void TearDown() override
Definition: test_cartesian_interpolator.cpp:57
PandaRobot::start_state_
RobotStatePtr start_state_
Definition: test_cartesian_interpolator.cpp:250
moveit::core::loadIKPluginForGroup
void loadIKPluginForGroup(JointModelGroup *jmg, const std::string &base_link, const std::string &tip_link, std::string plugin="KDL", double timeout=0.1)
Load an IK solver plugin for the given joint model group.
Definition: robot_model_test_utils.cpp:165
eigen_test_utils.h
moveit::core::CartesianPrecision
Definition: cartesian_interpolator.h:118
robot_state.h
EXPECT_EQ
#define EXPECT_EQ(a, b)
TEST_F
TEST_F(SimpleRobot, testGenerateTrajectory)
Definition: test_cartesian_interpolator.cpp:109
fcl::Vector3d
Vec3fX< details::Vec3Data< double > > Vector3d
Definition: fcl_compat.h:89
moveit::core::loadTestingRobotModel
moveit::core::RobotModelPtr loadTestingRobotModel(const std::string &robot_name)
Loads a robot from moveit_resources.
Definition: robot_model_test_utils.cpp:117


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Tue Dec 24 2024 03:27:14