PoseIKPlugin Class
PickNik's implementation of a kinematics solver using MoveIt native types. More...
Declaration
Included Headers
Base class
| class | moveit_pro::base::kinematics::KinematicsBase |
Public Constructors Index
| PoseIKPlugin ()=default | |
Public Member Functions Index
| bool | 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) override |
| bool | 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. More... | |
| bool | 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()) const override |
| bool | 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()) const override |
| bool | 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()) const override |
| bool | 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()) const override |
| bool | 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()) const override |
| bool | searchPositionIK (const std::vector< geometry_msgs::msg::Pose > &ik_poses, 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 moveit_pro::base::RobotState *context_state=nullptr) const override |
|
Solve IK for the single tip pose in ik_poses on a copy of context_state, the caller's state. More... | |
| bool | getPositionFK (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 |
| void | setParams (const pose_ik::Params ¶ms) |
|
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_ |
| bool | initialized_ = 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 30 of file pose_ik_plugin.hpp.
Public Constructors
PoseIKPlugin()
| default |
Definition at line 33 of file pose_ik_plugin.hpp.
Public Member Functions
getJointNames()
|
Declaration at line 108 of file pose_ik_plugin.hpp, definition at line 276 of file pose_ik_plugin.cpp.
getLinkNames()
|
Declaration at line 110 of file pose_ik_plugin.hpp, definition at line 281 of file pose_ik_plugin.cpp.
getPositionFK()
|
Declaration at line 105 of file pose_ik_plugin.hpp, definition at line 268 of file pose_ik_plugin.cpp.
getPositionIK()
|
Declaration at line 62 of file pose_ik_plugin.hpp, definition at line 231 of file pose_ik_plugin.cpp.
initialize()
|
Implements the main MoveIt 2 initialize interface, requiring a ROS 2 node.
Declaration at line 36 of file pose_ik_plugin.hpp, definition at line 34 of file pose_ik_plugin.cpp.
initialize()
|
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 parent link of the group's first joint, or to the robot model frame when that joint has no parent link.
- 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 55 of file pose_ik_plugin.hpp, definition at line 57 of file pose_ik_plugin.cpp.
searchPositionIK()
|
Declaration at line 67 of file pose_ik_plugin.hpp, definition at line 240 of file pose_ik_plugin.cpp.
searchPositionIK()
|
Declaration at line 72 of file pose_ik_plugin.hpp, definition at line 249 of file pose_ik_plugin.cpp.
searchPositionIK()
|
Declaration at line 78 of file pose_ik_plugin.hpp, definition at line 258 of file pose_ik_plugin.cpp.
searchPositionIK()
|
Declaration at line 84 of file pose_ik_plugin.hpp, definition at line 118 of file pose_ik_plugin.cpp.
searchPositionIK()
|
Solve IK for the single tip pose in ik_poses on a copy of context_state, the caller's state.
Joints outside the group keep the caller's values, including any between the base frame and the tip. Without a context state, those joints are at their default values. RobotState::setFromIK for a group with a single solver passes itself as the context state; for a group solved through subgroups, it passes none. Fails if ik_poses does not hold exactly one pose, or if context_state belongs to a different robot model.
Declaration at line 98 of file pose_ik_plugin.hpp, definition at line 129 of file pose_ik_plugin.cpp.
setParams()
|
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 121 of file pose_ik_plugin.hpp, definition at line 286 of file pose_ik_plugin.cpp.
Private Member Attributes
initialized_
|
Definition at line 131 of file pose_ik_plugin.hpp.
joint_model_group_
|
Definition at line 125 of file pose_ik_plugin.hpp.
override_params_
|
Definition at line 129 of file pose_ik_plugin.hpp.
parameter_listener_
|
Definition at line 124 of file pose_ik_plugin.hpp.
state_
|
Definition at line 126 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.15.0.