AUV-Coop-Assembly
Master Thesis for Robotics Engineering. Cooperative peg-in-hole assembly with two underwater vehicles guided by vision
coordInterfaceMissMan.h
1 #ifndef COORDINTERFACEMISSMAN_H
2 #define COORDINTERFACEMISSMAN_H
3 
4 #include <iostream>
5 #include <vector>
6 #include <ros/ros.h>
7 #include <geometry_msgs/TwistStamped.h>
8 #include <geometry_msgs/Vector3Stamped.h>
9 #include <peg_msgs/toCoord.h>
10 #include <peg_msgs/transformMat.h>
11 #include <std_msgs/Bool.h>
12 #include <Eigen/Core>
13 #include "../../support/header/defines.h"
14 
21 {
22 public:
23  CoordInterfaceMissMan(ros::NodeHandle nh, std::string robotName);
24  bool getStartFromCoord();
25  void pubIamReadyOrNot(bool ready);
26 
27  int publishToCoord(Eigen::Matrix<double, VEHICLE_DOF, 1> nonCoopCartVel_eigen,
28  Eigen::Matrix<double, VEHICLE_DOF, VEHICLE_DOF> admisVelTool_eigen);
29 
30  int getCoopCartVel(Eigen::Matrix<double, VEHICLE_DOF, 1> *coopCartVel_eigen);
31 
32  //change goal things
33  int getUpdatedGoal(Eigen::Matrix4d *wTgoalTool_eigen);
34 
35 private:
36  std::string robotName;
37 
38  ros::Publisher readyPub;
39 
40  ros::Subscriber startSub;
41  bool start;
42  void startSubCallback(const std_msgs::Bool::ConstPtr& start);
43 
44 
45  ros::Publisher pubToCoord;
46  peg_msgs::toCoord toCoordMsg;
47 
48  ros::Subscriber coopVelSub;
49  std::vector<double> tempCoopVel;
50  void subMMFromCoordCallBack(const geometry_msgs::TwistStamped& msg);
51 
52  //change goal things
53  geometry_msgs::Vector3 updatedPosLin;
54  std::vector<double> updatedPosAng;
55  ros::Subscriber subUpdatedGoal;
56  void subUpdatedGoalCallback(const peg_msgs::transformMat::ConstPtr &msg);
57  //void subUpdatedGoalCallback(const geometry_msgs::Vector3Stamped& msg);
58  bool updateGoalArrived;
59 
60 
61 };
62 
63 #endif // COORDINTERFACEMISSMAN_H
int getUpdatedGoal(Eigen::Matrix4d *wTgoalTool_eigen)
change goal thingss
The CoordInterface class class to deal with ros comunications (pub/sub) from MissionManager node to C...
int publishToCoord(Eigen::Matrix< double, VEHICLE_DOF, 1 > nonCoopCartVel_eigen, Eigen::Matrix< double, VEHICLE_DOF, VEHICLE_DOF > admisVelTool_eigen)
CoordInterface::publishToCoord publish the necessary thing to the coordinator node.
CoordInterfaceMissMan(ros::NodeHandle nh, std::string robotName)