Public Member Functions | Protected Attributes | List of all members
MoveitMediator Class Reference

Refined MoveitMediator. More...

#include <moveit_mediator.h>

Inheritance diagram for MoveitMediator:
Inheritance graph
[legend]

Public Member Functions

void connectRobots (std::unique_ptr< AbstractRobotDecorator > robot) override
 connect robot and initialize Moveit components More...
 
moveit::task_constructor::Task createTask (AbstractRobotDecorator *r, moveit_msgs::CollisionObject &source, tf2::Transform &target)
 Create Task with Moveit Task Constructor. More...
 
std::map< std::string, std::pair< moveit_msgs::RobotTrajectory, moveit_msgs::PlanningScene > > & executions ()
 
void manipulateACM (AbstractRobotDecorator *mr, moveit_msgs::PlanningScene &ps)
 Manipulate ACM by extracting inforamtion of spicified robot. More...
 
void mediate () override
 mediator function More...
 
void mergeACM (moveit_msgs::PlanningScene &in)
 Threaded function which calls executaion on a Robot. More...
 
void mergePS (moveit_msgs::PlanningScene &out, moveit_msgs::PlanningScene in, AbstractRobotDecorator *mr)
 Merge Planning scene. More...
 
std::shared_ptr< moveit::planning_interface::MoveGroupInterface > mgi ()
 
 MoveitMediator (std::shared_ptr< ros::NodeHandle > const &nh)
 AbstractMediator constructor. More...
 
void parallelExec (AbstractRobotDecorator &mr, moveit_msgs::RobotTrajectory rt)
 Threaded function which calls executaion on a Robot. More...
 
void publishTables ()
 publish all panels in the planning scene More...
 
void setPanel () override
 Sets panels for robots. More...
 
void setTasks (std::multimap< std::string, std::pair< tf2::Vector3, std::queue< moveit_task_constructor_msgs::ExecuteTaskSolutionGoal >>> &tasks)
 
std::map< std::string, std::vector< moveit::task_constructor::Task > > & taskMap ()
 
void taskPlanner ()
 Threaded function which calls executaion on a Robot. More...
 
- Public Member Functions inherited from AbstractMediator
 AbstractMediator (std::shared_ptr< ros::NodeHandle > const &d)
 AbstractMediator constructor. More...
 
CuboidReadercuboidReader ()
 Get Cuboid_reader. More...
 
std::string & dirname ()
 Get dirname. More...
 
std::map< const std::string, std::vector< pcl::PointXYZ > > & resultVector ()
 Get result_vector. More...
 
RobotReaderrobotReader ()
 Get Robot_reader. More...
 
std::map< std::string, std::unique_ptr< AbstractRobotDecorator > > & robots ()
 Get robots. More...
 
void setDirname (std::string &dirn)
 Set dirname. More...
 
void setResultVector (std::map< const std::string, std::vector< pcl::PointXYZ >> &res)
 Set result vector. More...
 
pcl::PointCloud< pcl::PointXYZ >::Ptr vector2cloud (std::vector< pcl::PointXYZ > &vector)
 Cloud converter. More...
 
WingReaderwingReader ()
 Get Wing_reader. More...
 
std::map< const std::string, std::vector< std::unique_ptr< AbstractRobotElement > > > & wings ()
 Get wings. More...
 

Protected Attributes

std::map< std::string, std::vector< uint8_t > > acm_
 shared allowed collision matrix between robots More...
 
std::shared_ptr< moveit::task_constructor::solvers::CartesianPath > cartesian_planner_
 Moveit task Constructior cartesian planner. More...
 
std::map< std::string, std::pair< moveit_msgs::RobotTrajectory, moveit_msgs::PlanningScene > > executions_
 Shared execution map containing groot node information. More...
 
std::unique_ptr< JobReaderjob_reader_
 jobReader instancde which reads task information More...
 
std::shared_ptr< moveit::planning_interface::MoveGroupInterface > mgi_
 Move Group Interface of the whole multi-cell. More...
 
std::shared_ptr< ros::Publisher > planning_scene_diff_publisher_
 Publisher to manage PlanningScene diffs. More...
 
std::shared_ptr< planning_scene::PlanningScene > ps_
 Shared Planning Scene. More...
 
std::unique_ptr< moveit::planning_interface::PlanningSceneInterface > psi_
 PlanningSceneInteface to manage Scene Objects. More...
 
std::shared_ptr< moveit::core::RobotModel > robot_model_
 Moveit Robot-Model as specified in SDF. More...
 
std::map< std::string, std::vector< uint8_t > > rs_
 shared robot state between all robots More...
 
