for Robot Artificial Inteligence

understanding cmake by experience and error(0)

|

Find_Package

find_package(COLMAP REQUIRED base exe controllers estimators feature optim sfm tools mvs util )

find_package里面的参数是就是这样,第一是在local 计算机上找package然后编辑。

第二个是我们可以不用使用全部package里面的so,o file。所以定一个条Require然后后面是只我们需要的source code或者我们可以特定的Version使用

经路:build/src/CMakeFiles/colmap.dir/controllers

在build里面的object file使用的

Manually add package condition

set( YOLO_INCLUDE_DIRS “${PROJECT_SOURCE_DIR}/third_party/darknet/include/”)

set( YOLO_LIBS “${PROJECT_SOURCE_DIR}/third_party/darknet/libdarknet.so”)

include_directories( ${PROJECT_HEADER_DIR} ${COLMAP_INCLUDE_DIRS} ${EZSIFT_INCLUDE_DIRS} ${DBoW2_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} ${YOLO_INCLUDE_DIRS} )

target_link_libraries(${PROJECT_NAME}_program Qt5::Widgets ${COLMAP_LIBRARIES} ${EZSIFT_LIBS} ${DBoW2_LIBS} image_database_selector_lib ${YOLO_LIBS} #${SQLITE3_LIBRARY} ${OpenCV_LIB} )

Useful CMAKE

set(IMAGE_DATABASE_SELECTOR_INCLUDE_PATH ${PROJECT_HEADER_DIR}/image_database_selector)

set(LIB_HEADERS ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/common_include.h ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/feature_utility.h ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/feature.h ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/keyframe.h ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/utility.h ${IMAGE_DATABASE_SELECTOR_INCLUDE_PATH}/database_manager.h)

set(LIB_NAME “image_database_selector”)

target_link_libraries(${LIB_NAME}_lib ${OpenCV_LIBS} ${DBoW2_LIBS} ${EZSIFT_LIBS})

##

QT USE

qt5_wrap_cpp(qt_HEADERS ${PROJECT_HEADER_DIR}/mainwindow.h)

qt5_wrap_ui(qt_UI ${PROJECT_GUI_DIR}/mainwindow.ui)

set(IMAGE_DATABASE_SELECTOR_INCLUDE_PATH ${PROJECT_HEADER_DIR}/image_database_selector)

set(HEADERS ${PROJECT_HEADER_DIR}/visual_database_management_info.h)

set(SOURCES visual_database_management_info.cpp

mainwindow.cpp

main.cpp)

set(OBJECT_DETECTOR object_detector/objectDetector.cpp)

subdirs(image_database_selector)

add_executable(${PROJECT_NAME}_program

${SOURCES}

${HEADERS}

${qt_UI} ${qt_HEADERS}

${OBJECT_DETECTOR}

)

add_executable(helloworld

src/mainwindow.ui

src/mainwindow.cpp

src/main.cpp

# resources.qrc

)

qt5_use_modules(${PROJECT_NAME}_program Widgets)

message(${COLMAP_LIBRARIES})

target_link_libraries(${PROJECT_NAME}_program

Qt5::Widgets

${COLMAP_LIBRARIES}

${EZSIFT_LIBS}

${DBoW2_LIBS}

image_database_selector_lib

${YOLO_LIBS} #${SQLITE3_LIBRARY}

${OpenCV_LIB}

)

cmake编译错误”relocation R_X86_64_32 against .rodata can not be used when making a shared object“解决办法

在CMakeLists.txt中添加如下一行: add_definitions(-fPIC)

static library를 쓰려면 이를 추가해야 된다.

Comment  Read more

xavier를 로봇에 추가적으로 사용 하는 이유

|

설명

AI Processor 기능을 제어피씨에에 추가를 하여서, GPU 연산용으로 사용할 수 있다.

Comment  Read more

ROS MULTI THREAD CALLBACK FUNCTION

|

https://answers.ros.org/question/185153/ros-multithreading-example/

Comment  Read more

git clone from another git server

|

clone-another-gitlab-repository-in-gitlab-ci-script

Example

B서버에 있는 패키지를 A서버로 git clone을 할떄

  1. create personal token at B server
    • preference → personal token→ generate
  2. git clone to A server by B server token like below
    • git clone https://id:ppassword@another_git_server/msgs.git

Comment  Read more

fiji linux(이미지 인지 간단 작업) 및 이미지 복원

|

이미지 프로세싱 간단 작업 및 비교 하기 좋은 툴

https://imagej.net/software/fiji/downloads

webp

sudo apt-get install webp

Comment  Read more