moveit_bridge.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2016 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 /* Authors: Taehun Lim (Darby) */
18 
19 #ifndef OPEN_MANIPULATOR_WITH_TB3_MOVEIT_BRIDGE_H
20 #define OPEN_MANIPULATOR_WITH_TB3_MOVEIT_BRIDGE_H
21 
22 #include <ros/ros.h>
23 
27 
31 
32 #include <moveit_msgs/DisplayTrajectory.h>
33 
34 #include <trajectory_msgs/JointTrajectory.h>
35 #include <trajectory_msgs/JointTrajectoryPoint.h>
36 
37 #include <vector>
38 
39 #include <std_msgs/String.h>
40 #include <std_msgs/Float64.h>
41 #include <std_msgs/Float64MultiArray.h>
42 #include <geometry_msgs/PoseStamped.h>
43 
44 #include "open_manipulator_msgs/OpenManipulatorState.h"
45 
46 #include "open_manipulator_msgs/GetJointPosition.h"
47 #include "open_manipulator_msgs/GetKinematicsPose.h"
48 
49 #include "open_manipulator_msgs/SetJointPosition.h"
50 #include "open_manipulator_msgs/SetKinematicsPose.h"
51 
53 {
54  private:
55  // ROS NodeHandle
58 
59  // ROS Parameters
60  std::string planning_group_;
62 
63  // ROS Publisher
65 
66  // ROS Subscribers
68 
69  // ROS Service Server
74 
75  // ROS Service Client
76 
77  // MoveIt! interface
79 
80  public:
81  MoveItBridge();
82  virtual ~MoveItBridge();
83 
84  void controlCallback(const ros::TimerEvent&);
85 
86  void initPublisher();
87  void initSubscriber();
88 
89  void initServer();
90 
91  bool calcPlannedPath(const std::string planning_group, open_manipulator_msgs::JointPosition msg);
92  bool calcPlannedPath(const std::string planning_group, open_manipulator_msgs::KinematicsPose msg);
93 
94  void displayPlannedPathMsgCallback(const moveit_msgs::DisplayTrajectory::ConstPtr &msg);
95 
96  bool setJointPositionMsgCallback(open_manipulator_msgs::SetJointPosition::Request &req,
97  open_manipulator_msgs::SetJointPosition::Response &res);
98 
99  bool setKinematicsPoseMsgCallback(open_manipulator_msgs::SetKinematicsPose::Request &req,
100  open_manipulator_msgs::SetKinematicsPose::Response &res);
101 
102  bool getJointPositionMsgCallback(open_manipulator_msgs::GetJointPosition::Request &req,
103  open_manipulator_msgs::GetJointPosition::Response &res);
104 
105  bool getKinematicsPoseMsgCallback(open_manipulator_msgs::GetKinematicsPose::Request &req,
106  open_manipulator_msgs::GetKinematicsPose::Response &res);
107 };
108 
109 #endif /*OPEN_MANIPULATOR_WITH_TB3_MOVEIT_BRIDGE_H*/
virtual ~MoveItBridge()
moveit::planning_interface::MoveGroupInterface * move_group_
Definition: moveit_bridge.h:78
std::string planning_group_
Definition: moveit_bridge.h:60
bool getKinematicsPoseMsgCallback(open_manipulator_msgs::GetKinematicsPose::Request &req, open_manipulator_msgs::GetKinematicsPose::Response &res)
bool setJointPositionMsgCallback(open_manipulator_msgs::SetJointPosition::Request &req, open_manipulator_msgs::SetJointPosition::Response &res)
ros::ServiceServer get_kinematics_pose_server_
Definition: moveit_bridge.h:71
bool use_platform_
Definition: moveit_bridge.h:61
void initSubscriber()
void initPublisher()
void controlCallback(const ros::TimerEvent &)
ros::ServiceServer set_joint_position_server_
Definition: moveit_bridge.h:72
ros::Subscriber display_planned_path_sub_
Definition: moveit_bridge.h:67
ros::NodeHandle priv_nh_
Definition: moveit_bridge.h:57
ros::ServiceServer set_kinematics_pose_server_
Definition: moveit_bridge.h:73
ros::ServiceServer get_joint_position_server_
Definition: moveit_bridge.h:70
ros::Publisher joint_trajectory_point_pub_
Definition: moveit_bridge.h:64
void displayPlannedPathMsgCallback(const moveit_msgs::DisplayTrajectory::ConstPtr &msg)
bool setKinematicsPoseMsgCallback(open_manipulator_msgs::SetKinematicsPose::Request &req, open_manipulator_msgs::SetKinematicsPose::Response &res)
bool getJointPositionMsgCallback(open_manipulator_msgs::GetJointPosition::Request &req, open_manipulator_msgs::GetJointPosition::Response &res)
ros::NodeHandle nh_
Definition: moveit_bridge.h:56
bool calcPlannedPath(const std::string planning_group, open_manipulator_msgs::JointPosition msg)


open_manipulator_with_tb3_tools
Author(s): Darby Lim
autogenerated on Thu Sep 10 2020 03:52:23