Classes | Typedefs | Functions | Variables
tst_prbt_ikfast_manipulator_plugin.cpp File Reference
#include <ros/ros.h>
#include <gtest/gtest.h>
#include <pluginlib/class_loader.h>
#include <moveit/kinematics_base/kinematics_base.h>
Include dependency graph for tst_prbt_ikfast_manipulator_plugin.cpp:

Go to the source code of this file.

Classes

class  PrbtIKFastPluginTest
 Initializes the test of the IKFast plugin. More...
 

Typedefs

typedef pluginlib::ClassLoader< kinematics::KinematicsBaseKinematicsLoader
 
typedef std::vector< double > Vec1D
 
typedef std::vector< Vec1DVec2D
 

Functions

int main (int argc, char **argv)
 
std::ostream & operator<< (std::ostream &os, const Vec1D &vec)
 Overload ostream operator for double vectors. More...
 
std::ostream & operator<< (std::ostream &os, const geometry_msgs::Pose &pose)
 Overload ostream operator for robot poses. More...
 
double singularPoseJointFormula (double joint1)
 Computes joint2 from joint1 such that singular position with px,py=0 is reached. More...
 
 TEST_F (PrbtIKFastPluginTest, testSingularities)
 Tests if the IKFast plugin can solve the IK problem for specific singular poses. More...
 

Variables

static constexpr double DEFAULT_SEARCH_DISCRETIZATION {0.01}
 
static const std::string GROUP_PARAM {"group"}
 
static constexpr double IKFAST_TOLERANCE {0.001}
 
static const std::string JOINT_NAMES_PARAM {"joint_names"}
 
static const std::string KINEMATICS_BASE_CLASS {"kinematics::KinematicsBase"}
 
static constexpr double L1 {0.3500}
 
static constexpr double L2 {0.3070}
 
static const std::string MOVEIT_CORE_PACKAGE {"moveit_core"}
 
static constexpr unsigned int NUM_JOINTS {6}
 
static const std::string PLUGIN_NAME_PARAM {"ik_plugin_name"}
 
static const std::string ROBOT_DESCRIPTION_PARAM {"robot_description"}
 
static const std::string ROOT_LINK_PARAM {"root_link"}
 
static const std::string TIP_LINK_PARAM {"tip_link"}
 

Typedef Documentation

Definition at line 9 of file tst_prbt_ikfast_manipulator_plugin.cpp.

typedef std::vector<double> Vec1D

Definition at line 7 of file tst_prbt_ikfast_manipulator_plugin.cpp.

typedef std::vector<Vec1D> Vec2D

Definition at line 8 of file tst_prbt_ikfast_manipulator_plugin.cpp.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 237 of file tst_prbt_ikfast_manipulator_plugin.cpp.

std::ostream& operator<< ( std::ostream &  os,
const Vec1D vec 
)

Overload ostream operator for double vectors.

Definition at line 31 of file tst_prbt_ikfast_manipulator_plugin.cpp.

std::ostream& operator<< ( std::ostream &  os,
const geometry_msgs::Pose &  pose 
)

Overload ostream operator for robot poses.

Definition at line 50 of file tst_prbt_ikfast_manipulator_plugin.cpp.

double singularPoseJointFormula ( double  joint1)

Computes joint2 from joint1 such that singular position with px,py=0 is reached.

Definition at line 65 of file tst_prbt_ikfast_manipulator_plugin.cpp.

TEST_F ( PrbtIKFastPluginTest  ,
testSingularities   
)

Tests if the IKFast plugin can solve the IK problem for specific singular poses.

Test Sequence:

  1. Define a set of test joint angles. Perform the following steps for all data.
  2. Compute pose via forward kinematics.
  3. Solve IK problem.
  4. Compute deviation of solutions to the test joint angles.

Expected Results:

  1. -
  2. One pose is obtained.
  3. At least one solution is obtained.
  4. At least one solution is close to the test joint angles.

Definition at line 147 of file tst_prbt_ikfast_manipulator_plugin.cpp.

Variable Documentation

constexpr double DEFAULT_SEARCH_DISCRETIZATION {0.01}
static

Definition at line 21 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string GROUP_PARAM {"group"}
static

Definition at line 15 of file tst_prbt_ikfast_manipulator_plugin.cpp.

constexpr double IKFAST_TOLERANCE {0.001}
static

Definition at line 23 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string JOINT_NAMES_PARAM {"joint_names"}
static

Definition at line 18 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string KINEMATICS_BASE_CLASS {"kinematics::KinematicsBase"}
static

Definition at line 12 of file tst_prbt_ikfast_manipulator_plugin.cpp.

constexpr double L1 {0.3500}
static

Definition at line 25 of file tst_prbt_ikfast_manipulator_plugin.cpp.

constexpr double L2 {0.3070}
static

Definition at line 26 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string MOVEIT_CORE_PACKAGE {"moveit_core"}
static

Definition at line 11 of file tst_prbt_ikfast_manipulator_plugin.cpp.

constexpr unsigned int NUM_JOINTS {6}
static

Definition at line 22 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string PLUGIN_NAME_PARAM {"ik_plugin_name"}
static

Definition at line 14 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string ROBOT_DESCRIPTION_PARAM {"robot_description"}
static

Definition at line 19 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string ROOT_LINK_PARAM {"root_link"}
static

Definition at line 17 of file tst_prbt_ikfast_manipulator_plugin.cpp.

const std::string TIP_LINK_PARAM {"tip_link"}
static

Definition at line 16 of file tst_prbt_ikfast_manipulator_plugin.cpp.



prbt_ikfast_manipulator_plugin
Author(s):
autogenerated on Tue Feb 2 2021 03:50:30