success test vedio

pull/37/head
大耳刮子 3 years ago
parent 4cd6a736f2
commit 9304605ba9

@ -16,10 +16,7 @@ find_package(catkin REQUIRED COMPONENTS
## DEPENDS: system dependencies of this project that dependent projects also need ## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package( catkin_package(
# INCLUDE_DIRS include
# LIBRARIES Air_Ground_CEC
# CATKIN_DEPENDS roscpp
# DEPENDS system_lib
) )
########### ###########

@ -1,4 +1,4 @@
#include"Djitellowhite.h" #include "../include/Djitellowhite.h"
#include <iostream> #include <iostream>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>

@ -1,6 +1,7 @@
#include"Djitellowhite.h" #include "../include/Djitellowhite.h"
#include"Hardwarelistener.h" #include "../include/Hardwarelistener.h"
#include <iostream> #include <iostream>
/*
using namespace std; using namespace std;
int main(void){ int main(void){
Tello T("192.168.10.1"); Tello T("192.168.10.1");
@ -43,3 +44,4 @@ int main(void){
listenkeyboard(T,serveraddr); listenkeyboard(T,serveraddr);
return 0; return 0;
} }
*/

@ -1,6 +1,6 @@
#include <termio.h> #include <termio.h>
#include <stdio.h> #include <stdio.h>
#include "Hardwarelistener.h" #include "../include/Hardwarelistener.h"
#include <iostream> #include <iostream>
using namespace std; using namespace std;

@ -13,10 +13,10 @@ int main(int argc, char** argv)
QApplication app(argc, argv); QApplication app(argc, argv);
//MainWindow CEC(0,0,0); MainWindow CEC(0,0,0);
//CEC.show(); CEC.show();
LoginUi a(0); //LoginUi a(0);
a.show(); //a.show();
return app.exec(); return app.exec();
return(0); return(0);
@ -26,6 +26,7 @@ int main(int argc, char** argv)
/* /*
* find . "(" -name "*.cpp" -or -name "*.h" -or -name "*.hpp" -or -name "*.qrc" ")" -print | xargs wc -l * find . "(" -name "*.cpp" -or -name "*.h" -or -name "*.hpp" -or -name "*.qrc" ")" -print | xargs wc -l
* git fame --incl '\.[cht]' -twMC
* rosrun rqt_graph rqt_graph * rosrun rqt_graph rqt_graph
* git fame * git fame
*/ */

@ -1,6 +1,8 @@
#include "../include/Air_Ground_CEC/qnode.hpp" #include "../include/Air_Ground_CEC/qnode.hpp"
#include "sensor_msgs/image_encodings.h" #include "sensor_msgs/image_encodings.h"
#include "sensor_msgs/CompressedImage.h"
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
QNode::QNode(int argc, char **argv) : init_argc(argc), init_argv(argv){ QNode::QNode(int argc, char **argv) : init_argc(argc), init_argv(argv){
@ -47,7 +49,8 @@ void QNode::SubAndPubTopic(){
&QNode::batteryCallback, this); &QNode::batteryCallback, this);
image_transport::ImageTransport it(n); image_transport::ImageTransport it(n);
image_sub = it.subscribe("camera/rgb/image_raw", 100, &QNode::imageCallback, this); //camera/rgb/image_raw
image_sub = it.subscribe("raspicam_node/image", 10, &QNode::imageCallback, this);
//image_sub0 = n.subscribe("camera/rgb/image_raw",100,&QNode::imageCallback,this) //image_sub0 = n.subscribe("camera/rgb/image_raw",100,&QNode::imageCallback,this)
@ -172,12 +175,12 @@ void QNode::speedCallback(const nav_msgs::Odometry::ConstPtr& msg)
{ {
emit speed_x(msg->twist.twist.linear.x); emit speed_x(msg->twist.twist.linear.x);
emit speed_th(msg->twist.twist.angular.z); emit speed_th(msg->twist.twist.angular.z);
} }
void QNode::imageCallback(const sensor_msgs::ImageConstPtr &msg) void QNode::imageCallback(const sensor_msgs::ImageConstPtr &msg)
{ {
ROS_INFO("i am ok");
try try
{ {
cv_bridge::CvImageConstPtr cv_ptr = cv_bridge::CvImageConstPtr cv_ptr =

@ -40,7 +40,7 @@ void udp_server(int sockfd)
close(sockfd); close(sockfd);
} }
/*
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int sockfd; int sockfd;
@ -54,5 +54,6 @@ int main(int argc, char **argv)
exit(0); exit(0);
} }
*/

Loading…
Cancel
Save