open_manipulator_teleop_keyboard.h
Go to the documentation of this file.
1 #ifndef OPEN_MANIPULATOR_TELEOP_H
2 #define OPEN_MANIPULATOR_TELEOP_H
3 
4 #include <ros/ros.h>
5 #include <sensor_msgs/JointState.h>
6 
7 #include <termios.h>
8 #include "open_manipulator_msgs/SetJointPosition.h"
9 #include "open_manipulator_msgs/SetKinematicsPose.h"
10 
11 #define NUM_OF_JOINT 4
12 #define DELTA 0.01
13 #define JOINT_DELTA 0.05
14 #define PATH_TIME 0.5
15 
17 {
18  private:
19  // ROS NodeHandle
22 
27 
30 
31  std::vector<double> present_joint_angle_;
32  std::vector<double> present_kinematic_position_;
33 
34  struct termios oldt_;
35 
36  public:
37 
40 
41  void initClient();
42  void initSubscriber();
43 
44  void jointStatesCallback(const sensor_msgs::JointState::ConstPtr &msg);
45  void kinematicsPoseCallback(const open_manipulator_msgs::KinematicsPose::ConstPtr &msg);
46 
47  std::vector<double> getPresentJointAngle();
48  std::vector<double> getPresentKinematicsPose();
49 
50  bool setJointSpacePathFromPresent(std::vector<std::string> joint_name, std::vector<double> joint_angle, double path_time);
51  bool setJointSpacePath(std::vector<std::string> joint_name, std::vector<double> joint_angle, double path_time);
52  bool setTaskSpacePathFromPresentPositionOnly(std::vector<double> kinematics_pose, double path_time);
53 
54  bool setToolControl(std::vector<double> joint_angle);
55 
56  void printText();
57  void setGoal(char ch);
58 
59  void restoreTerminalSettings(void);
60  void disableWaitingForEnter(void);
61 
62 };
63 
64 #endif //OPEN_MANIPULATOR_TELEOP_H
std::vector< double > getPresentKinematicsPose()
ros::ServiceClient goal_joint_space_path_client_
void jointStatesCallback(const sensor_msgs::JointState::ConstPtr &msg)
std::vector< double > getPresentJointAngle()
ros::ServiceClient goal_joint_space_path_from_present_client_
bool setTaskSpacePathFromPresentPositionOnly(std::vector< double > kinematics_pose, double path_time)
void kinematicsPoseCallback(const open_manipulator_msgs::KinematicsPose::ConstPtr &msg)
std::vector< double > present_joint_angle_
bool setJointSpacePath(std::vector< std::string > joint_name, std::vector< double > joint_angle, double path_time)
std::vector< double > present_kinematic_position_
bool setJointSpacePathFromPresent(std::vector< std::string > joint_name, std::vector< double > joint_angle, double path_time)
ros::ServiceClient goal_task_space_path_from_present_position_only_client_
bool setToolControl(std::vector< double > joint_angle)


open_manipulator_teleop
Author(s): Darby Lim , Hye-Jong KIM , Ryan Shim , Yong-Ho Na
autogenerated on Mon Jun 10 2019 14:12:20