From 9304605ba9e9b9a250274fe319b677eb8585a947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E8=80=B3=E5=88=AE=E5=AD=90?= <2433069615@qq.com> Date: Sat, 21 May 2022 23:10:05 +0800 Subject: [PATCH] success test vedio --- CMakeLists.txt | 5 +---- src/main/Djitellowhite.cpp | 6 +++--- src/main/Triplet.cpp | 8 +++++--- src/main/keyboard.cpp | 2 +- src/main/main.cpp | 9 +++++---- src/main/qnode.cpp | 7 +++++-- src/main/server.cpp | 3 ++- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 647f2c6..2308cdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,10 +16,7 @@ find_package(catkin REQUIRED COMPONENTS ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( -# INCLUDE_DIRS include -# LIBRARIES Air_Ground_CEC -# CATKIN_DEPENDS roscpp -# DEPENDS system_lib + ) ########### diff --git a/src/main/Djitellowhite.cpp b/src/main/Djitellowhite.cpp index c8a8f52..432eef8 100644 --- a/src/main/Djitellowhite.cpp +++ b/src/main/Djitellowhite.cpp @@ -1,6 +1,6 @@ -#include"Djitellowhite.h" -#include -#include +#include "../include/Djitellowhite.h" +#include +#include #include diff --git a/src/main/Triplet.cpp b/src/main/Triplet.cpp index 9c0ef65..0343058 100644 --- a/src/main/Triplet.cpp +++ b/src/main/Triplet.cpp @@ -1,6 +1,7 @@ -#include"Djitellowhite.h" -#include"Hardwarelistener.h" -#include +#include "../include/Djitellowhite.h" +#include "../include/Hardwarelistener.h" +#include +/* using namespace std; int main(void){ Tello T("192.168.10.1"); @@ -43,3 +44,4 @@ int main(void){ listenkeyboard(T,serveraddr); return 0; } +*/ diff --git a/src/main/keyboard.cpp b/src/main/keyboard.cpp index dcf3ade..2233c48 100644 --- a/src/main/keyboard.cpp +++ b/src/main/keyboard.cpp @@ -1,6 +1,6 @@ #include #include -#include "Hardwarelistener.h" +#include "../include/Hardwarelistener.h" #include using namespace std; diff --git a/src/main/main.cpp b/src/main/main.cpp index c8a4313..a860dea 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -13,10 +13,10 @@ int main(int argc, char** argv) QApplication app(argc, argv); - //MainWindow CEC(0,0,0); - //CEC.show(); - LoginUi a(0); - a.show(); + MainWindow CEC(0,0,0); + CEC.show(); + //LoginUi a(0); + //a.show(); return app.exec(); 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 + * git fame --incl '\.[cht]' -twMC * rosrun rqt_graph rqt_graph * git fame */ diff --git a/src/main/qnode.cpp b/src/main/qnode.cpp index 2ba92dc..016c879 100644 --- a/src/main/qnode.cpp +++ b/src/main/qnode.cpp @@ -1,6 +1,8 @@ #include "../include/Air_Ground_CEC/qnode.hpp" #include "sensor_msgs/image_encodings.h" +#include "sensor_msgs/CompressedImage.h" + #include QNode::QNode(int argc, char **argv) : init_argc(argc), init_argv(argv){ @@ -47,7 +49,8 @@ void QNode::SubAndPubTopic(){ &QNode::batteryCallback, this); 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) @@ -172,12 +175,12 @@ void QNode::speedCallback(const nav_msgs::Odometry::ConstPtr& msg) { emit speed_x(msg->twist.twist.linear.x); emit speed_th(msg->twist.twist.angular.z); - } void QNode::imageCallback(const sensor_msgs::ImageConstPtr &msg) { + ROS_INFO("i am ok"); try { cv_bridge::CvImageConstPtr cv_ptr = diff --git a/src/main/server.cpp b/src/main/server.cpp index 581b3e7..6d4cffc 100644 --- a/src/main/server.cpp +++ b/src/main/server.cpp @@ -40,7 +40,7 @@ void udp_server(int sockfd) close(sockfd); } - +/* int main(int argc, char **argv) { int sockfd; @@ -54,5 +54,6 @@ int main(int argc, char **argv) exit(0); } +*/