std::shared_ptr< moveit::task_constructor::solvers::PipelinePlanner > sampling_planner_
 Moveit task Constructior simple planner. More...
 
std::map< std::string, std::vector< moveit::task_constructor::Task > > task_map_
 Tasks mapped to Robot. More...
 
std::multimap< std::string, std::pair< tf2::Vector3, std::queue< moveit_task_constructor_msgs::ExecuteTaskSolutionGoal > > > tasks_
 tasks multimap More...
 
- Protected Attributes inherited from AbstractMediator
std::unique_ptr< CuboidReadercuboid_reader_
 coboidReader instance that distinguishes between scene objects of type bin and box More...
 
std::string dirname_
 Dirname of the reference protobuff. More...
 
std::shared_ptr< ros::NodeHandle > nh_
 Nodehandle for access to the Rosparam server. More...
 
std::vector< std::vector< std::vector< tf2::Transform > > > relative_bounds_
 total bound a workspace More...
 
std::map< const std::string, std::vector< pcl::PointXYZ > > result_vector_
 Result_vector of base positions linked to robot. More...
 
std::unique_ptr< RobotReaderrobot_reader_
 Robot_reader which collects robot poses. More...
 
std::map< std::string, std::unique_ptr< AbstractRobotDecorator > > robots_
 Robots agents. More...
 
std::unique_ptr< TSReadertask_space_reader_
 Task_space reader which provides drop off positions. More...
 
std::unique_ptr< WingReaderwing_reader_
 Wing_reader which collects panel information of robots. More...
 
std::map< const std::string, std::vector< std::unique_ptr< AbstractRobotElement > > > wings_
 

Detailed Description

Refined MoveitMediator.

Build Multi-cells from specifications and apply MoveIt library, as well as Groot library functionallity to display the state in a task.

Definition at line 58 of file moveit_mediator.h.

Constructor & Destructor Documentation

◆ MoveitMediator()

MoveitMediator::MoveitMediator ( std::shared_ptr< ros::NodeHandle > const &  nh)

AbstractMediator constructor.

initializes task_space reader

Parameters
nhRos nodehandle

Definition at line 12 of file moveit_mediator.cpp.

Member Function Documentation

◆ connectRobots()

void MoveitMediator::connectRobots ( std::unique_ptr< AbstractRobotDecorator robot)
overridevirtual

connect robot and initialize Moveit components

Set up acm_ and rs_ members to track, merge, and publish changes during execution.

Parameters
robotRobotDecorator of Robot

Implements AbstractMediator.

Definition at line 36 of file moveit_mediator.cpp.

◆ createTask()

moveit::task_constructor::Task MoveitMediator::createTask ( AbstractRobotDecorator r,
moveit_msgs::CollisionObject &  source,
tf2::Transform &  target 
)

Create Task with Moveit Task Constructor.

Parameters
rrobot
sourceinitaial position of object
targetpose of object after execution

Definition at line 589 of file moveit_mediator.cpp.

◆ executions()

std::map<std::string, std::pair<moveit_msgs::RobotTrajectory, moveit_msgs::PlanningScene> >& MoveitMediator::executions ( )
inline

Definition at line 145 of file moveit_mediator.h.

◆ manipulateACM()

void MoveitMediator::manipulateACM ( AbstractRobotDecorator mr,
moveit_msgs::PlanningScene &  ps 
)

Manipulate ACM by extracting inforamtion of spicified robot.

Parameters
mrRobot
psPlanning Scene which contains ACM information

Definition at line 118 of file moveit_mediator.cpp.

◆ mediate()

void MoveitMediator::mediate ( )
overridevirtual

mediator function

Construction of robots and planning scenes. Calculate plans in preor to chain them so that they can be executed in parallel.

Implements AbstractMediator.

Definition at line 111 of file moveit_mediator.cpp.

◆ mergeACM()

void MoveitMediator::mergeACM ( moveit_msgs::PlanningScene &  in)

Threaded function which calls executaion on a Robot.

Parameters
inmerges acm into shared acm

Definition at line 521 of file moveit_mediator.cpp.

◆ mergePS()

void MoveitMediator::mergePS ( moveit_msgs::PlanningScene &  out,
moveit_msgs::PlanningScene  in,
AbstractRobotDecorator mr 
)

Merge Planning scene.

Parameters
outmerged Planning Scene
inplanning scene to merge
mrRobot to determine parts to merge in out planning scene

Definition at line 545 of file moveit_mediator.cpp.

◆ mgi()

std::shared_ptr<moveit::planning_interface::MoveGroupInterface> MoveitMediator::mgi ( )
inline

