44#include <moveit_servo_lib_parameters.hpp>
49#include <sensor_msgs/msg/joint_state.hpp>
50#include <std_msgs/msg/float64_multi_array.hpp>
51#include <tf2_eigen/tf2_eigen.hpp>
52#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
53#include <trajectory_msgs/msg/joint_trajectory.hpp>
67 const std::string& group_name);
75std::optional<std::string>
getIKSolverTipFrame(
const moveit::core::RobotStatePtr& robot_state,
76 const std::string& group_name);
113 const Eigen::Isometry3d& base_to_tip_frame_transform);
122std::optional<trajectory_msgs::msg::JointTrajectory>
123composeTrajectoryMessage(
const servo::Params& servo_params,
const std::deque<KinematicState>& joint_cmd_rolling_window);
135 double max_expected_latency,
const rclcpp::Time& cur_time);
154 const Eigen::VectorXd& target_delta_x,
155 const servo::Params& servo_params);
176std::vector<size_t>
jointVariablesToHalt(
const Eigen::VectorXd& positions,
const Eigen::VectorXd& velocities,
178 const std::vector<double>& margins);
188 const std::string& parent_frame,
189 const std::string& child_frame);
202 const servo::Params& servo_params);
std::vector< const JointModel::Bounds * > JointBoundsVector
std::optional< std::string > getIKSolverTipFrame(const moveit::core::RobotStatePtr &robot_state, const std::string &group_name)
Get the tip (end-effector) frame of the current active joint group or subgroup's IK solver.
std::optional< trajectory_msgs::msg::JointTrajectory > composeTrajectoryMessage(const servo::Params &servo_params, const std::deque< KinematicState > &joint_cmd_rolling_window)
Create a trajectory message from a rolling window queue of joint state commands. Method optionally re...
geometry_msgs::msg::Pose poseFromCartesianDelta(const Eigen::VectorXd &delta_x, const Eigen::Isometry3d &base_to_tip_frame_transform)
Create a pose message for the provided change in Cartesian position.
std::pair< double, StatusCode > velocityScalingFactorForSingularity(const moveit::core::RobotStatePtr &robot_state, const Eigen::VectorXd &target_delta_x, const servo::Params &servo_params)
Computes scaling factor for velocity when the robot is near a singularity.
std::optional< std::string > getIKSolverBaseFrame(const moveit::core::RobotStatePtr &robot_state, const std::string &group_name)
Get the base frame of the current active joint group or subgroup's IK solver.
double jointLimitVelocityScalingFactor(const Eigen::VectorXd &velocities, const moveit::core::JointBoundsVector &joint_bounds, double scaling_override)
Apply velocity scaling based on joint limits. If the robot model does not have velocity limits define...
std_msgs::msg::Float64MultiArray composeMultiArrayMessage(const servo::Params &servo_params, const KinematicState &joint_state)
Create a Float64MultiArray message from given joint state.
bool isValidCommand(const Eigen::VectorXd &command)
Checks if a given VectorXd is a valid command.
geometry_msgs::msg::TransformStamped convertIsometryToTransform(const Eigen::Isometry3d &eigen_tf, const std::string &parent_frame, const std::string &child_frame)
Helper function for converting Eigen::Isometry3d to geometry_msgs/TransformStamped.
void updateSlidingWindow(KinematicState &next_joint_state, std::deque< KinematicState > &joint_cmd_rolling_window, double max_expected_latency, const rclcpp::Time &cur_time)
Adds a new joint state command to a queue containing commands over a time window. Also modifies the v...
constexpr int MIN_POINTS_FOR_TRAJ_MSG
std::vector< size_t > jointVariablesToHalt(const Eigen::VectorXd &positions, const Eigen::VectorXd &velocities, const moveit::core::JointBoundsVector &joint_bounds, const std::vector< double > &margins)
Finds the joint variable indices corresponding to joints exceeding allowable position limits.
KinematicState extractRobotState(const moveit::core::RobotStatePtr &robot_state, const std::string &move_group_name)
Extract the state from a RobotStatePtr instance.
PoseCommand poseFromPoseStamped(const geometry_msgs::msg::PoseStamped &msg)
Convert a PoseStamped message to a Servo Pose.
planning_scene_monitor::PlanningSceneMonitorPtr createPlanningSceneMonitor(const rclcpp::Node::SharedPtr &node, const servo::Params &servo_params)
Creates the planning scene monitor used by servo.