AUV-Coop-Assembly
Master Thesis for Robotics Engineering. Cooperative peg-in-hole assembly with two underwater vehicles guided by vision
visionInterfaceVision.cpp
1 #include "header/visionInterfaceVision.h"
2 
3 VisionInterfaceVision::VisionInterfaceVision(ros::NodeHandle nh, std::string robotName)
4 {
5  this->robotName = robotName;
6  this->topicRoot = "/uwsim/Vision/";
7  std::cout << "[" << robotName <<"][VISION_INTERFACE] Start"<<std::endl;
8 
9  pubHoleTransform =
10  nh.advertise<geometry_msgs::TransformStamped>((topicRoot + "holePose"), 1);
11 
12 
13 }
14 
15 
16 int VisionInterfaceVision::publishHoleTransform(Eigen::Matrix4d wThole){
17 
18  geometry_msgs::TransformStamped wThole_ros;
19  wThole_ros.child_frame_id = "hole";
20  wThole_ros.transform = CONV::transfMatrix_eigen2geomMsgs(wThole);
21 
22  pubHoleTransform.publish(wThole_ros);
23 
24  return 0;
25 
26 }