Skip to content

Change network interface for PlotJugglerSink#3741

Merged
williamckha merged 4 commits into
UBC-Thunderbots:masterfrom
annieisawesome2:plot-juggler
May 26, 2026
Merged

Change network interface for PlotJugglerSink#3741
williamckha merged 4 commits into
UBC-Thunderbots:masterfrom
annieisawesome2:plot-juggler

Conversation

@annieisawesome2
Copy link
Copy Markdown
Contributor

Description

Adds a new plot_juggler_interface field to the robot toml configuration, allowing the network interface used by PlotJugglerSink to be set at runtime during Thunderloop initialization. Defaults to tbotswifi5.

ThreadedUdpSender binds traffic to a specific network interface. Previously, the interface used for the PlotJuggler log sink was hardcoded, meaning packets could silently route through lo (loopback) and never reach a laptop running PlotJuggler. Making this configurable ensures debug telemetry reliably reaches the correct network (e.g. robot WiFi) without requiring a code change.

Changes made in this PR:

  • Added plot_juggler_interface field to robot_config.toml with default value tbotswifi5
  • Wired the configured interface into PlotJugglerSink initialization in Thunderloop
  • PlotJugglerSink follows the same custom log sink pattern as VISUALIZE (Thunderscope) and CSV
  • Custom log level PLOTJUGGLER is defined in custom_logging_levels.h and enabled at init in logger.h, above normal INFO noise

Testing Done

bazel test //software/embedded/toml_config:toml_config_client_test

Todo test:
probably set interface to tbotswifi5 and ensure PlotJuggler is listening on the robot WiFi network/multicast. Make sure the data is received. Check with william - thanks!

Resolved Issues

implements #3718

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@williamckha
Copy link
Copy Markdown
Member

Looks good, thanks Annie!

I know that the issue says to add a new plot_juggler_interface field to the TOML file, but could you please change it to just use the network_interface? I don't see when we would ever need to use a separate interface for sending PlotJuggler data

@williamckha williamckha changed the title change network interface for PlotJugglerink Change network interface for PlotJugglerSink May 24, 2026
Copy link
Copy Markdown
Member

@nycrat nycrat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@williamckha williamckha merged commit 5f0c7df into UBC-Thunderbots:master May 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants