How to Take a Log - northern-bites/nbites GitHub Wiki

1. Compile your code

cd into nbites/src/man and type make cross like you normally would. Most of the fields are correct already, but some need to be changed. Specifically,

@PYTHON_PLAYER@: `pSnapshot' is the behavior that simply pans its head and take pictures. Use 'pBrunswick' for logging that needs walking.

@REMOTE_ADDRESS@: <robot name> if you are using a wireless connection (e.g. mal) or <robot name>.local if you are using a wired connection (e.g. mal.local) If you want good logs, go get an ethernet cable. Wifi logs are slow and don’t work well.

BUILD_PROTOBUF: off

CMAKE_BUILD_TYPE: release

USE_LOGGING: Turn this on! Otherwise logging won’t work.

After you've set all of the compile options type c to configure and g to exit and generate the make files which will govern the compilation of our code.

2. Open the tool

Open up a new terminal window and type nbtool.

If this doesnt work: In another terminal window or tab, cd to the nbites/src/nbtool directory and run the command make nbtool to start the java tool.

3. Configure the tool

In the furthest left sidebar: under "directory", select "choose" and navigate to the log directory you just created. Under "robot", enter the robot name in the text box. If you want to save the logs (ie, you are not just trying to stream but want to keep the logs in your folder) select "save streamed logs to disk".

Feel free to adjust write and keep fraction to what you see fit, or to leave them at their defaults, they correspond to what fraction of logs taken are either kept locally in this tool session or else saved to the folder; can be useful if you are logging for a log time but otherwise not hugely relevant.

Click connect to connect to the robot.

If all goes well, under the "control" section the logging flags should appear. Select "tripoint" to log images. To enable streaming (you should try this, it is cool) select the box labelled "stream logs containing []" that is to the right of control at the bottom of the window. (It should default to TOP, meaning top camera pictures, which is likely what you want, but feel free to mess around and see what changing this does.)

You are logging!

4. Save Logs

Click on the "Logs" tag and make sure you've taken some logs. Click on different groups. Find the logs you want and click "Save to directory" and put in the path that you want (should start ".../data/logs/location/robot/log_description...")

If you dont know what directory to save it, ask the current captains.

5. Upload to our server

If you want to make the log available to the team, cd into the data/logs/ directory. Run ./sync up folderName/ and the script will take care of the rest. In order to get someone's logs, run the script ./sync down folderName/. Both scripts will prompt you for your Bowdoin username and password.