koide3 / monocular_person_following

Monocular camera-based person tracking and identification ROS framework for person following robots
195 stars 49 forks source link

Troubles installing on ROS Melodic #16

Open bach05 opened 2 years ago

bach05 commented 2 years ago

Hi,

I am trying to install the package on a PC with ROS Melodic, following these instructions. At the first building I got:

Errors     << monocular_person_following:make /home/tiago/panoramicVideo3_ws/logs/monocular_person_following/build.make.000.log
In file included from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/tracklet.hpp:10:0,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/context.hpp:10,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/reid_state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following/state/reid_state.cpp:1:
/home/tiago/panoramicVideo3_ws/devel/.private/monocular_people_tracking/include/monocular_people_tracking/Track.h:20:10: fatal error: tfpose_ros/Person.h: No such file or directory
 #include <tfpose_ros/Person.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/tracklet.hpp:10:0,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/context.hpp:10,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/tracking_state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following/state/tracking_state.cpp:1:
/home/tiago/panoramicVideo3_ws/devel/.private/monocular_people_tracking/include/monocular_people_tracking/Track.h:20:10: fatal error: tfpose_ros/Person.h: No such file or directory
 #include <tfpose_ros/Person.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/tracklet.hpp:10:0,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/context.hpp:10,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/initial_state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following/state/initial_state.cpp:1:
/home/tiago/panoramicVideo3_ws/devel/.private/monocular_people_tracking/include/monocular_people_tracking/Track.h:20:10: fatal error: tfpose_ros/Person.h: No such file or directory
 #include <tfpose_ros/Person.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/state/reid_state.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/state/tracking_state.cpp.o] Error 1
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/state/initial_state.cpp.o] Error 1
In file included from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/tracklet.hpp:10:0,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/context.hpp:10,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/state/initial_training_state.hpp:4,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following/state/initial_training_state.cpp:1:
/home/tiago/panoramicVideo3_ws/devel/.private/monocular_people_tracking/include/monocular_people_tracking/Track.h:20:10: fatal error: tfpose_ros/Person.h: No such file or directory
 #include <tfpose_ros/Person.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/tracklet.hpp:10:0,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/include/monocular_person_following/context.hpp:10,
                 from /home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following/context.cpp:1:
/home/tiago/panoramicVideo3_ws/devel/.private/monocular_people_tracking/include/monocular_people_tracking/Track.h:20:10: fatal error: tfpose_ros/Person.h: No such file or directory
 #include <tfpose_ros/Person.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/state/initial_training_state.cpp.o] Error 1
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o] Error 1
/home/tiago/panoramicVideo3_ws/src/monocular_person_following/src/monocular_person_following_node.cpp:19:10: fatal error: tfpose_ros/Persons.h: No such file or directory
 #include <tfpose_ros/Persons.h>
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/monocular_person_following_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/tiago/panoramicVideo3_ws/build/monocular_person_following; catkin build --get-env monocular_person_following | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -

To fix the linking problems, I have modified the panoramicVideo3_ws/src/monocular_person_following/CMakeLists.txt (and package.xml respectively) as follow:

find_package(catkin REQUIRED
  tf
  rospy
  roscpp
  cv_bridge
  message_filters
  image_transport
  eigen_conversions
  message_generation
  ccf_person_identification
  monocular_people_tracking

  tfpose_ros                   <<<<<<<<
  open_face_recognition                   <<<<<<<<
)

# set dlib directory to DLIB_ROOT                   <<<<<<<<
include($ENV{DLIB_ROOT}/dlib/cmake)                   <<<<<<<<

...

target_link_libraries(monocular_person_following_node
  ${catkin_LIBRARIES}
  dlib::dlib                   <<<<<<<<
)

But I got stuck with the following error and I don't know how to fix it:

Errors     << monocular_person_following:make /home/tiago/panoramicVideo3_ws/logs/monocular_person_following/build.make.001.log
CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o: In function `flann::serialization::SaveArchive::initBlock()':
context.cpp:(.text._ZN5flann13serialization11SaveArchive9initBlockEv[_ZN5flann13serialization11SaveArchive9initBlockEv]+0x47): undefined reference to `LZ4_resetStreamHC'
CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o: In function `flann::serialization::SaveArchive::flushBlock()':
context.cpp:(.text._ZN5flann13serialization11SaveArchive10flushBlockEv[_ZN5flann13serialization11SaveArchive10flushBlockEv]+0x44): undefined reference to `LZ4_compress_HC_continue'
context.cpp:(.text._ZN5flann13serialization11SaveArchive10flushBlockEv[_ZN5flann13serialization11SaveArchive10flushBlockEv]+0xbc): undefined reference to `LZ4_compress_HC_continue'
CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o: In function `flann::serialization::LoadArchive::decompressAndLoadV10(_IO_FILE*)':
context.cpp:(.text._ZN5flann13serialization11LoadArchive20decompressAndLoadV10EP8_IO_FILE[_ZN5flann13serialization11LoadArchive20decompressAndLoadV10EP8_IO_FILE]+0xd0): undefined reference to `LZ4_decompress_safe'
CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o: In function `flann::serialization::LoadArchive::loadBlock(char*, unsigned long, _IO_FILE*)':
context.cpp:(.text._ZN5flann13serialization11LoadArchive9loadBlockEPcmP8_IO_FILE[_ZN5flann13serialization11LoadArchive9loadBlockEPcmP8_IO_FILE]+0x45): undefined reference to `LZ4_decompress_safe_continue'
CMakeFiles/monocular_person_following_node.dir/src/monocular_person_following/context.cpp.o: In function `flann::serialization::LoadArchive::initBlock(_IO_FILE*)':
context.cpp:(.text._ZN5flann13serialization11LoadArchive9initBlockEP8_IO_FILE[_ZN5flann13serialization11LoadArchive9initBlockEP8_IO_FILE]+0xbd): undefined reference to `LZ4_setStreamDecode'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/tiago/panoramicVideo3_ws/devel/.private/monocular_person_following/lib/monocular_person_following/monocular_person_following_node] Error 1
make[1]: *** [CMakeFiles/monocular_person_following_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/tiago/panoramicVideo3_ws/build/monocular_person_following; catkin build --get-env monocular_person_following | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -

Can you help me, please? Thank you in advance!

dt1729 commented 1 year ago

I have the same issue, did you manage to bypass this?

Edit1: This seems like a liblz4 linking issue it is installed but still doesn't work for me checking how to link in cmakelists.txt

Edit2: This is a common problem in Ubuntu 20.04 with lib flann, I personally just added the entire path to liblz4.so in target link libraries and the thing was good to go hope this helps.