-
Notifications
You must be signed in to change notification settings - Fork 38
Fixing crashed processes and Debugging tips
When running ./game, any processes crashed (i.e. when you do screen -ls, you see not all 5 screens or if you do screen -r , you get some error messages), the first thing you should do is to manually create this screen/process and run the appropiate file manually. (e.g. $screen -S v1 and then in that screen $luajit run_parallel_cognition.lua 1)
-
V1: this is most likely to happen in v1. You will probably see v2, naoqi, naohal running alone. One possible error is during loading colortable. The problem is likely because the *.raw file that is supposed to be in Player/Data is missing. Try pulling or checking out the specific files from git ($git checkout /Data/) or if it's not in git either, try to talk to whoever made the colortable or if possible, use a older working colortable for your testing (or any colortable if you are not testing anything vision related). V2 will always wait for v1 to start normally before it starts the parallel process on the bottom camera.
-
Arb: arb issues can be trickier. Sometimes it’s because of some changes in lua code and when arbitrator is running, it discovers the runtime error and stopped. If it's your own changes, then change it and run again until you see no error. If it's someone else's change, you can either be cautious and ask them or revert back to some older state that you know should be working (e.g. the USOpen2016 with commit from May.27 is most likely to be fully functioning). If you see something similar to "bit.lua not found", then just manually do $luajit run_arbitrator.lua and hopefully you will see a different error or it will be working. Sometimes it might be an issue with a bad library (I mean Player/Lib). Since you don't know what the binary files mean, something that is most practical will be to copy the Player/Lib from a working robot. But please do it with great caution: make sure to save both libraries (e.g. $scp -rPlayer/Lib to your computer) before you move them around.
Some other tips
- Make sure to killall screen and run everything together once again after you fix the problem because the processes need to be started with certain order so without starting over, you might find the threads still not cooperating with each other.
- In Player/Lib/, there are a few important *.so files (e.g. GameControl.so is responsible for robots communicating with GameController during game.) So if specific thing crashes or doesn't work during the game, it's most likely because the specific *.so file is not correct. You can copy the specific file from another working robot. In Player/Lib/, there are two special files NaoBody.lua and NaoGameControl.lua that are included in git (other files in this folder are being ignored by git). Thus, after copying the Library from another robot, make sure you still have the most up to date lua files. (either by $git status and see if they are different from the version on git or just $git checkout /Lib/NaoBody.lua Lib/NaoGameControl.lua)
- The first time that ./game is run after the robot boots, the vision system will not load properly so the robot will not be able to see. Simple killall screen and then rerun ./game to fix the issue