PlotJuggler icon indicating copy to clipboard operation
PlotJuggler copied to clipboard

Introduce environment variables to skip dialogs to automate PlotJuggler usage

Open awesomebytes opened this issue 2 years ago • 2 comments

First, @facontidavide let me apologize for doing this PR as I am the first one to see it is an ugly workaround, however, the functionality I think is great to have so...

Introducing the environment variables: PLOTJUGGLER_ACCEPT_PREVIOUSLY_USED_STREAMING_PLUGIN=1 to skip the dialog 'Start the previously used streaming plugin?' PLOTJUGGLER_CHOOSE_EMPTY_PLACEHOLDERS_ON_MISSING_TIMESERIES=1 to skip the dialog 'One or more timeseries in the layout haven't been loaded yet, What do you want to do?'

Note that there is a sibling PR in plotjuggler-ros-plugins (https://github.com/PlotJuggler/plotjuggler-ros-plugins/pull/64) to skip the ROS topic selection dialog. This is a workaround for https://github.com/facontidavide/PlotJuggler/issues/201 (passing commandline flags would require a lot of changes).

P.S.: I would have loved to pass it via commandline, but it required a lot of changes. And the plugin side would have needed many more to make it elegant. Maybe PLOTJUGGLER_ACCEPT_PREVIOUSLY_USED_STREAMING_PLUGIN could be implemented as a commandline plugin. Which, by the way, I did not understand what --start_streamer does... I thought it would do that, but I couldn't make it do anything. My bad. P.S.2: I do not expect this to be merged due to the lack of elegance, specially being the main PlotJuggler repo. But maybe people will want it enough to build from source. (I may).

awesomebytes avatar Apr 02 '23 11:04 awesomebytes

wouldn't be easier to add this in Preferences? In particular, PLOTJUGGLER_CHOOSE_EMPTY_PLACEHOLDERS_ON_MISSING_TIMESERIES, should be a Preference

facontidavide avatar May 19 '23 08:05 facontidavide

also, Windows CI is unhappy

facontidavide avatar May 19 '23 08:05 facontidavide