Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
Patrick Creighton edited this page Jun 20, 2022 · 17 revisions

Wandb is used to log, visualize, and analyze data from sensors and our software.

Login

Login to Wandb

wandb login
  • Use wandb login --relogin to force relogin
  • Requires creating an account and joining the sailbot team

Usage

Set the wandb launch argument to true

roslaunch local_pathfinding <launch file> wandb:=true <other launch arguments>

This plots various attributes to our Wandb page in real time. In the projects tab, you will see 2 projects updating every few seconds: stats and latlon_plots-<start time>

  • stats: various attributes that are updated every second, including sensor data, path cost, and speed
    • The Filters report plots the raw sensor data along with its filtered values
  • latlon_plots-<start time>: latlon plots of Raye's position, local waypoints, and closest ships over time image

Notes:

  • The stats run corresponding to a particular latlon_plots-<start time> project will have a start time in the name that is within a couple seconds
  • Visualize one stats run at a time, but visualize all latlon_plots-<start time> runs
  • You will have to zoom in to the latlon plots quite a bit to see the changes over short periods of time

Running Offline

  1. Set the WANDB_MODE environment variable to offline:
    export WANDB_MODE=offline
    
    • Check its value with printenv WANDB_MODE
  2. Run local pathfinding as usual: roslaunch ...
  3. Sync the projects to our Wandb page once connected to internet
    1. Navigate to the scripts/ directory
    2. Run the helper script to sync run statistics and latlon plots
      ./wandb_sync_dir.bash ~/.ros/stats/latest-dir
      ./wandb_sync_dir.bash ~/.ros/latlon_plots/latest-dir
      
      • Note: syncing latlon_plots can take up to 10 seconds per run. If planning to run local pathfinding for a long time, consider increasing the run period, UPDATE_TIME_SECONDS

Bugs

protobuf version incompatible

Error traceback:

Traceback (most recent call last):
  File "<file using wandb>", line 2, in <module>
    import wandb
  File "/usr/local/lib/python2.7/dist-packages/wandb/__init__.py", line 40, in <module>
    from wandb import sdk_py27 as wandb_sdk
  File "/usr/local/lib/python2.7/dist-packages/wandb/sdk_py27/__init__.py", line 12, in <module>
    from .wandb_init import init  # noqa: F401
  File "/usr/local/lib/python2.7/dist-packages/wandb/sdk_py27/wandb_init.py", line 29, in <module>
    from .backend.backend import Backend
  File "/usr/local/lib/python2.7/dist-packages/wandb/sdk_py27/backend/backend.py", line 18, in <module>
    from ..interface import interface
  File "/usr/local/lib/python2.7/dist-packages/wandb/sdk_py27/interface/interface.py", line 18, in <module>
    from wandb.proto import wandb_internal_pb2 as pb
  File "/usr/local/lib/python2.7/dist-packages/wandb/proto/wandb_internal_pb2.py", line 5, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 113
    class DescriptorBase(metaclass=DescriptorMetaclass):
                                  ^
SyntaxError: invalid syntax

Solution:

pip install protobuf==3.17.3
Clone this wiki locally