terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

asked 2018-07-01 19:20:50 -0500

tengfei han gravatar image

updated 2018-07-02 00:24:23 -0500

Several days ago, I found an opensource code on GitHub, which aims to run ORBSLAM using the drone with a front-looking camera. So I plan to rerun this project with my own laptop. Here are some errors what I have encountered when compiling the project. First, I followed the instructions provided by the authors,

    cd ardrone_ws/src/ORB_SLAM2
    chmod +x build.sh
    ./build/sh
cd /ardrone_ws/src/
catkin_init_workspace
cd /ardrone_ws/
catkin_make
source devel/setup.bash

after entered the command on the window

roslaunch main.launch,



terminate called after throwing an instance of 'std::bad_alloc'
      what():  std::bad_alloc
    [ORB_mono-1] process has died [pid 10502, exit code -6, cmd /home/htf/ardrone_ws/devel/lib/ardrone_orb/ros_orb_node /home/htf/ardrone_ws/src/ardrone_orb/ORBvoc.txt /home/htf/ardrone_ws/src/ardrone_orb/settings.yaml /camera/image_raw:=/ardrone/front/image_raw __name:=ORB_mono __log:=/home/htf/.ros/log/4ad799de-7b73-11e8-bdf1-80a589d234a5/ORB_mono-1.log].
    log file: /home/htf/.ros/log/4ad799de-7b73-11e8-bdf1-80a589d234a5/ORB_mono-1*.log
    all processes on machine have died, roslaunch will exit
    shutting down processing monitor...
    ... shutting down processing monitor complete
    done

I couldn't understand why it will happen, the ORBmap and camera window were disappeared after few seconds. hope someone could give me a little clues

edit retag flag offensive close merge delete

Comments

Compile in debug mode (CMAKE_BUILD_TYPE variable to Debug), modify the roslaunch file to run the node that crashes with gdb and add the trace in your question!

VictorLamoine gravatar image VictorLamoine  ( 2018-07-02 02:53:07 -0500 )edit