blob: 9bbe8d3ee089608214cfc96f9740f7bff6cef7a7 [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*
Brian Silverman20141f92015-01-05 17:39:01 -080015 files (if the standard start scripts are being used).
brians343bc112013-02-10 01:53:46 +000016 If lots of the /tmp/starter_*std* files (with different numbers) are being
17 created, that means that starter_exe is dying constantly.
18
19[Anything Not Running]
20Check starter_exe's log messages. They might mention that it is constantly dying
21 on startup and being restarted.
22
23[Control Loop(s) Not Working]
Brian Silvermane155ebc2014-03-20 19:37:57 -070024Are robot_state messages going out? An aos::JoystickInput (often
25 joystick_reader) should be sending them.
Brian Silvermanc2065732015-11-28 22:55:30 +000026 Also, kFakeJoysticks in aos/input/joystick_reader.cc has to be set to
Brian Silvermane155ebc2014-03-20 19:37:57 -070027 false in order for anything to get output.
brians343bc112013-02-10 01:53:46 +000028Is it being fed goal messages?
29Is it getting position messages?
30Is something looking at the output and doing something useful with it?
31
32[No Driver Station Packets]
Brian Silvermane155ebc2014-03-20 19:37:57 -070033TODO(brians): This is out of date.
brians343bc112013-02-10 01:53:46 +000034Check to make sure that JSR (a cRIO-side task) is saying that it's sending
35 messages. Also check JoystickReader (or whatever inherits from
36 aos::JoystickInput) is running and see if it's receiving anything.
37
38[Attaching a Debugger]
brians343bc112013-02-10 01:53:46 +000039Attaching GDB to an existing robot code process works like normal (you have to
Brian Silvermane155ebc2014-03-20 19:37:57 -070040 su root first because that's what all of the code currently runs as).
brians343bc112013-02-10 01:53:46 +000041If a process is dying repeatedly, the easiest way to debug it is to kill
42 starter_loop.sh and (it has to be after that) starter_exe. After doing that,
43 NOTHING will get restarted (including the normal restart after changing a
44 binary) so that you can start a process under GDB like usual (shouldn't need
45 anything special if done as root).