Classes | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
moveit_cpp::MoveItCpp Class Reference

#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 &current_state, double wait_seconds)
 Get the current state queried from the current state monitor. More...
 
const ros::NodeHandlegetNodeHandle () const
 Get the ROS node handle of this instance operates on. More...
 
std::set< std::stringgetPlanningPipelineNames (const std::string &group_name="") const
 Get the names of all loaded planning pipelines. Specify group_name to filter the results by planning group. More...
 
const std::map< std::string, planning_pipeline::PlanningPipelinePtr > & getPlanningPipelines () const
 Get all loaded planning pipeline instances mapped to their reference names. More...
 
const planning_scene_monitor::PlanningSceneMonitorPtr & 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...
 
const std::shared_ptr< tf2_ros::Buffer > & getTFBuffer () const
 
const trajectory_execution_manager::TrajectoryExecutionManagerPtr & 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
 
MoveItCppoperator= (const MoveItCpp &)=delete
 
MoveItCppoperator= (MoveItCpp &&other)=default
 
 ~MoveItCpp ()
 Destructor. More...
 

Protected Attributes

std::shared_ptr< tf2_ros::Buffertf_buffer_
 
std::shared_ptr< tf2_ros::TransformListenertf_listener_
 

Private Member Functions

void clearContents ()
 Reset all member variables. More...
 
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_
 
std::map< std::string, std::set< std::string > > groups_pipelines_map_
 
ros::NodeHandle node_handle_
 
std::map< std::string, planning_pipeline::PlanningPipelinePtr > planning_pipelines_
 
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_
 
moveit::core::RobotModelConstPtr robot_model_
 
trajectory_execution_manager::TrajectoryExecutionManagerPtr trajectory_execution_manager_
 

Detailed Description

Definition at line 86 of file moveit_cpp.h.

Constructor & Destructor Documentation

◆ MoveItCpp() [1/4]

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.

◆ MoveItCpp() [2/4]

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.

◆ MoveItCpp() [3/4]

moveit_cpp::MoveItCpp::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.

◆ MoveItCpp() [4/4]

moveit_cpp::MoveItCpp::MoveItCpp ( MoveItCpp &&  other)
default

◆ ~MoveItCpp()

moveit_cpp::MoveItCpp::~MoveItCpp ( )

Destructor.

Definition at line 122 of file moveit_cpp.cpp.

Member Function Documentation

◆ clearContents()

void moveit_cpp::MoveItCpp::clearContents ( )
private

Reset all member variables.

Definition at line 336 of file moveit_cpp.cpp.

◆ execute()

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 302 of file moveit_cpp.cpp.

◆ getCurrentState() [1/2]

moveit::core::RobotStatePtr moveit_cpp::MoveItCpp::getCurrentState ( double  wait_seconds = 0.0)

Get the current state queried from the current state monitor.

Parameters
wait_secondsthe time in seconds for the state monitor to wait for a robot state.

Definition at line 240 of file moveit_cpp.cpp.

◆ getCurrentState() [2/2]

bool moveit_cpp::MoveItCpp::getCurrentState ( moveit::core::RobotStatePtr &  current_state,
double  wait_seconds 
)

Get the current state queried from the current state monitor.

Parameters
wait_secondsthe time in seconds for the state monitor to wait for a robot state.

Definition at line 225 of file moveit_cpp.cpp.

◆ getNodeHandle()

const ros::NodeHandle & moveit_cpp::MoveItCpp::getNodeHandle ( ) const

Get the ROS node handle of this instance operates on.

Definition at line 220 of file moveit_cpp.cpp.

◆ getPlanningPipelineNames()

std::set< std::string > moveit_cpp::MoveItCpp::getPlanningPipelineNames ( const std::string group_name = "") const

Get the names of all loaded planning pipelines. Specify group_name to filter the results by planning group.

Definition at line 252 of file moveit_cpp.cpp.

◆ getPlanningPipelines()

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 247 of file moveit_cpp.cpp.

◆ getPlanningSceneMonitor()

const planning_scene_monitor::PlanningSceneMonitorPtr & moveit_cpp::MoveItCpp::getPlanningSceneMonitor ( ) const

Get the stored instance of the planning scene monitor.

