Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ endif()
build_option(DEBUG "Set Debug/Release" ON)
build_option(PROFILE "Set kernel profiling" ON)

mxre_option(USE_FFMPEG_NVCODEC "Use nvcodec with ffmpeg" ON)
mxre_option(USE_OPENCV_CUDA "Use cuda-accelerated functions of OpenCV" ON)
mxre_option(USE_FFMPEG_NVCODEC "Use nvcodec with ffmpeg" OFF)
mxre_option(USE_OPENCV_CUDA "Use cuda-accelerated functions of OpenCV" OFF)

# Source codes & headers
configure_file(config/root_directory.h.in config/root_directory.h)
Expand All @@ -38,7 +38,7 @@ include(cmake/modules/OpenGL.cmake)
include(cmake/modules/OpenCV.cmake)
include(cmake/modules/RaftLib.cmake)
include(cmake/modules/LibZMQ.cmake)
include(cmake/modules/GStreamer.cmake)
# include(cmake/modules/GStreamer.cmake)
include(cmake/modules/FFmpeg.cmake)
include(cmake/modules/Spdlog.cmake)
include(cmake/modules/yaml-cpp.cmake)
Expand Down
6 changes: 3 additions & 3 deletions cmake/modules/FFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ macro(use_ffmpeg)

if(${USE_FFMPEG_NVCODEC})
# NVIDIA Performance Primitives (NPP) dependencies
pkg_search_module(NPPIG nppig nppig-10.1 nppig-10.2 nppig-10.0 nppig-9.2 nppig-9.1 nppig-9.0 nppig-8.0)
pkg_search_module(NPPIG nppig nppig-11.2 nppig-10.1 nppig-10.2 nppig-10.0 nppig-9.2 nppig-9.1 nppig-9.0 nppig-8.0)
if(NPPIG_FOUND)
include_directories(${NPPIG_INCLUDE_DIRS})
list(APPEND MXRE_LINKER_FLAGS ${NPPIG_LDFLAGS})
else(NPPIG_FOUND)
message(FATAL_ERROR "NPPIG not found")
endif(NPPIG_FOUND)

pkg_search_module(NPPICC nppicc nppicc-10.1 nppicc-10.2 nppicc-10.0 nppicc-9.2 nppicc-9.1 nppicc-9.0 nppicc-8.0)
pkg_search_module(NPPICC nppicc nppicc-11.2 nppicc-10.1 nppicc-10.2 nppicc-10.0 nppicc-9.2 nppicc-9.1 nppicc-9.0 nppicc-8.0)
if(NPPICC_FOUND)
include_directories(${NPPICC_INCLUDE_DIRS})
list(APPEND MXRE_LINKER_FLAGS ${NPPICC_LDFLAGS})
else(NPPICC_FOUND)
message(FATAL_ERROR "NPPICC not found")
endif(NPPICC_FOUND)

