Class MotionClient

Inheritance Relationships

Base Type

  • public rclcpp::Node

Class Documentation

class easy_motion::MotionClient : public rclcpp::Node

Public Types

using MoveToPose = easy_motion_msgs::action::MoveToPose
using MoveToJoint = easy_motion_msgs::action::MoveToJoint
using PlanToPose = easy_motion_msgs::action::PlanToPose
using PlanToJoint = easy_motion_msgs::action::PlanToJoint
using ExecuteTrajectory = moveit_msgs::action::ExecuteTrajectory
using GripperCommand = control_msgs::action::GripperCommand

Public Functions

explicit MotionClient(const std::string &move_to_pose_action_name = "move_to_pose", const std::string &move_to_joint_action_name = "move_to_joint", const std::string &plan_to_pose_action_name = "plan_to_pose", const std::string &plan_to_joint_action_name = "plan_to_joint", const std::string &execute_trajectory_action_name = "execute_trajectory", const std::string &gripper_action_name = "/gripper_action_controller/gripper_cmd", rclcpp::NodeOptions options = rclcpp::NodeOptions())
moveit_msgs::msg::MoveItErrorCodes move_to_pose(const geometry_msgs::msg::PoseStamped &pose, bool cartesian_motion = false, bool relative_motion = false, double velocity_scaling = 1.0)
moveit_msgs::msg::MoveItErrorCodes move_to_joint(const std::vector<double> &joint_positions, double velocity_scaling = 1.0)
std::pair<moveit_msgs::msg::MoveItErrorCodes, trajectory_msgs::msg::JointTrajectory> plan_to_pose(const geometry_msgs::msg::PoseStamped &pose, const std::optional<std::vector<double>> &joint_start = std::nullopt, bool cartesian_motion = false, bool relative_motion = false, double velocity_scaling = 1.0)
std::pair<moveit_msgs::msg::MoveItErrorCodes, trajectory_msgs::msg::JointTrajectory> plan_to_joint(const std::vector<double> &joint_target, const std::optional<std::vector<double>> &joint_start = std::nullopt, double velocity_scaling = 1.0)
moveit_msgs::msg::MoveItErrorCodes execute_last_planned_trajectory()
moveit_msgs::msg::MoveItErrorCodes execute_trajectory(const trajectory_msgs::msg::JointTrajectory &trajectory, const std::vector<std::string> &controller_names = {})
bool attach_object(const std::string &object_id, const std::string &target_frame_id)
bool detach_object(const std::string &object_id)
std::pair<moveit_msgs::msg::MoveItErrorCodes, std::vector<double>> get_ik(const geometry_msgs::msg::PoseStamped &pose, const std::optional<std::vector<double>> &seed = std::nullopt)
std::pair<moveit_msgs::msg::MoveItErrorCodes, geometry_msgs::msg::PoseStamped> get_fk(const std::vector<double> &joint_state)
std::pair<bool, bool> gripper_command(double position, double max_effort = 0.0)
bool has_last_planned_trajectory() const
const trajectory_msgs::msg::JointTrajectory &last_planned_trajectory() const