DAIRLab / dairlib

MIT License
65 stars 26 forks source link

Create LcmLogSink, a VectorLogSink analog implemented as an lcm interface #358

Open Brian-Acosta opened 3 months ago

Brian-Acosta commented 3 months ago

Usage example:

auto lcm_log_sink = LcmLogSink()
auto publishes_to_log = LcmPublisherSystem<lcmt_my_message>::Make(&lcm_log_sink, ...);

// build the diagram and set up the simulation

simulator.AdvanceTo(end_time);

lcm_log_sink.WriteLog("lcmlog-00");

This is similar to Drake's DrakeLcmLog, but avoids writing to disk for every Publish event, instead deferring until the user calls WriteLog


This change is Reviewable