PIK ROS
MoveItWrapper.hpp
Go to the documentation of this file.
1 
8 #ifndef MOVEIT_WRAPPER_HPP_
9 #define MOVEIT_WRAPPER_HPP_
10 
11 #include <moveit/move_group_interface/move_group_interface.h>
12 #include <moveit/robot_model_loader/robot_model_loader.h>
13 
14 #include <vector>
15 #include <Eigen/Dense>
16 
17 typedef moveit::planning_interface::MoveGroupInterface MoveGroupInterface;
18 typedef moveit::planning_interface::MoveGroupInterfacePtr MoveGroupInterfacePtr;
19 
21 {
22 public:
23  MoveItWrapper(ros::NodeHandle &nh, const std::string &robot_name,
24  const std::string &joint_model_group_name);
25 
26  void goToJointPosition( const Eigen::VectorXd &q,
27  double acc_scaling_factor,
28  double vel_scaling_factor) const;
29 
30  Eigen::MatrixXd getJacobian(const std::string &link_name, const Eigen::VectorXd &q,
31  bool use_quaternion_representation = false) const;
32 
33  Eigen::VectorXd getFramePose(const std::string &link_name, const Eigen::VectorXd &q) const;
34 
35  uint32_t getNDof() const;
36 
37 private:
38  MoveGroupInterfacePtr move_group_;
39  robot_model_loader::RobotModelLoaderPtr robot_model_loader_;
40  robot_state::JointModelGroup *joint_model_group_;
41  robot_state::RobotStatePtr kinematic_state_;
42 
43  ros::NodeHandle nh_;
44  std::string robot_name_ = "";
45  std::string joint_model_group_name_;
46  std::string robot_model_name_;
47 
48  static std::vector<double> eigenVec2StdVec(const Eigen::VectorXd &eig_vec);
49 };
50 
51 #endif //MOVEIT_WRAPPER_HPP_
Definition: MoveItWrapper.hpp:20