pkg_search_module(NPPC nppc nppc-10.1 nppc-10.2 nppc-10.0 nppc-9.2 nppc-9.1 nppc-9.0 nppc-8.0)
pkg_search_module(NPPC nppc nppc-11.2 nppc-10.1 nppc-10.2 nppc-10.0 nppc-9.2 nppc-9.1 nppc-9.0 nppc-8.0)
if(NPPC_FOUND)
include_directories(${NPPC_INCLUDE_DIRS})
list(APPEND MXRE_LINKER_FLAGS ${NPPC_LDFLAGS})
Expand Down
33 changes: 1 addition & 32 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,8 @@
file(GLOB_RECURSE EXAMPLE_SRCS modules/*.cc)
list(APPEND EXAMPLE_SRCS
ar_with_lidar/complex_yolo.cc

#marker_ar_with_cam/full_offloading/cam_fulloff_client.cc
#marker_ar_with_cam/full_offloading/cam_fulloff_server.cc
#marker_ar_with_cam/basic_example.cc

marker_ar_with_mock/mock_cam_q.cc
marker_ar_with_mock/mock_cam_adq.cc
marker_ar_with_mock/serialized_mock_cam.cc
marker_ar_with_mock/full_offloading/mock_client.cc

#marker_ar_with_img/full_offloading/img_fulloff_server.cc
#marker_ar_with_img/full_offloading/img_fulloff_client.cc

incubator/unity_test.cc
incubator/unity_writer.cc
incubator/illixr_local_server.cc
)


if(${USE_OPENCV_CUDA})
list(APPEND EXAMPLE_SRCS
#marker_ar_with_cam/full_offloading/cam_fulloff_server_with_cuda.cc
#marker_ar_with_cam/basic_example_with_cuda.cc

marker_ar_with_mock/mock_cam_cuda_q.cc
marker_ar_with_mock/mock_cam_cuda_adq.cc
marker_ar_with_mock/serialized_mock_cam_cuda.cc
marker_ar_with_mock/full_offloading/mock_server.cc

#incubator/illixr_local_server.cc
)
endif(${USE_OPENCV_CUDA})


foreach(EXAMPLE_SRC ${EXAMPLE_SRCS})
get_filename_component (NAME_WITHOUT_EXTENSION ${EXAMPLE_SRC} NAME_WE)
set(EXAMPLE_NAME "${NAME_WITHOUT_EXTENSION}")
Expand Down
71 changes: 0 additions & 71 deletions examples/ar_with_lidar/complex_yolo.cc

This file was deleted.

71 changes: 23 additions & 48 deletions examples/incubator/illixr_local_server.cc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,69 +1,44 @@

#include "types/cv/orb_marker_tracker.h"
#include <opencv2/highgui.hpp>
#include <opencv2/imgcodecs.hpp>
#include <raft>
#include <mxre>
#include <bits/stdc++.h>
#include <cv.hpp>
#include "kernels/perceptions/kimera/kimera_vio.h"
#include "types/kimera/types.h"
#include "kernels/sinks/illixr_appsink.h"
#include "kernels/sources/illixr_appsource.h"
#include "kernels/sinks/illixr_appzmqsink.h"
#include "kernels/sources/illixr_appzmqsource.h"

#include <kimera-vio/frontend/Camera.h>

using namespace std;

#define WIDTH 752
#define HEIGHT 480

void setMarker(std::string imgPath, mxre::cv_types::ORBMarkerTracker &orbMarkerTracker) {
cv::Mat image;

string imgDir = mxre::utils::PathFinder::find(imgPath);
cout << imgDir << endl;
vector<cv::String> imageName;
cv::glob(imgDir + "/2.png", imageName, false);

for(size_t i = 0; i < imageName.size(); i++) {
image = cv::imread(imageName[i]);
cv::imshow("setMarker", image);

cv::Rect roiRect = cv::selectROI("setMarker", image);
if(roiRect.width < 100 || roiRect.height < 100) {
std::cout << "Too small, select again" << std::endl;
i--;
}
else {
orbMarkerTracker.registerObject(image, roiRect);
}
}
orbMarkerTracker.printRegisteredObjects();
}


int main(int argc, char const *argv[])
{
mxre::cv_types::ORBMarkerTracker orbMarkerTracker;
setMarker("resources/illixr_markers", orbMarkerTracker);


if (argc < 3){
std::cerr << "Usage: ./illixr_local_server <this machine ip address> <ILLIXR machine ip address>" << std::endl;
return 1;
}
raft::map xrPipeline;
mxre::kernels::AppSource<mxre::types::Frame> appsource;
mxre::kernels::Keyboard keyboard;

mxre::kernels::CudaORBDetector cudaORBDetector(orbMarkerTracker.getRegisteredObjects());
mxre::kernels::MarkerCtxExtractor markerCtxExtractor(WIDTH, HEIGHT);
mxre::kernels::ObjectRenderer objRenderer(orbMarkerTracker.getRegisteredObjects(), WIDTH, HEIGHT);

mxre::kernels::AppSink<mxre::types::Frame> appsink;

appsource.setup("source");
appsource.duplicateOutPort<mxre::types::Frame>("out_data", "out_data2");
appsink.setup("sink");
mxre::kernels::IllixrAppZMQSource<mxre::kimera_type::imu_cam_type> appsource{};
mxre::kernels::IllixrAppZMQSink<mxre::kimera_type::kimera_output> appsink{};
mxre::kernels::KimeraVIOKernel KimeraVIOKernel;

xrPipeline += appsource["out_data"] >> cudaORBDetector["in_frame"];
xrPipeline += cudaORBDetector["out_obj_info"] >> markerCtxExtractor["in_obj_info"];
appsource.setup(argv[1]);
appsink.setup(argv[2]);

xrPipeline += appsource["out_data2"] >> objRenderer["in_frame"];
xrPipeline += markerCtxExtractor["out_obj_context"] >> objRenderer["in_obj_context"];
xrPipeline += keyboard["out_keystroke"] >> objRenderer["in_keystroke"];
// TODO: message is not found
// xrPipeline += ffmpeg["imu_data"] >> KimeraVIOKernel["illixr_cam_input"];
// xrPipeline += message["cam_data"] >> KimeraVIOKernel["illixr_imu_input"];

xrPipeline += objRenderer["out_frame"] >> appsink["in_data"];
xrPipeline += appsource["out_data"] >> KimeraVIOKernel["illixr_imu_cam_input"];
xrPipeline += KimeraVIOKernel["kimera_pose"] >> appsink["in_data"];

xrPipeline.exe();

Expand Down
33 changes: 0 additions & 33 deletions examples/incubator/unity_test.cc

This file was deleted.

67 changes: 0 additions & 67 deletions examples/incubator/unity_writer.cc

This file was deleted.

Loading