Open LukeAI opened 4 years ago
If you are looking for a C++ interface to use with ROS, you may also want to see the DarkHelp library instead of using the darknet one directly. I've used it in several ROS projects. See here: https://www.ccoderun.ca/darkhelp/api/API.html
(Disclaimer: I'm the author of DarkHelp and DarkMark.)
@stephanecharette thanks for the suggestion, I think I prefer to stay close to the source and not draw in additional 3rd party dependencies.
but if you know how to link to the .so using CMakeLists that'd be great?
I've built darknet with USE_CPP=1
and LIBSO=1
I'm attempting to link (for now, just to get something working) with:
add_executable(hello src/hello.cpp)
TARGET_LINK_LIBRARIES(hello /absolute/path/to/libdarknet.so)
and then trying to include like:
#include <yolo_v2_class.hpp>
but I get:
fatal error: yolo_v2_class.hpp: No such file or directory
Looking forward to your work, I have the same needs. At the same time, can you now provide python based ros files (output boxes coordinates), thanks in advance! @LukeAI
this may help you:https://github.com/tom13133/darknet_ros I have test it on pc,this repo has a problem:the exact same bounding boxes will be published twice,this problem occurs frequently. @LukeAI
Hi @AlexeyAB (or any c++ pros)
I would like to wrap this repo. as a c++ ROS node. Ideally I would like to use this repo. as a subtree that I can pull occasionally to get updates. The ROS programming part won't be a problem but I'm struggling to know how to begin with the build interface.
A ROS node must be built with catkin which requires a CMakeLists file. So the package structure is like this.
Is the best way to do this to use the ".so" ? If so, should I cause darknet to be built from my CMakeLists by just running an external shell script that just does "cd darknet && make"? and how can I include the .so in my CMakeLists so as to be able to give darknet_ros.cpp access to #include "yolo_v2_class.hpp" ?
There is a very similar project using an out of date version of this repo that directly includes the source files from AlexeyAB/darknet in the ROS CMakelists file and sets CUDA_NVCC_FLAGS etc. Would this be a better way to do it in any respect (performance or something?) I'm hesitant to do this because I would then have to maintain it any time upstream changes happen.
I realise this is rather subjective and a bit beyond the scope of this repo. but would really appreciate your opinion/advice on this.