blob: 718f7d9513730a1fa59baf54c8a7a5534c72aff3 [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001[General]
2Check the logs! Very few things will fail without putting something in the logs.
3 If they do, that is a bug unless our code is never getting run (there are
4 innumerable ways that could happen, but it generally doesn't).
Brian Silvermane155ebc2014-03-20 19:37:57 -07005 To check the logs, run `log_displayer` if `binary_log_writer` has been started
6 or just run `log_streamer` if you want to do simple testing without writing
7 logs to a file. See `log_displayer --help` for options.
brians343bc112013-02-10 01:53:46 +00008All of the binaries get put in the same place. That is
Brian Silverman14fd0fb2014-01-14 21:42:01 -08009 src/outputs/prime/outputs on the build machine and
10 /home/driver/robot_code/bin on linux.
brians343bc112013-02-10 01:53:46 +000011
12[Startup]
Brian Silvermane155ebc2014-03-20 19:37:57 -070013Low level startup errors often end up in
brians343bc112013-02-10 01:53:46 +000014 /tmp/aos_fatal_error.* under linux. Also helpful are the /tmp/starter*_std*
15 files (if the standard start scripts are being used) and
16 aos/crio/bin/netconsole.sh for reading cRIO stdout and stderr.
17 If lots of the /tmp/starter_*std* files (with different numbers) are being
18 created, that means that starter_exe is dying constantly.
19
20[Anything Not Running]
21Check starter_exe's log messages. They might mention that it is constantly dying
22 on startup and being restarted.
23
24[Control Loop(s) Not Working]
Brian Silvermane155ebc2014-03-20 19:37:57 -070025Are robot_state messages going out? An aos::JoystickInput (often
26 joystick_reader) should be sending them.
27 Also, kFakeJoysticks in aos/prime/input/joystick_reader.cc has to be set to
28 false in order for anything to get output.
brians343bc112013-02-10 01:53:46 +000029Is it being fed goal messages?
30Is it getting position messages?
31Is something looking at the output and doing something useful with it?
32
33[No Driver Station Packets]
Brian Silvermane155ebc2014-03-20 19:37:57 -070034TODO(brians): This is out of date.
brians343bc112013-02-10 01:53:46 +000035Check to make sure that JSR (a cRIO-side task) is saying that it's sending
36 messages. Also check JoystickReader (or whatever inherits from
37 aos::JoystickInput) is running and see if it's receiving anything.
38
39[Attaching a Debugger]
brians343bc112013-02-10 01:53:46 +000040Attaching GDB to an existing robot code process works like normal (you have to
Brian Silvermane155ebc2014-03-20 19:37:57 -070041 su root first because that's what all of the code currently runs as).
brians343bc112013-02-10 01:53:46 +000042If a process is dying repeatedly, the easiest way to debug it is to kill
43 starter_loop.sh and (it has to be after that) starter_exe. After doing that,
44 NOTHING will get restarted (including the normal restart after changing a
45 binary) so that you can start a process under GDB like usual (shouldn't need
46 anything special if done as root).