#include <moveit_cpp.h>
Classes | |
struct | Options |
Parameter container for initializing MoveItCpp. More... | |
struct | PlanningPipelineOptions |
struct contains the the variables used for loading the planning pipeline More... | |
struct | PlanningSceneMonitorOptions |
Specification of options to use when constructing the MoveItCpp class. More... | |
Public Member Functions | |
bool | execute (const std::string &group_name, const robot_trajectory::RobotTrajectoryPtr &robot_trajectory, bool blocking=true) |
Execute a trajectory on the planning group specified by group_name using the trajectory execution manager. If blocking is set to false, the execution is run in background and the function returns immediately. More... | |
moveit::core::RobotStatePtr | getCurrentState (double wait_seconds=0.0) |
Get the current state queried from the current state monitor. More... | |
bool | getCurrentState (moveit::core::RobotStatePtr ¤t_state, double wait_seconds) |
Get the current state queried from the current state monitor. More... | |
const ros::NodeHandle & | getNodeHandle () const |
Get the ROS node handle of this instance operates on. More... | |
const std::map< std::string, planning_pipeline::PlanningPipelinePtr > & | getPlanningPipelines () const |
Get all loaded planning pipeline instances mapped to their reference names. More... | |
planning_scene_monitor::PlanningSceneMonitorConstPtr | getPlanningSceneMonitor () const |
Get the stored instance of the planning scene monitor. More... | |
planning_scene_monitor::PlanningSceneMonitorPtr | getPlanningSceneMonitorNonConst () |
moveit::core::RobotModelConstPtr | getRobotModel () const |
Get the RobotModel object. More... | |
std::shared_ptr< tf2_ros::Buffer > | getTFBuffer () |
std::shared_ptr< const tf2_ros::Buffer > | getTFBuffer () const |
trajectory_execution_manager::TrajectoryExecutionManagerConstPtr | getTrajectoryExecutionManager () const |
Get the stored instance of the trajectory execution manager. More... | |
trajectory_execution_manager::TrajectoryExecutionManagerPtr | getTrajectoryExecutionManagerNonConst () |
MoveItCpp (const MoveItCpp &)=delete | |
This class owns unique resources (e.g. action clients, threads) and its not very meaningful to copy. Pass by references, move it, or simply create multiple instances where required. More... | |
MoveItCpp (const Options &options, const ros::NodeHandle &nh, const std::shared_ptr< tf2_ros::Buffer > &tf_buffer={}) | |
MoveItCpp (const ros::NodeHandle &nh, const std::shared_ptr< tf2_ros::Buffer > &tf_buffer={}) | |
Constructor. More... | |
MoveItCpp (MoveItCpp &&other)=default | |
MoveItCpp & | operator= (const MoveItCpp &)=delete |
MoveItCpp & | operator= (MoveItCpp &&other)=default |
bool | terminatePlanningPipeline (std::string const &pipeline_name) |
Utility to terminate a given planning pipeline. More... | |
~MoveItCpp () | |
Destructor. More... | |
Protected Attributes | |
std::shared_ptr< tf2_ros::Buffer > | tf_buffer_ |
std::shared_ptr< tf2_ros::TransformListener > | tf_listener_ |
Private Member Functions | |
bool | loadPlanningPipelines (const PlanningPipelineOptions &options) |
Initialize and setup the planning pipelines. More... | |
bool | loadPlanningSceneMonitor (const PlanningSceneMonitorOptions &options) |
Initialize and setup the planning scene monitor. More... | |
Private Attributes | |
std::map< std::string, std::set< std::string > > | groups_algorithms_map_ |
ros::NodeHandle | node_handle_ |
std::map< std::string, planning_pipeline::PlanningPipelinePtr > | planning_pipelines_ |
planning_scene_monitor::PlanningSceneMonitorPtr | planning_scene_monitor_ |
trajectory_execution_manager::TrajectoryExecutionManagerPtr | trajectory_execution_manager_ |
Definition at line 86 of file moveit_cpp.h.
moveit_cpp::MoveItCpp::MoveItCpp | ( | const ros::NodeHandle & | nh, |
const std::shared_ptr< tf2_ros::Buffer > & | tf_buffer = {} |
||
) |
Constructor.
Definition at line 77 of file moveit_cpp.cpp.
moveit_cpp::MoveItCpp::MoveItCpp | ( | const Options & | options, |
const ros::NodeHandle & | nh, | ||
const std::shared_ptr< tf2_ros::Buffer > & | tf_buffer = {} |
||
) |
Definition at line 82 of file moveit_cpp.cpp.
|
delete |
This class owns unique resources (e.g. action clients, threads) and its not very meaningful to copy. Pass by references, move it, or simply create multiple instances where required.
|
default |
moveit_cpp::MoveItCpp::~MoveItCpp | ( | ) |
Destructor.
Definition at line 121 of file moveit_cpp.cpp.
bool moveit_cpp::MoveItCpp::execute | ( | const std::string & | group_name, |
const robot_trajectory::RobotTrajectoryPtr & | robot_trajectory, | ||
bool | blocking = true |
||
) |
Execute a trajectory on the planning group specified by group_name using the trajectory execution manager. If blocking is set to false, the execution is run in background and the function returns immediately.
Definition at line 258 of file moveit_cpp.cpp.
moveit::core::RobotStatePtr moveit_cpp::MoveItCpp::getCurrentState | ( | double | wait_seconds = 0.0 | ) |
Get the current state queried from the current state monitor.
wait_seconds | the time in seconds for the state monitor to wait for a robot state. |
Definition at line 226 of file moveit_cpp.cpp.
bool moveit_cpp::MoveItCpp::getCurrentState | ( | moveit::core::RobotStatePtr & | current_state, |
double | wait_seconds | ||
) |
Get the current state queried from the current state monitor.
wait_seconds | the time in seconds for the state monitor to wait for a robot state. |
Definition at line 211 of file moveit_cpp.cpp.
const ros::NodeHandle & moveit_cpp::MoveItCpp::getNodeHandle | ( | ) | const |
Get the ROS node handle of this instance operates on.
Definition at line 206 of file moveit_cpp.cpp.
const std::map< std::string, planning_pipeline::PlanningPipelinePtr > & moveit_cpp::MoveItCpp::getPlanningPipelines | ( | ) | const |
Get all loaded planning pipeline instances mapped to their reference names.
Definition at line 233 of file moveit_cpp.cpp.
planning_scene_monitor::PlanningSceneMonitorConstPtr moveit_cpp::MoveItCpp::getPlanningSceneMonitor | ( | ) | const |
Get the stored instance of the planning scene monitor.
Definition at line 238 of file moveit_cpp.cpp.
planning_scene_monitor::PlanningSceneMonitorPtr moveit_cpp::MoveItCpp::getPlanningSceneMonitorNonConst | ( | ) |
Definition at line 243 of file moveit_cpp.cpp.
moveit::core::RobotModelConstPtr moveit_cpp::MoveItCpp::getRobotModel | ( | ) | const |
Get the RobotModel object.
Definition at line 201 of file moveit_cpp.cpp.
std::shared_ptr<tf2_ros::Buffer> moveit_cpp::MoveItCpp::getTFBuffer | ( | ) |
std::shared_ptr< tf2_ros::Buffer > moveit_cpp::MoveItCpp::getTFBuffer | ( | ) | const |
Definition at line 307 of file moveit_cpp.cpp.
trajectory_execution_manager::TrajectoryExecutionManagerConstPtr moveit_cpp::MoveItCpp::getTrajectoryExecutionManager | ( | ) | const |
Get the stored instance of the trajectory execution manager.
Definition at line 248 of file moveit_cpp.cpp.
trajectory_execution_manager::TrajectoryExecutionManagerPtr moveit_cpp::MoveItCpp::getTrajectoryExecutionManagerNonConst | ( | ) |
Definition at line 253 of file moveit_cpp.cpp.
|
private |
Initialize and setup the planning pipelines.
Definition at line 162 of file moveit_cpp.cpp.
|
private |
Initialize and setup the planning scene monitor.
Definition at line 126 of file moveit_cpp.cpp.
bool moveit_cpp::MoveItCpp::terminatePlanningPipeline | ( | std::string const & | pipeline_name | ) |
Utility to terminate a given planning pipeline.
Definition at line 288 of file moveit_cpp.cpp.
|
private |
Definition at line 207 of file moveit_cpp.h.
|
private |
Definition at line 202 of file moveit_cpp.h.
|
private |
Definition at line 206 of file moveit_cpp.h.
|
private |
Definition at line 203 of file moveit_cpp.h.
|
protected |
Definition at line 197 of file moveit_cpp.h.
|
protected |
Definition at line 198 of file moveit_cpp.h.
|
private |
Definition at line 210 of file moveit_cpp.h.