tum-vision / tum_ardrone

Repository for the tum_ardrone ROS package, implementing autonomous flight with PTAM-based visual navigation for the Parrot AR.Drone.
http://wiki.ros.org/tum_ardrone
GNU General Public License v3.0
226 stars 192 forks source link

Camera hangs and program crashes #74

Closed ethanyu94 closed 8 years ago

ethanyu94 commented 8 years ago

When I run the program, the camera view hangs after a second. I get a warning about camera calibration file not found, and drone_stateestimation crashes quickly. Sometimes, my whole computer crashes. Any advice on how I can troubleshoot this? Maybe something is built incorrectly or something is wrong with my environment.

SUMMARY
========

PARAMETERS
 * /rosdistro: jade
 * /rosversion: 1.11.16

NODES
  /
    drone_autopilot (tum_ardrone/drone_autopilot)
    drone_gui (tum_ardrone/drone_gui)
    drone_stateestimation (tum_ardrone/drone_stateestimation)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[drone_stateestimation-1]: started with pid [3062]
process[drone_autopilot-2]: started with pid [3063]
process[drone_gui-3]: started with pid [3064]
Object::connect: No such slot tum_ardrone_gui::FlatTrimClicked()
Object::connect:  (sender name:   'buttonFlattrim')
Object::connect:  (receiver name: 'tum_ardrone_guiClass')
nouveau: kernel rejected pushbuf: Invalid argument
nouveau: ch0: krec 0 pushes 1 bufs 0 relocs 0
[drone_stateestimation-1] process has died [pid 3062, exit code -11, cmd /opt/ros/jade/tum_ardrone/bin/drone_stateestimation __name:=drone_stateestimation __log:=/home/ethan/.ros/log/4764c088-ad49-11e5-a956-20c9d042f419/drone_stateestimation-1.log].
log file: /home/ethan/.ros/log/4764c088-ad49-11e5-a956-20c9d042f419/drone_stateestimation-1*.log

The log file says:

[ INFO] [1451296663.823101385]: Started TUM ArDrone Stateestimation Node.
set publishFreq to 30Hz
set calibFile to DEFAULT
set ts base to 1451296663
Waiting for Video
Found ARDrone Version 2
Set Camera Paramerer to: 0.771557 1.36856 0.552779 0.444056 1.15601
[ INFO] [1451296664.216022236]: Video resolution: 640 x 360
new delasXYZ: 40, delayVideo: 70, delayControl: 90
new delasXYZ: 40, delayVideo: 69, delayControl: 87
ethanyu94 commented 8 years ago

Ok, so I solved this issue by switching from the default graphics driver to the Nvidia driver. I also downgraded from jade to indigo.

Now, stateestimation immediately crashes with:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  27
  Current serial number in output stream:  28
[drone_stateestimation-1] process has died [pid 15144, exit code 1, cmd /home/ethan/catkin_ws/devel/lib/tum_ardrone/drone_stateestimation __name:=drone_stateestimation __log:=/home/ethan/.ros/log/0399f1dc-ae0e-11e5-a8f6-20c9d042f419/drone_stateestimation-1.log].
log file: /home/ethan/.ros/log/0399f1dc-ae0e-11e5-a8f6-20c9d042f419/drone_stateestimation-1*.log

The log file says:

[ INFO] [1451381193.350452216]: Started TUM ArDrone Stateestimation Node.
set publishFreq to 30Hz
set calibFile to DEFAULT
set ts base to 1451381193
Waiting for Video
Found ARDrone Version 2
Set Camera Paramerer to: 0.771557 1.36856 0.552779 0.444056 1.15601
[ INFO] [1451381193.845631863]: Video resolution: 640 x 360
ethanyu94 commented 8 years ago

Ok, just needed to restart after that driver change...

rubenanapu commented 5 years ago

I had the same problem recently. I found that the reason is because tum_ardrone/src/UINode/tum_ardrone_gui.ui calls FlatTrimClicked, but on tum_ardrone/src/UINode/tum_ardrone_gui.h and tum_ardrone/src/UINode/tum_ardrone_gui.cpp the method name is FlattrimClicked.

Note that the Trim was lowercase on the header and cpp files, whereas on the .ui file it was uppercase.

After renaming FlattrimClicked to FlatTrimClicked the problem was gone.

-- EDIT

Well, my changes made the Object::connect: No such slot tum_ardrone_gui::FlatTrimClicked() message go away but didn't solve the problem since drone_stateestimation still crashes.

Just for the records, with GDB these are the error messages I get:

Thread 6 "drone_stateesti" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdedf1700 (LWP 4751)]
new ping values: 500->10000 20000->10000
0x00007ffff78abaac in CVD::GLWindow::init (this=this@entry=0x7fffcc03afe8, size=..., bpp=bpp@entry=24, title="PTAM Drone Camera Feed",
    disp="") at cvd_src/glwindow.cc:110
110         Cursor null_cursor = XCreateGlyphCursor(display, fixed->fid, fixed->fid, ' ', ' ', &black, &black);