Robowflex
v0.1
Making MoveIt Easy
|
A helper class that allows for pulling and pushing of scenes, robots, and trajectories to move group. More...
#include <services.h>
Classes | |
struct | Action |
A container struct for all relevant information about a motion planning request to move group. More... | |
Public Types | |
typedef std::function< void(Action &)> | ResultCallback |
Public Member Functions | |
MoveGroupHelper (const std::string &move_group=MOVE_GROUP) | |
Constructor. Sets up service clients. More... | |
~MoveGroupHelper () | |
Destructor. Cleans up services. More... | |
void | setResultCallback (const ResultCallback &callback) |
Sets a callback function that is called whenever a motion plan request is serviced by move group. More... | |
bool | executeTrajectory (const robot_trajectory::RobotTrajectory &path) |
Executes a planned trajectory through move group. More... | |
bool | pullState (RobotPtr robot) |
Pulls the current robot state from move group. More... | |
bool | pullScene (ScenePtr scene) |
Pulls the current planning scene from move group. More... | |
bool | pushScene (const SceneConstPtr &scene) |
Pushes the current planning scene to move group. More... | |
bool | clearOctomap () |
Clears the octomap in the planning scene of the movegroup. More... | |
Private Member Functions | |
void | moveGroupGoalCallback (const moveit_msgs::MoveGroupActionGoal &msg) |
Callback function for a move group goal. More... | |
void | moveGroupResultCallback (const moveit_msgs::MoveGroupActionResult &msg) |
Callback function for a move group result. More... | |
Private Attributes | |
ros::NodeHandle | nh_ |
Node handle. More... | |
ros::Subscriber | goal_sub_ |
Move group goal subscriber. More... | |
ros::Subscriber | result_sub_ |
Move group result subscriber. More... | |
ros::ServiceClient | gpsc_ |
Get planning scene service. More... | |
ros::ServiceClient | apsc_ |
Apply planning scene service. More... | |
ros::ServiceClient | co_ |
Clear octomap service. More... | |
actionlib::SimpleActionClient< moveit_msgs::ExecuteTrajectoryAction > | eac_ |
ResultCallback | callback_ |
Callback function for move group results. More... | |
std::map< std::string, Action > | requests_ |
Move group requests. More... | |
RobotPtr | robot_ |
Robot on the parameter server used by move group. More... | |
Static Private Attributes | |
static const std::string | MOVE_GROUP {"/move_group"} |
Name of move_group namespace. More... | |
static const std::string | GET_SCENE {"get_planning_scene"} |
Name of get scene service. More... | |
static const std::string | APPLY_SCENE {"apply_planning_scene"} |
Name of apply scene service. More... | |
static const std::string | CLEAR_OCTOMAP {"clear_octomap"} |
Name of clear octomap service. More... | |
static const std::string | EXECUTE {"/execute_trajectory"} |
Name of execute trajectory service. More... | |
A helper class that allows for pulling and pushing of scenes, robots, and trajectories to move group.
Definition at line 26 of file services.h.
typedef std::function<void(Action &)> robowflex::movegroup::MoveGroupHelper::ResultCallback |
Definition at line 54 of file services.h.
MoveGroupHelper::MoveGroupHelper | ( | const std::string & | move_group = MOVE_GROUP | ) |
Constructor. Sets up service clients.
[in] | move_group | Name of the move group namespace. |
Definition at line 74 of file services.cpp.
MoveGroupHelper::~MoveGroupHelper | ( | ) |
bool MoveGroupHelper::clearOctomap | ( | ) |
Clears the octomap in the planning scene of the movegroup.
Definition at line 191 of file services.cpp.
bool MoveGroupHelper::executeTrajectory | ( | const robot_trajectory::RobotTrajectory & | path | ) |
Executes a planned trajectory through move group.
[in] | path | Path to execute. |
Definition at line 112 of file services.cpp.
|
private |
Callback function for a move group goal.
[in] | msg | Goal message. |
Definition at line 199 of file services.cpp.
|
private |
Callback function for a move group result.
[in] | msg | Result message. |
Definition at line 213 of file services.cpp.
bool MoveGroupHelper::pullScene | ( | ScenePtr | scene | ) |
Pulls the current planning scene from move group.
[out] | scene | Scene to set to the current scene observed by move group. |
Definition at line 158 of file services.cpp.
bool MoveGroupHelper::pullState | ( | RobotPtr | robot | ) |
Pulls the current robot state from move group.
[out] | robot | Robot whose state to set. |
Definition at line 142 of file services.cpp.
bool MoveGroupHelper::pushScene | ( | const SceneConstPtr & | scene | ) |
Pushes the current planning scene to move group.
[in] | scene | Scene to use to set move group's current scene. |
Definition at line 182 of file services.cpp.
void MoveGroupHelper::setResultCallback | ( | const ResultCallback & | callback | ) |
Sets a callback function that is called whenever a motion plan request is serviced by move group.
[in] | callback | Callback function to call upon move group requests. |
Definition at line 107 of file services.cpp.
|
staticprivate |
Name of apply scene service.
Definition at line 129 of file services.h.
|
private |
Apply planning scene service.
Definition at line 115 of file services.h.
|
private |
Callback function for move group results.
Definition at line 121 of file services.h.
|
staticprivate |
Name of clear octomap service.
Definition at line 130 of file services.h.
|
private |
Clear octomap service.
Definition at line 116 of file services.h.
|
private |
Execute trajectory client.
Definition at line 118 of file services.h.
|
staticprivate |
Name of execute trajectory service.
Definition at line 131 of file services.h.
|
staticprivate |
Name of get scene service.
Definition at line 128 of file services.h.
|
private |
Move group goal subscriber.
Definition at line 112 of file services.h.
|
private |
Get planning scene service.
Definition at line 114 of file services.h.
|
staticprivate |
|
private |
Node handle.
Definition at line 111 of file services.h.
|
private |
Move group requests.
Definition at line 123 of file services.h.
|
private |
Move group result subscriber.
Definition at line 113 of file services.h.
|
private |
Robot on the parameter server used by move group.
Definition at line 125 of file services.h.