3 #ifndef ROBOWFLEX_MOVEGROUP_SERVICES_
4 #define ROBOWFLEX_MOVEGROUP_SERVICES_
6 #include <ros/node_handle.h>
8 #include <moveit_msgs/MoveGroupActionGoal.h>
9 #include <moveit_msgs/MoveGroupActionResult.h>
10 #include <moveit_msgs/ExecuteTrajectoryAction.h>
12 #include <actionlib/client/simple_action_client.h>
118 actionlib::SimpleActionClient<moveit_msgs::ExecuteTrajectoryAction>
eac_;
A shared pointer wrapper for robowflex::Robot.
A const shared pointer wrapper for robowflex::Scene.
A shared pointer wrapper for robowflex::Scene.
A helper class that allows for pulling and pushing of scenes, robots, and trajectories to move group.
static const std::string EXECUTE
Name of execute trajectory service.
MoveGroupHelper(const std::string &move_group=MOVE_GROUP)
Constructor. Sets up service clients.
bool pushScene(const SceneConstPtr &scene)
Pushes the current planning scene to move group.
ResultCallback callback_
Callback function for move group results.
ros::ServiceClient gpsc_
Get planning scene service.
std::function< void(Action &)> ResultCallback
RobotPtr robot_
Robot on the parameter server used by move group.
ros::ServiceClient co_
Clear octomap service.
void moveGroupGoalCallback(const moveit_msgs::MoveGroupActionGoal &msg)
Callback function for a move group goal.
bool executeTrajectory(const robot_trajectory::RobotTrajectory &path)
Executes a planned trajectory through move group.
ros::Subscriber result_sub_
Move group result subscriber.
ros::Subscriber goal_sub_
Move group goal subscriber.
void setResultCallback(const ResultCallback &callback)
Sets a callback function that is called whenever a motion plan request is serviced by move group.
void moveGroupResultCallback(const moveit_msgs::MoveGroupActionResult &msg)
Callback function for a move group result.
bool pullScene(ScenePtr scene)
Pulls the current planning scene from move group.
~MoveGroupHelper()
Destructor. Cleans up services.
bool pullState(RobotPtr robot)
Pulls the current robot state from move group.
ros::NodeHandle nh_
Node handle.
static const std::string CLEAR_OCTOMAP
Name of clear octomap service.
actionlib::SimpleActionClient< moveit_msgs::ExecuteTrajectoryAction > eac_
static const std::string GET_SCENE
Name of get scene service.
std::map< std::string, Action > requests_
Move group requests.
static const std::string APPLY_SCENE
Name of apply scene service.
static const std::string MOVE_GROUP
Name of move_group namespace.
ros::ServiceClient apsc_
Apply planning scene service.
bool clearOctomap()
Clears the octomap in the planning scene of the movegroup.
Functions for loading and animating robots in Blender.
Main namespace. Contains all library classes and functions.
Functions for loading and animating scenes in Blender.
A container struct for all relevant information about a motion planning request to move group.
bool success
Planning success.
moveit_msgs::MotionPlanRequest request
Motion planning request.
bool toYAMLFile(const std::string &filename)
Save a recorded action to a YAML file.
bool fromYAMLFile(const std::string &filename)
Load a recorded action from a YAML file.
double time
Planning time.
ScenePtr scene
Scene used for planning.
moveit_msgs::RobotTrajectory trajectory
Planned trajectory on success.
void callback(movegroup::MoveGroupHelper::Action &action)