mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 05:06:35 +00:00
Added new qmake config option which enables real gimbal camera
Gimbal camera can be enabled and used for example with command: qmake6 CONFIG+=gimbal && make && ./rtsp_ai_player ~/azaion/models/onnx/yolov8m.onnx
This commit is contained in:
@@ -63,17 +63,23 @@ ffmpeg -re -stream_loop -1 -i $HOME/azaion/videos/table.mp4 -c copy -f rtsp rtsp
|
||||
ffplay -rtsp_transport tcp rtsp://localhost:8554/live.stream
|
||||
```
|
||||
|
||||
### Compile and run rtsp_ai_player with YOLOv8 medium AI mode:
|
||||
### Compile and run rtsp_ai_player with YOLOv8 medium AI model:
|
||||
```bash
|
||||
cd autopilot/misc/rtsp_ai_player
|
||||
qmake6 && make
|
||||
./rtsp_ai_player ~/azaion/models/onnx/yolov8m.onnx
|
||||
```
|
||||
|
||||
### Compile and run rtsp_ai_player with Azaion AI mode:
|
||||
### Compile and run rtsp_ai_player with Azaion AI model:
|
||||
```bash
|
||||
cd autopilot/misc/rtsp_ai_player
|
||||
qmake6 && make
|
||||
./rtsp_ai_player ~/azaion/models/azaion/azaion-2024-06-28.onnx
|
||||
```
|
||||
### Compile and run rtsp_ai_player with YOLOv8 medium model and gimbal camera:
|
||||
```bash
|
||||
cd autopilot/misc/rtsp_ai_player
|
||||
qmake6 CONFIG+=gimbal && make
|
||||
./rtsp_ai_player ~/azaion/models/onnx/yolov8m.onnx
|
||||
```
|
||||
|
||||
|
||||
@@ -50,7 +50,11 @@ AiEngine::AiEngine(QString modelPath, QObject *parent)
|
||||
inferenceThread3->start();
|
||||
#endif
|
||||
|
||||
#ifdef GIMBAL
|
||||
mGimbalClient = new AiEngineGimbalClient(this);
|
||||
#else
|
||||
mGimbalClient = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +77,10 @@ void AiEngine::inferenceResultsReceivedSlot(AiEngineInferenceResult result)
|
||||
qDebug() << "FPS = " << (mFrameCounter / (mElapsedTimer.elapsed()/1000.0f));
|
||||
|
||||
//qDebug() << "AiEngine got inference results in thread: " << QThread::currentThreadId();
|
||||
mGimbalClient->inferenceResultSlot(result);
|
||||
if (mGimbalClient != nullptr) {
|
||||
mGimbalClient->inferenceResultSlot(result);
|
||||
}
|
||||
|
||||
cv::imshow("Received Frame", result.frame);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,9 @@ void AiEngineGimbalClient::inferenceResultSlot(AiEngineInferenceResult result)
|
||||
<< "Name:" << object.classStr
|
||||
<< "Probability:" << bestObjectProb;
|
||||
|
||||
emit zoomToAiTarget(target);
|
||||
if (mGimbalServer->isAvailable()) {
|
||||
emit zoomToAiTarget(target);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,9 +4,16 @@ CONFIG += c++11 concurrent console
|
||||
MOC_DIR = moc
|
||||
OBJECTS_DIR = obj
|
||||
|
||||
SOURCES = $$PWD/*.cpp $$PWD/../../misc/camera/a8_remote/remoteControl.cpp
|
||||
SOURCES = $$PWD/*.cpp
|
||||
HEADERS = $$PWD/*.h
|
||||
INCLUDEPATH += $$PWD/../../misc/camera/a8_remote
|
||||
|
||||
gimbal {
|
||||
message("Using real gimbal camera.")
|
||||
QMAKE_CXXFLAGS += -DGIMBAL
|
||||
}
|
||||
else {
|
||||
message("Not using real gimbal camera.")
|
||||
}
|
||||
|
||||
opi5 {
|
||||
message("OPI5 build")
|
||||
|
||||
Reference in New Issue
Block a user