Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lab 6 does not working #13

Open
votmA opened this issue Feb 10, 2024 · 7 comments
Open

lab 6 does not working #13

votmA opened this issue Feb 10, 2024 · 7 comments

Comments

@votmA
Copy link

votmA commented Feb 10, 2024

Hello!
I am trying to launch lab 6. And I get an error. I have put the output in the description below. Lab 5 works utilizing the same code. I would appreciate any advice.

*** Aborted at 1707571282 (unix time) try "date -d @1707571282" if you are using GNU date ***
PC: @     0x7f580333be6c std::_Rb_tree<>::find()
*** SIGSEGV (@0x0) received by PID 68409 (TID 0x7f57f70d6840) from PID 0; stack trace: ***
    @     0x7f5806174781 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7f5803a33420 (unknown)
    @     0x7f580333be6c std::_Rb_tree<>::find()
    @     0x7f580334505a cv::flann::Index::build()
    @     0x7f5805ff75e7 cv::FlannBasedMatcher::train()
    @     0x7f5805fed764 cv::DescriptorMatcher::knnMatch()
    @     0x7f5805fef09d cv::DescriptorMatcher::knnMatch()
    @     0x7f580965600a SiftFeatureTracker::matchDescriptors()
    @     0x7f580964c842 FeatureTracker::trackFeatures()
    @     0x5638343f6e80 cameraCallback()
    @     0x563834423d47 boost::_bi::list2<>::operator()<>()
    @     0x56383441fa19 boost::_bi::bind_t<>::operator()<>()
    @     0x56383441b02a boost::detail::function::void_function_obj_invoker9<>::invoke()
    @     0x563834423ed4 boost::function9<>::operator()()
    @     0x56383441fba8 boost::detail::function::void_function_obj_invoker9<>::invoke()
    @     0x563834448d65 boost::function9<>::operator()()
    @     0x563834447cb4 message_filters::CallbackHelper9T<>::call()
    @     0x563834443624 message_filters::Signal9<>::call()
    @     0x56383444150f message_filters::Synchronizer<>::signal()
    @     0x56383443dda4 message_filters::sync_policies::ApproximateTime<>::publishCandidate()
    @     0x563834433e61 message_filters::sync_policies::ApproximateTime<>::process()
    @     0x56383442daf0 message_filters::sync_policies::ApproximateTime<>::add<>()
    @     0x56383442b461 message_filters::Synchronizer<>::cb<>()
    @     0x563834445859 boost::_mfi::mf1<>::operator()()
    @     0x5638344442e0 boost::_bi::list2<>::operator()<>()
    @     0x5638344422cd boost::_bi::bind_t<>::operator()<>()
    @     0x56383443eaa8 boost::detail::function::void_function_obj_invoker1<>::invoke()
    @     0x563834448824 boost::function1<>::operator()()
    @     0x563834447396 message_filters::CallbackHelper1T<>::call()
    @     0x5638344082cb message_filters::Signal1<>::call()
    @     0x563834403d77 message_filters::SimpleFilter<>::signalMessage()
    @     0x5638343fe987 image_transport::SubscriberFilter::cb()
@votmA
Copy link
Author

votmA commented Feb 10, 2024

I haven't updated the repo. Issue is already solved

@votmA votmA closed this as completed Feb 10, 2024
@votmA votmA reopened this Feb 11, 2024
@votmA
Copy link
Author

votmA commented Feb 11, 2024

After updating the repo. I got this error

(tracked_features:180113): Gtk-ERROR **: 16:24:07.553: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

I couldn't resolve this issue. Also, the compiler gives a warning that OpenCV 3 and OpenCV 4 may be in conflict.

@jingnanshi
Copy link
Member

@votmA make sure that you are not linking against system opencv

@votmA
Copy link
Author

votmA commented Feb 12, 2024

@jingnanshi

I think I am not linking against the system OpenCV at least explicitly.
Here my cmake file for lab_6. Actually, I have not changed it from repo.

Also, I have opencv3_catkin in lab-5 in the dependencies folder.

cmake_minimum_required(VERSION 2.8.3)
project(lab_6)

add_compile_options(-std=c++14)

find_package(lab_5 REQUIRED)
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  opencv3_catkin
  glog_catkin
  image_transport
  cv_bridge
  opengv
  eigen_catkin
  tf_conversions
)

catkin_package(
 INCLUDE_DIRS include
 LIBRARIES
 CATKIN_DEPENDS roscpp rospy glog_catkin image_transport cv_bridge lab_5 opengv eigen_catkin opencv3_catkin
)

include_directories(
  include
  ${EIGEN3_INCLUDE_DIRS}
  ${catkin_INCLUDE_DIRS}
)

add_library(tracker_shim src/tracker_shim.cpp)
target_include_directories(tracker_shim PRIVATE ${lab_5_INCLUDE_DIRS})
target_link_libraries(tracker_shim PRIVATE ${lab_5_LIBRARIES})

add_executable(pose_estimation src/pose_estimation.cpp)
target_link_libraries(pose_estimation tracker_shim ${catkin_LIBRARIES})

And here is the warning message for OpenCV conflicts.

/usr/bin/ld: warning: libopencv_calib3d.so.4.2, needed by /home/votma/workspace/VNAV-LABS-Ledkov/vnav_ws/devel/.private/lab_6/lib/libtracker_shim.so, may conflict with libopencv_calib3d.so.3.4
/usr/bin/ld: warning: libopencv_highgui.so.4.2, needed by /home/votma/workspace/VNAV-LABS-Ledkov/vnav_ws/devel/.private/lab_6/lib/libtracker_shim.so, may conflict with libopencv_highgui.so.3.4
/usr/bin/ld: warning: libopencv_imgproc.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_imgproc.so.3.4
/usr/bin/ld: warning: libopencv_core.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_core.so.3.4

@votmA
Copy link
Author

votmA commented Feb 13, 2024

I have analized the build folder with ccmake tool. I found out that cv_bridge links to OpenCV 4.
I have resolved the issue by adding the cv_bridge as a package in the dependencies folder. Also, I edited the cv_bridge package and cmake files. I replaced the linkage to OpenCV 4 with opencv3_catkin which is supposed to be present in the project. And then I added links to cv_bridge in the cmake file for lab_6.

Here cv_bridge cmake file
CMakeLists.txt

Here lab_6 cmake file
CMakeLists.txt

It seems working for me. But if there is another solution I would like to see it as well.

@jingnanshi
Copy link
Member

@votmA excellent work! If you can make a PR I'll happy to review it.

@votmA
Copy link
Author

votmA commented Feb 14, 2024

@jingnanshi thanks! I have created the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants