|
|
@ -2,7 +2,7 @@ |
|
|
|
#include <image_transport/image_transport.h> |
|
|
|
#include <cv_bridge/cv_bridge.h> |
|
|
|
#include <sensor_msgs/image_encodings.h> |
|
|
|
#include <geometry_msgs/Twist.h> |
|
|
|
#include <papillon/BoundingBox.h> |
|
|
|
|
|
|
|
#include <opencv/cv.h> |
|
|
|
|
|
|
@ -19,7 +19,7 @@ class Traite_image { |
|
|
|
cv::Mat prev; |
|
|
|
cv::Mat last_T; |
|
|
|
bool first = true; |
|
|
|
int resize_f = 2; |
|
|
|
int resize_f = 1; |
|
|
|
|
|
|
|
int theObject[2] = {0,0}; |
|
|
|
cv::Rect objectBoundingRectangle = cv::Rect(0,0,0,0); |
|
|
@ -34,7 +34,7 @@ class Traite_image { |
|
|
|
|
|
|
|
Traite_image() : n("~"),it(n) { |
|
|
|
pub_img = it.advertise("/image_out", 1); |
|
|
|
pub_cmd = n.advertise<geometry_msgs::Twist>("/vrep/drone/cmd_vel", 1); |
|
|
|
pub_cmd = n.advertise<papillon::BoundingBox>("/bbox", 1); |
|
|
|
sub = it.subscribe("/usb_cam/image_raw", 1, [this](const sensor_msgs::ImageConstPtr& img) -> void { this->on_image(img);},ros::VoidPtr(),image_transport::TransportHints("compressed")); |
|
|
|
} |
|
|
|
|
|
|
|