Definition at line 85 of file moveit_mediator.h.

◆ parallelExec()

void MoveitMediator::parallelExec ( AbstractRobotDecorator mr,
moveit_msgs::RobotTrajectory  rt 
)

Threaded function which calls executaion on a Robot.

Parameters
mrRobotDecorator of Robot
rtRobot trajetory

Definition at line 585 of file moveit_mediator.cpp.

◆ publishTables()

void MoveitMediator::publishTables ( )

publish all panels in the planning scene

Definition at line 94 of file moveit_mediator.cpp.

◆ setPanel()

void MoveitMediator::setPanel ( )
overridevirtual

Sets panels for robots.

Implements AbstractMediator.

Definition at line 57 of file moveit_mediator.cpp.

◆ setTasks()

void MoveitMediator::setTasks ( std::multimap< std::string, std::pair< tf2::Vector3, std::queue< moveit_task_constructor_msgs::ExecuteTaskSolutionGoal >>> &  tasks)
inline

Definition at line 148 of file moveit_mediator.h.

◆ taskMap()

std::map<std::string, std::vector<moveit::task_constructor::Task> >& MoveitMediator::taskMap ( )
inline

Definition at line 146 of file moveit_mediator.h.

◆ taskPlanner()

void MoveitMediator::taskPlanner ( )

Threaded function which calls executaion on a Robot.

Parameters
inmerges acm into shared acm

Definition at line 236 of file moveit_mediator.cpp.

Member Data Documentation

◆ acm_

std::map<std::string, std::vector<uint8_t> > MoveitMediator::acm_
protected

shared allowed collision matrix between robots

Definition at line 69 of file moveit_mediator.h.

◆ cartesian_planner_

std::shared_ptr<moveit::task_constructor::solvers::CartesianPath> MoveitMediator::cartesian_planner_
protected

Moveit task Constructior cartesian planner.

Definition at line 66 of file moveit_mediator.h.

◆ executions_

std::map<std::string, std::pair<moveit_msgs::RobotTrajectory, moveit_msgs::PlanningScene> > MoveitMediator::executions_
protected

Shared execution map containing groot node information.

Definition at line 72 of file moveit_mediator.h.

◆ job_reader_

std::unique_ptr<JobReader> MoveitMediator::job_reader_
protected

jobReader instancde which reads task information

Definition at line 68 of file moveit_mediator.h.

◆ mgi_

std::shared_ptr<moveit::planning_interface::MoveGroupInterface> MoveitMediator::mgi_
protected

Move Group Interface of the whole multi-cell.

Definition at line 61 of file moveit_mediator.h.

◆ planning_scene_diff_publisher_

std::shared_ptr<ros::Publisher> MoveitMediator::planning_scene_diff_publisher_
protected

Publisher to manage PlanningScene diffs.

Definition at line 64 of file moveit_mediator.h.

◆ ps_

std::shared_ptr<planning_scene::PlanningScene> MoveitMediator::ps_
protected

Shared Planning Scene.

Definition at line 63 of file moveit_mediator.h.

◆ psi_

std::unique_ptr<moveit::planning_interface::PlanningSceneInterface> MoveitMediator::psi_
protected

PlanningSceneInteface to manage Scene Objects.

Definition at line 62 of file moveit_mediator.h.

◆ robot_model_

std::shared_ptr<moveit::core::RobotModel> MoveitMediator::robot_model_
protected

Moveit Robot-Model as specified in SDF.

Definition at line 60 of file moveit_mediator.h.

◆ rs_

std::map<std::string, std::vector<uint8_t> > MoveitMediator::rs_
protected

shared robot state between all robots

Definition at line 70 of file moveit_mediator.h.

◆ sampling_planner_

std::shared_ptr<moveit::task_constructor::solvers::PipelinePlanner> MoveitMediator::sampling_planner_
protected

Moveit task Constructior simple planner.

Definition at line 65 of file moveit_mediator.h.

◆ task_map_

std::map<std::string, std::vector<moveit::task_constructor::Task> > MoveitMediator::task_map_
protected

Tasks mapped to Robot.

Definition at line 67 of file moveit_mediator.h.

◆ tasks_

std::multimap<std::string, std::pair<tf2::Vector3, std::queue<moveit_task_constructor_msgs::ExecuteTaskSolutionGoal> > > MoveitMediator::tasks_
protected

tasks multimap

Definition at line 71 of file moveit_mediator.h.


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


multi_cell_builder
Author(s): Matteo Anedda
autogenerated on Sun Apr 9 2023 23:59:51