Class RoboplanIKMarker

Class Documentation

class RoboplanIKMarker

Solves IK for a target pose within a joint group with interactive marker feedback.

Can be used to generate IK solutions using feedback from an interactive marker server. The consumer is responsible for connecting this to the appropriate ROS infrastructure, as needed for the specific application.

Public Functions

RoboplanIKMarker(std::shared_ptr<const roboplan::Scene> scene, const std::string &joint_group, const std::string &base_link, const std::string &tip_link, const roboplan::SimpleIkOptions &options = roboplan::SimpleIkOptions())

Constructs the IK solver and marker.

Parameters:
  • scene – A fully configured RoboPlan Scene.

  • joint_group – The joint group name for the IK solver.

  • base_link – Base link of the IK chain.

  • tip_link – Tip link of the IK chain.

  • options – Options for the IK solver.

visualization_msgs::msg::InteractiveMarker construct_imarker() const

Build an InteractiveMarker message for the current target pose.

Returns:

A configured InteractiveMarker with 6-DOF controls.

std::optional<Eigen::VectorXd> process_feedback(const visualization_msgs::msg::InteractiveMarkerFeedback &feedback)

Process feedback from an InteractiveMarkerServer.

Parameters:

feedback – The feedback message from the interactive marker server.

Returns:

Joint positions if IK succeeded, std::nullopt otherwise.

const Eigen::VectorXd &last_joint_positions() const

Get the last successful joint positions (or the initial seed).

void set_joint_positions(const Eigen::VectorXd &q)

Sets last joint positions, which are then used as a seed for the next solve.