terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
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
Asked by tengfei han on 2018-07-01 19:20:50 UTC
Comments
Compile in debug mode (
CMAKE_BUILD_TYPE
variable toDebug
), modify the roslaunch file to run the node that crashes with gdb and add the trace in your question!Asked by VictorLamoine on 2018-07-02 02:53:07 UTC