Definition at line 282 of file moveit_cpp.cpp.

◆ getPlanningSceneMonitorNonConst()

planning_scene_monitor::PlanningSceneMonitorPtr moveit_cpp::MoveItCpp::getPlanningSceneMonitorNonConst ( )

Definition at line 287 of file moveit_cpp.cpp.

◆ getRobotModel()

moveit::core::RobotModelConstPtr moveit_cpp::MoveItCpp::getRobotModel ( ) const

Get the RobotModel object.

Definition at line 215 of file moveit_cpp.cpp.

◆ getTFBuffer()

const std::shared_ptr< tf2_ros::Buffer > & moveit_cpp::MoveItCpp::getTFBuffer ( ) const

Definition at line 331 of file moveit_cpp.cpp.

◆ getTrajectoryExecutionManager()

const trajectory_execution_manager::TrajectoryExecutionManagerPtr & moveit_cpp::MoveItCpp::getTrajectoryExecutionManager ( ) const

Get the stored instance of the trajectory execution manager.

Definition at line 292 of file moveit_cpp.cpp.

◆ getTrajectoryExecutionManagerNonConst()

trajectory_execution_manager::TrajectoryExecutionManagerPtr moveit_cpp::MoveItCpp::getTrajectoryExecutionManagerNonConst ( )

Definition at line 297 of file moveit_cpp.cpp.

◆ loadPlanningPipelines()

bool moveit_cpp::MoveItCpp::loadPlanningPipelines ( const PlanningPipelineOptions options)
private

Initialize and setup the planning pipelines.

Definition at line 164 of file moveit_cpp.cpp.

◆ loadPlanningSceneMonitor()

bool moveit_cpp::MoveItCpp::loadPlanningSceneMonitor ( const PlanningSceneMonitorOptions options)
private

Initialize and setup the planning scene monitor.

Definition at line 128 of file moveit_cpp.cpp.

◆ operator=() [1/2]

MoveItCpp& moveit_cpp::MoveItCpp::operator= ( const MoveItCpp )
delete

◆ operator=() [2/2]

MoveItCpp& moveit_cpp::MoveItCpp::operator= ( MoveItCpp &&  other)
default

Member Data Documentation

◆ groups_algorithms_map_

std::map<std::string, std::set<std::string> > moveit_cpp::MoveItCpp::groups_algorithms_map_
private

Definition at line 209 of file moveit_cpp.h.

◆ groups_pipelines_map_

std::map<std::string, std::set<std::string> > moveit_cpp::MoveItCpp::groups_pipelines_map_
private

Definition at line 208 of file moveit_cpp.h.

◆ node_handle_

ros::NodeHandle moveit_cpp::MoveItCpp::node_handle_
private

Definition at line 202 of file moveit_cpp.h.

◆ planning_pipelines_

std::map<std::string, planning_pipeline::PlanningPipelinePtr> moveit_cpp::MoveItCpp::planning_pipelines_
private

Definition at line 207 of file moveit_cpp.h.

◆ planning_scene_monitor_

planning_scene_monitor::PlanningSceneMonitorPtr moveit_cpp::MoveItCpp::planning_scene_monitor_
private

Definition at line 204 of file moveit_cpp.h.

◆ robot_model_

moveit::core::RobotModelConstPtr moveit_cpp::MoveItCpp::robot_model_
private

Definition at line 203 of file moveit_cpp.h.

◆ tf_buffer_

std::shared_ptr<tf2_ros::Buffer> moveit_cpp::MoveItCpp::tf_buffer_
protected

Definition at line 197 of file moveit_cpp.h.

◆ tf_listener_

std::shared_ptr<tf2_ros::TransformListener> moveit_cpp::MoveItCpp::tf_listener_
protected

Definition at line 198 of file moveit_cpp.h.

◆ trajectory_execution_manager_

trajectory_execution_manager::TrajectoryExecutionManagerPtr moveit_cpp::MoveItCpp::trajectory_execution_manager_
private

Definition at line 212 of file moveit_cpp.h.


The documentation for this class was generated from the following files:


planning
Author(s): Ioan Sucan , Sachin Chitta
autogenerated on Sat May 15 2021 02:25:35