yujin_ocs
yujin_ocs copied to clipboard
[yocs_diff_drive_controller] move function code from header to separate cpp file
E.g.
void DiffDrivePoseController::spinOnce()
{ ... }
Put it inside the class declaration or add inline
.
Or in the cpp file - should always put function code in a cpp file unless it's either 1) a template function, or 2) you are expressly looking for an algorithm speedup by avoiding a function call (tradeoff cost - greatly increased program size).
I avoided doing this in the first version of the ecl when I was attracted by the idea of a header library we didn't need to compile (simpler to setup, simpler to install....lazy bastard). End result was that after a while our program sizes rapidly got so large they became unwieldy on embedded platforms (particularly for iclebo) and ecl2 was spawned.
Will move the function code into a separate cpp file (issue title updated).