Oblog 2023 Beta Release

My (popular? effective? nifty? eponymous?) annotation-based Shuffleboard adapter/logging framework, Oblog, has been updated for 2023! If you’re participating in the 2023 WPILib beta, you will find a new release that should work with the latest beta release.

In case you haven’t used Oblog, reasons to try it include:

  • Concise annotation-based API with almost no code footprint
  • Automatically-populated Shuffleboard tabs/layouts/sublayouts modeled directly after your robot code’s object tree
  • Highly performant (all the costly reflections are performed at boot)
  • Headache-free databinding to consume settable dashboard values in robot code
  • Automatic integration with WPILib datalogging via NetworkTables

In short, Oblog makes adding an in-code value to your telemetry as simple as:

@Log // The magic happens here!
double someRobotVariable;

As always, feedback and suggestions are welcome. However, please note: we are nearing the end of Oblog’s lifecycle and continued support after 2023 is not guaranteed. My intent remains to eventually implement the core of Oblog’s functionality as part of a modern replacement for the Sendable class, and I am unlikely to write any more major features for Oblog. I will, however, still accept/merge feature additions in the form of pull requests.

9 Likes

Sad C++ noises

2 Likes

all you need to do is write an annotation engine for c++, it can’t possibly be that hard right

edit: if you’re tempted to say “macros” or “templates,” i have tried both and neither work for this purpose, even when combined hideously :frowning:

1 Like

I am now terrified to try :laughing:

2 Likes

What you need to do is write a compiler plugin that processes attributes (first google result for that). Taking from your getting started docs…


class MyClass {
public:
  [[log]] int exampleField = 5;

  [[config]] void setExampleField(int value) {
    exampleField = value;
  }
};

Can’t be that hard :smiley:

3 Likes

Are you volunteering to write the plugin? :wink:

2 Likes

Any recommendations on using AdvantageKit and Oblog together?

Use Oblog for dashboard config and AdvantageKit/scope for telemetry. They won’t interfere with each other or anything.

They won’t interfere with each other, mostly…

Using Oblog to send data from the robot to the dashboard is totally fine, but you just need to be careful if you’re receiving data from a dashboard. Data from NetworkTables needs to be isolated and handled as an “input” in AdvantageKit, just like a physical sensor. If the data isn’t routed through AdvantageKit, it won’t be available in replay and the guarantee of having the same outputs in sim is broken. AdvantageKit has some built-in classes for dashboard inputs (docs), but any config data coming from Oblog would need to be isolated to an IO layer.

Of course, using AdvantageScope (the viewer application) with Oblog won’t cause any issues because it doesn’t affect the robot code.

4 Likes