logger: introduce optional topics

The current practice of adding topics to the default set isn't scalable,
as it affects all setups.
By making sure topics are advertised on init, logger can just discard
topics that don't exist. This does not work for all topics, so topics are
specifically marked as optional. It can be extended to more topics later
on though.

This reduces the list of topics by ~35 on a pixracer configured as quad,
and reduces RAM usage by ~1KB.
This commit is contained in:
Beat Küng
2021-11-15 13:47:26 +01:00
committed by Daniel Agar
parent 177fe4bade
commit 4ba84d56c9
24 changed files with 120 additions and 60 deletions
@@ -50,6 +50,7 @@ AngularVelocityController::AngularVelocityController() :
_vehicle_status.vehicle_type = vehicle_status_s::VEHICLE_TYPE_ROTARY_WING;
parameters_updated();
_rate_ctrl_status_pub.advertise();
}
AngularVelocityController::~AngularVelocityController()