play_motion_builder.h
Go to the documentation of this file.
1 #ifndef H_PLAY_MOTION_BUILDER
2 #define H_PLAY_MOTION_BUILDER
3 
4 #include <ros/ros.h>
7 #include <play_motion_msgs/PlayMotionAction.h>
8 
9 #include <play_motion_builder_msgs/BuildMotionAction.h>
10 #include <play_motion_builder_msgs/RunMotionAction.h>
11 #include <play_motion_builder_msgs/EditMotion.h>
12 #include <play_motion_builder_msgs/StoreMotion.h>
13 #include <play_motion_builder_msgs/ChangeJoints.h>
14 #include <play_motion_builder_msgs/ListJointGroups.h>
15 
17 
18 namespace pal
19 {
21 {
25 
26 public:
28  bool initialize();
29 
30 private:
33  BMServer action_server_;
40  bool running_;
41 
42  std::string robot_description_;
43  std::string semantic_description_;
44  std::vector<std::string> extra_joints_;
45 
46  std::unique_ptr<Motion> motion_;
47 
48  // ROS Interface methods
49  void buildMotionGoalCb();
50  void buildMotionPreemptCb();
51  void runMotionPreemptCb();
52  bool editMotionCb(play_motion_builder_msgs::EditMotion::Request &req,
53  play_motion_builder_msgs::EditMotion::Response &res);
54  bool storeMotionCb(play_motion_builder_msgs::StoreMotion::Request &req,
55  play_motion_builder_msgs::StoreMotion::Response &res);
56  bool changeJointsCb(play_motion_builder_msgs::ChangeJoints::Request &req,
57  play_motion_builder_msgs::ChangeJoints::Response &res);
58  bool listJointGroupsCb(play_motion_builder_msgs::ListJointGroups::Request &req,
59  play_motion_builder_msgs::ListJointGroups::Response &res);
60  void executeRunMotionCb(const play_motion_builder_msgs::RunMotionGoalConstPtr &goal);
61 
62  // Utility methods
63  void motionToROSMsg(play_motion_builder_msgs::Motion &motion);
64 };
65 
66 } // namespace pal
67 
68 #endif /* H_PLAY_MOTION_BUILDER */
bool storeMotionCb(play_motion_builder_msgs::StoreMotion::Request &req, play_motion_builder_msgs::StoreMotion::Response &res)
actionlib::SimpleActionClient< play_motion_msgs::PlayMotionAction > PMClient
bool editMotionCb(play_motion_builder_msgs::EditMotion::Request &req, play_motion_builder_msgs::EditMotion::Response &res)
void motionToROSMsg(play_motion_builder_msgs::Motion &motion)
ros::ServiceServer list_joints_server_
actionlib::SimpleActionServer< play_motion_builder_msgs::BuildMotionAction > BMServer
std::vector< std::string > extra_joints_
void executeRunMotionCb(const play_motion_builder_msgs::RunMotionGoalConstPtr &goal)
ros::ServiceServer change_joints_server_
bool changeJointsCb(play_motion_builder_msgs::ChangeJoints::Request &req, play_motion_builder_msgs::ChangeJoints::Response &res)
actionlib::SimpleActionServer< play_motion_builder_msgs::RunMotionAction > RMServer
ros::ServiceServer store_motion_server_
bool listJointGroupsCb(play_motion_builder_msgs::ListJointGroups::Request &req, play_motion_builder_msgs::ListJointGroups::Response &res)
ros::ServiceServer edit_motion_server_
std::unique_ptr< Motion > motion_


play_motion_builder
Author(s):
autogenerated on Mon Feb 28 2022 23:13:39