Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
kdl_kinematics_plugin::KDLKinematicsPlugin Class Reference

Specific implementation of kinematics using KDL. This version can be used with any robot. More...

#include <kdl_kinematics_plugin.h>

Inheritance diagram for kdl_kinematics_plugin::KDLKinematicsPlugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const std::vector< std::string > & getJointNames () const
 Return all the joint names in the order they are used internally.
const std::vector< std::string > & getLinkNames () const
 Return all the link names in the order they are represented internally.
virtual bool getPositionFK (const std::vector< std::string > &link_names, const std::vector< double > &joint_angles, std::vector< geometry_msgs::Pose > &poses) const
virtual bool getPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, std::vector< double > &solution, moveit_msgs::MoveItErrorCodes &error_code, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const
virtual bool initialize (const std::string &robot_description, const std::string &group_name, const std::string &base_name, const std::string &tip_name, double search_discretization)
 KDLKinematicsPlugin ()
 Default constructor.
virtual bool searchPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, std::vector< double > &solution, moveit_msgs::MoveItErrorCodes &error_code, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const
virtual bool searchPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, const std::vector< double > &consistency_limits, std::vector< double > &solution, moveit_msgs::MoveItErrorCodes &error_code, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const
virtual bool searchPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, std::vector< double > &solution, const IKCallbackFn &solution_callback, moveit_msgs::MoveItErrorCodes &error_code, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const
virtual bool searchPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, const std::vector< double > &consistency_limits, std::vector< double > &solution, const IKCallbackFn &solution_callback, moveit_msgs::MoveItErrorCodes &error_code, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const

Protected Member Functions

bool searchPositionIK (const geometry_msgs::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, std::vector< double > &solution, const IKCallbackFn &solution_callback, moveit_msgs::MoveItErrorCodes &error_code, const std::vector< double > &consistency_limits, const kinematics::KinematicsQueryOptions &options=kinematics::KinematicsQueryOptions()) const
 Given a desired pose of the end-effector, search for the joint angles required to reach it. This particular method is intended for "searching" for a solutions by stepping through the redundancy (or other numerical routines).
virtual bool setRedundantJoints (const std::vector< unsigned int > &redundant_joint_indices)

Private Member Functions

bool checkConsistency (const KDL::JntArray &seed_state, const std::vector< double > &consistency_limit, const KDL::JntArray &solution) const
 Check whether the solution lies within the consistency limit of the seed state.
int getJointIndex (const std::string &name) const
int getKDLSegmentIndex (const std::string &name) const
void getRandomConfiguration (KDL::JntArray &jnt_array, bool lock_redundancy) const
void getRandomConfiguration (const KDL::JntArray &seed_state, const std::vector< double > &consistency_limits, KDL::JntArray &jnt_array, bool lock_redundancy) const
 Get a random configuration within joint limits close to the seed state.
bool isRedundantJoint (unsigned int index) const
bool timedOut (const ros::WallTime &start_time, double duration) const

Private Attributes

bool active_
unsigned int dimension_
double epsilon_
moveit_msgs::KinematicSolverInfo fk_chain_info_
moveit_msgs::KinematicSolverInfo ik_chain_info_
KDL::JntArray joint_max_
KDL::JntArray joint_min_
robot_model::JointModelGroupjoint_model_group_
KDL::Chain kdl_chain_
robot_model::RobotModelPtr kinematic_model_
robot_state::RobotStatePtr kinematic_state_
robot_state::RobotStatePtr kinematic_state_2_
double max_solver_iterations_
std::vector
< kdl_kinematics_plugin::JointMimic
mimic_joints_
int num_possible_redundant_joints_
bool position_ik_
random_numbers::RandomNumberGenerator random_number_generator_
std::vector< unsigned int > redundant_joints_map_index_

Detailed Description

Specific implementation of kinematics using KDL. This version can be used with any robot.

Definition at line 75 of file kdl_kinematics_plugin.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 57 of file kdl_kinematics_plugin.cpp.


Member Function Documentation

bool kdl_kinematics_plugin::KDLKinematicsPlugin::checkConsistency ( const KDL::JntArray &  seed_state,
const std::vector< double > &  consistency_limit,
const KDL::JntArray &  solution 
) const [private]

Check whether the solution lies within the consistency limit of the seed state.

Parameters:
seed_stateSeed state
redundancyIndex of the redundant joint within the chain
consistency_limitThe returned state for redundant joint should be in the range [seed_state(redundancy_limit)-consistency_limit,seed_state(redundancy_limit)+consistency_limit]
solutionsolution configuration
Returns:
true if check succeeds

Definition at line 106 of file kdl_kinematics_plugin.cpp.

int kdl_kinematics_plugin::KDLKinematicsPlugin::getJointIndex ( const std::string &  name) const [private]

Definition at line 334 of file kdl_kinematics_plugin.cpp.

const std::vector< std::string > & kdl_kinematics_plugin::KDLKinematicsPlugin::getJointNames ( ) const [virtual]

Return all the joint names in the order they are used internally.

Implements kinematics::KinematicsBase.

Definition at line 629 of file kdl_kinematics_plugin.cpp.

int kdl_kinematics_plugin::KDLKinematicsPlugin::getKDLSegmentIndex ( const std::string &  name) const [private]

Definition at line 343 of file kdl_kinematics_plugin.cpp.

const std::vector< std::string > & kdl_kinematics_plugin::KDLKinematicsPlugin::getLinkNames ( ) const [virtual]

Return all the link names in the order they are represented internally.

Implements kinematics::KinematicsBase.

