appliedAI-Initiative / orb_slam_2_ros

A ROS implementation of ORB_SLAM2
Other
605 stars 282 forks source link

orb_slam2_ros crashes when camera image topic is available #138

Open bozobratina opened 2 years ago

bozobratina commented 2 years ago

Hi,

I've been testing this version of orb_slam2_ros but I can't get it to work somehow. I'm have tested Raul's ORB_SLAM2 in ros, and its working OK, also TUM's extension for map saving version is working OK. I've connected both of them with Pepper robot successfully.

When I start roslaunch (mono or rgbd) file everything loads OK and then waits for image topics... for mono that is /camera/image_raw When I start rosbag play with remaped topic to /camera/image_raw the orb_slam2_ros_mono dies, code 11. The same happens when I get camera from Pepper (mono or rgbd orb_slam2_ros). I can see the orb subscribes to Pepper's camera topic, but then dies and unsubscribes.

I went through forum here and found that some had similar issues with code -11 but couldn't find the solution for my problem.

image2

I checked the log files and I could'n recognize the problem... I checked ros topics list, everything is in order. In RVIZ I can see image, but since orb_slam2_ros_mono dies, I get nothing, no map_points etc..

I'm running ubuntu 16.04 with kinect ros,

I would appreciate any help,

best regards. Bozo

barovjt commented 1 year ago

I have the same problem. I publish the image message to /camera/image_raw. In all mono launcher (i. e. ..._r200_mono ) there is a remap from "/camera/image_raw" to "/camera/rgb/image_raw" I commented the remapping line an try to publish directly in "/camera/rgb/image_raw". So far it has got the same crash error you mention here.

My gess: the solutons is in that way, but I haven't solved it.

GuoPingPan commented 1 year ago

I have the same problem. I publish the image message to /camera/image_raw. In all mono launcher (i. e. ..._r200_mono ) there is a remap from "/camera/image_raw" to "/camera/rgb/image_raw" I commented the remapping line an try to publish directly in "/camera/rgb/image_raw". So far it has got the same crash error you mention here.

My gess: the solutons is in that way, but I haven't solved it.

I get the same problem! Have you fix it ? image

chruen commented 1 year ago

I get the same problem too QAQ. Have anyone solved the problem?

GuoPingPan commented 1 year ago

I seem to deal with this problem by correct the vesion of opencv:

But I got a new problem is that when the topic is aligned, after init new mappoint, it will never update.

mhmd-j commented 10 months ago

I solved it using find_package(OpenCV 3.0 QUIET) in the CMakeLists.txt instead of find_package(OpenCV 4.0 QUIET)