Skip to main content

PoseIKPlugin Class

PickNik's implementation of a kinematics solver using MoveIt native types. More...

Declaration

class pose_ik_plugin::PoseIKPlugin { ... }

Included Headers

#include <pose_ik_plugin.hpp>

Base class

classmoveit_pro::base::kinematics::KinematicsBase

Public Constructors Index

PoseIKPlugin ()=default

Public Member Functions Index

boolinitialize (const rclcpp::Node::SharedPtr &node, const moveit_pro::base::RobotModel &robot_model, const std::string &group_name, const std::string &base_frame, const std::vector< std::string > &tip_frames, double search_discretization) override
boolinitialize (const moveit_pro::base::RobotModel &robot_model, const std::string &group_name, const std::string &tip_frame)

Initialize the plugin without a ROS 2 node. More...

boolgetPositionIK (const geometry_msgs::msg::Pose &ik_pose, const std::vector< double > &ik_seed_state, std::vector< double > &solution, moveit_msgs::msg::MoveItErrorCodes &error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions &options=moveit_pro::base::kinematics::KinematicsQueryOptions()) const override
boolsearchPositionIK (const geometry_msgs::msg::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, std::vector< double > &solution, moveit_msgs::msg::MoveItErrorCodes &error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions &options=moveit_pro::base::kinematics::KinematicsQueryOptions()) const override
boolsearchPositionIK (const geometry_msgs::msg::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, const std::vector< double > &consistency_limits, std::vector< double > &solution, moveit_msgs::msg::MoveItErrorCodes &error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions &options=moveit_pro::base::kinematics::KinematicsQueryOptions()) const override
boolsearchPositionIK (const geometry_msgs::msg::Pose &ik_pose, const std::vector< double > &ik_seed_state, double timeout, std::vector< double > &solution, const IKCallbackFn &solution_callback, moveit_msgs::msg::MoveItErrorCodes &error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions &options=moveit_pro::base::kinematics::KinematicsQueryOptions()) const override
boolsearchPositionIK (const geometry_msgs::msg::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::msg::MoveItErrorCodes &error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions &options=moveit_pro::base::kinematics::KinematicsQueryOptions()) const override
boolgetPositionFK (const std::vector< std::string > &link_names, const std::vector< double > &joint_angles, std::vector< geometry_msgs::msg::Pose > &poses) const override
const std::vector< std::string > &getJointNames () const override
const std::vector< std::string > &getLinkNames () const override
voidsetParams (const pose_ik::Params &params)

Set IK parameters directly, bypassing the ROS 2 parameter listener. More...

Private Member Attributes Index

std::shared_ptr< pose_ik::ParamListener >parameter_listener_
const moveit_pro::base::JointModelGroup *joint_model_group_ = nullptr
std::unique_ptr< moveit_pro::base::RobotState >state_
std::optional< pose_ik::Params >override_params_
boolinitialized_ = false

Description

PickNik's implementation of a kinematics solver using MoveIt native types.

This class implements MoveIt's KinematicsBase interface around pose_ik::solveIK().

Definition at line 27 of file pose_ik_plugin.hpp.

Public Constructors

PoseIKPlugin()

pose_ik_plugin::PoseIKPlugin::PoseIKPlugin ()
default

Definition at line 30 of file pose_ik_plugin.hpp.

Public Member Functions

getJointNames()

const std::vector< std::string > & pose_ik_plugin::PoseIKPlugin::getJointNames ()

Declaration at line 89 of file pose_ik_plugin.hpp, definition at line 223 of file pose_ik_plugin.cpp.

getLinkNames()

const std::vector< std::string > & pose_ik_plugin::PoseIKPlugin::getLinkNames ()

Declaration at line 91 of file pose_ik_plugin.hpp, definition at line 228 of file pose_ik_plugin.cpp.

getPositionFK()

bool pose_ik_plugin::PoseIKPlugin::getPositionFK (const std::vector< std::string > & link_names, const std::vector< double > & joint_angles, std::vector< geometry_msgs::msg::Pose > & poses)

Declaration at line 86 of file pose_ik_plugin.hpp, definition at line 215 of file pose_ik_plugin.cpp.

getPositionIK()

bool pose_ik_plugin::PoseIKPlugin::getPositionIK (const geometry_msgs::msg::Pose & ik_pose, const std::vector< double > & ik_seed_state, std::vector< double > & solution, moveit_msgs::msg::MoveItErrorCodes & error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions & options=moveit_pro::base::kinematics::KinematicsQueryOptions())

Declaration at line 58 of file pose_ik_plugin.hpp, definition at line 178 of file pose_ik_plugin.cpp.

initialize()

bool pose_ik_plugin::PoseIKPlugin::initialize (const rclcpp::Node::SharedPtr & node, const moveit_pro::base::RobotModel & robot_model, const std::string & group_name, const std::string & base_frame, const std::vector< std::string > & tip_frames, double search_discretization)

Implements the main MoveIt 2 initialize interface, requiring a ROS 2 node.

Declaration at line 33 of file pose_ik_plugin.hpp, definition at line 23 of file pose_ik_plugin.cpp.

initialize()

bool pose_ik_plugin::PoseIKPlugin::initialize (const moveit_pro::base::RobotModel & robot_model, const std::string & group_name, const std::string & tip_frame)

Initialize the plugin without a ROS 2 node.

This version of initialize does not create a parameter listener, so parameters must be set directly using setParams(), or otherwise defaults will be used. This is useful when you don't need ROS 2 parameter loading and want to avoid creating a node.

The base frame is automatically set to the first link in the group.

Parameters
robot_model

The robot model

group_name

Name of the joint model group

tip_frame

Tip frame name for the IK solver

Returns

true if initialization succeeds, false otherwise

Declaration at line 51 of file pose_ik_plugin.hpp, definition at line 46 of file pose_ik_plugin.cpp.

searchPositionIK()

bool pose_ik_plugin::PoseIKPlugin::searchPositionIK (const geometry_msgs::msg::Pose & ik_pose, const std::vector< double > & ik_seed_state, double timeout, std::vector< double > & solution, moveit_msgs::msg::MoveItErrorCodes & error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions & options=moveit_pro::base::kinematics::KinematicsQueryOptions())

Declaration at line 63 of file pose_ik_plugin.hpp, definition at line 187 of file pose_ik_plugin.cpp.

searchPositionIK()

bool pose_ik_plugin::PoseIKPlugin::searchPositionIK (const geometry_msgs::msg::Pose & ik_pose, const std::vector< double > & ik_seed_state, double timeout, const std::vector< double > & consistency_limits, std::vector< double > & solution, moveit_msgs::msg::MoveItErrorCodes & error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions & options=moveit_pro::base::kinematics::KinematicsQueryOptions())

Declaration at line 68 of file pose_ik_plugin.hpp, definition at line 196 of file pose_ik_plugin.cpp.

searchPositionIK()

bool pose_ik_plugin::PoseIKPlugin::searchPositionIK (const geometry_msgs::msg::Pose & ik_pose, const std::vector< double > & ik_seed_state, double timeout, std::vector< double > & solution, const IKCallbackFn & solution_callback, moveit_msgs::msg::MoveItErrorCodes & error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions & options=moveit_pro::base::kinematics::KinematicsQueryOptions())

Declaration at line 74 of file pose_ik_plugin.hpp, definition at line 205 of file pose_ik_plugin.cpp.

searchPositionIK()

bool pose_ik_plugin::PoseIKPlugin::searchPositionIK (const geometry_msgs::msg::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::msg::MoveItErrorCodes & error_code, const moveit_pro::base::kinematics::KinematicsQueryOptions & options=moveit_pro::base::kinematics::KinematicsQueryOptions())

Declaration at line 80 of file pose_ik_plugin.hpp, definition at line 105 of file pose_ik_plugin.cpp.

setParams()

void pose_ik_plugin::PoseIKPlugin::setParams (const pose_ik::Params & params)

Set IK parameters directly, bypassing the ROS 2 parameter listener.

This allows programmatic configuration of IK solver behavior without needing to set ROS 2 parameters. Once set, these parameters will be used for all subsequent IK queries instead of loading from the parameter server.

Parameters
params

The IK parameters to use.

Declaration at line 102 of file pose_ik_plugin.hpp, definition at line 233 of file pose_ik_plugin.cpp.

Private Member Attributes

initialized_

bool pose_ik_plugin::PoseIKPlugin::initialized_ = false

Definition at line 112 of file pose_ik_plugin.hpp.

joint_model_group_

const moveit_pro::base::JointModelGroup* pose_ik_plugin::PoseIKPlugin::joint_model_group_ = nullptr

Definition at line 106 of file pose_ik_plugin.hpp.

override_params_

std::optional<pose_ik::Params> pose_ik_plugin::PoseIKPlugin::override_params_

Definition at line 110 of file pose_ik_plugin.hpp.

parameter_listener_

std::shared_ptr<pose_ik::ParamListener> pose_ik_plugin::PoseIKPlugin::parameter_listener_

Definition at line 105 of file pose_ik_plugin.hpp.

state_

std::unique_ptr<moveit_pro::base::RobotState> pose_ik_plugin::PoseIKPlugin::state_

Definition at line 107 of file pose_ik_plugin.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.