Definition at line 634 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::getPositionFK ( const std::vector< std::string > &  link_names,
const std::vector< double > &  joint_angles,
std::vector< geometry_msgs::Pose > &  poses 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 583 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::getPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
std::vector< double > &  solution,
moveit_msgs::MoveItErrorCodes &  error_code,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 360 of file kdl_kinematics_plugin.cpp.

void kdl_kinematics_plugin::KDLKinematicsPlugin::getRandomConfiguration ( KDL::JntArray &  jnt_array,
bool  lock_redundancy 
) const [private]

Definition at line 59 of file kdl_kinematics_plugin.cpp.

void kdl_kinematics_plugin::KDLKinematicsPlugin::getRandomConfiguration ( const KDL::JntArray &  seed_state,
const std::vector< double > &  consistency_limits,
KDL::JntArray &  jnt_array,
bool  lock_redundancy 
) const [private]

Get a random configuration within joint limits close to the seed state.

Parameters:
seed_stateSeed state
redundancyIndex of the redundant joint within the chain
consistency_limitThe returned state will contain a value for the redundant joint in the range [seed_state(redundancy_limit)-consistency_limit,seed_state(redundancy_limit)+consistency_limit]
jnt_arrayReturned random configuration

Definition at line 83 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::initialize ( const std::string &  robot_description,
const std::string &  group_name,
const std::string &  base_name,
const std::string &  tip_name,
double  search_discretization 
) [virtual]

Implements kinematics::KinematicsBase.

Definition at line 133 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::isRedundantJoint ( unsigned int  index) const [private]

Definition at line 75 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
double  timeout,
std::vector< double > &  solution,
moveit_msgs::MoveItErrorCodes &  error_code,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 379 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
double  timeout,
const std::vector< double > &  consistency_limits,
std::vector< double > &  solution,
moveit_msgs::MoveItErrorCodes &  error_code,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 399 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
double  timeout,
std::vector< double > &  solution,
const IKCallbackFn solution_callback,
moveit_msgs::MoveItErrorCodes &  error_code,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 418 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
double  timeout,
const std::vector< double > &  consistency_limits,
std::vector< double > &  solution,
const IKCallbackFn solution_callback,
moveit_msgs::MoveItErrorCodes &  error_code,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [virtual]

Implements kinematics::KinematicsBase.

Definition at line 437 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::searchPositionIK ( const geometry_msgs::Pose ik_pose,
const std::vector< double > &  ik_seed_state,
double  timeout,
std::vector< double > &  solution,
const IKCallbackFn solution_callback,
moveit_msgs::MoveItErrorCodes &  error_code,
const std::vector< double > &  consistency_limits,
const kinematics::KinematicsQueryOptions options = kinematics::KinematicsQueryOptions() 
) const [protected]

Given a desired pose of the end-effector, search for the joint angles required to reach it. This particular method is intended for "searching" for a solutions by stepping through the redundancy (or other numerical routines).

Parameters:
ik_posethe desired pose of the link
ik_seed_statean initial guess solution for the inverse kinematics
timeoutThe amount of time (in seconds) available to the solver
solutionthe solution vector
solution_callbackA callback solution for the IK solution
error_codean error code that encodes the reason for failure or success
check_consistencySet to true if consistency check needs to be performed
redundancyThe index of the redundant joint
consistency_limitThe returned solutuion will contain a value for the redundant joint in the range [seed_state(redundancy_limit)-consistency_limit,seed_state(redundancy_limit)+consistency_limit]
Returns:
True if a valid solution was found, false otherwise

Definition at line 456 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::setRedundantJoints ( const std::vector< unsigned int > &  redundant_joint_indices) [protected, virtual]

Reimplemented from kinematics::KinematicsBase.

Definition at line 283 of file kdl_kinematics_plugin.cpp.

bool kdl_kinematics_plugin::KDLKinematicsPlugin::timedOut ( const ros::WallTime start_time,
double  duration 
) const [private]

Definition at line 355 of file kdl_kinematics_plugin.cpp.


Member Data Documentation

Definition at line 205 of file kdl_kinematics_plugin.h.

Definition at line 213 of file kdl_kinematics_plugin.h.

Definition at line 230 of file kdl_kinematics_plugin.h.

moveit_msgs::KinematicSolverInfo kdl_kinematics_plugin::KDLKinematicsPlugin::fk_chain_info_ [private]

Stores information for the inverse kinematics solver

Definition at line 209 of file kdl_kinematics_plugin.h.

moveit_msgs::KinematicSolverInfo kdl_kinematics_plugin::KDLKinematicsPlugin::ik_chain_info_ [private]

Internal variable that indicates whether solvers are configured and ready

Definition at line 207 of file kdl_kinematics_plugin.h.

Definition at line 215 of file kdl_kinematics_plugin.h.

Dimension of the group

Definition at line 215 of file kdl_kinematics_plugin.h.

Definition at line 228 of file kdl_kinematics_plugin.h.

Store information for the forward kinematics solver

Definition at line 211 of file kdl_kinematics_plugin.h.

Definition at line 219 of file kdl_kinematics_plugin.h.

Definition at line 221 of file kdl_kinematics_plugin.h.

Definition at line 221 of file kdl_kinematics_plugin.h.

Definition at line 229 of file kdl_kinematics_plugin.h.

Definition at line 231 of file kdl_kinematics_plugin.h.

Definition at line 223 of file kdl_kinematics_plugin.h.

Definition at line 227 of file kdl_kinematics_plugin.h.

Joint limits

Definition at line 217 of file kdl_kinematics_plugin.h.

Definition at line 224 of file kdl_kinematics_plugin.h.


The documentation for this class was generated from the following files:


planning
Author(s): Ioan Sucan , Sachin Chitta
autogenerated on Mon Oct 6 2014 02:31:40