I am trying to add some new commands to the ROV in order to control
its behavior (eg control an external servo or set target heading in a
pid control).

So far I understand that in OpenROV.ino every command is given through cmd.get();.
I can see that in this function there is a call of getSerialString().

My question is, how can I give any command as input to the ROV
through this serial, without having to create a new cockpit plug-in? Is
there any way I can send commands through a terminal? (even existing
commands like “ligt” or “tilt”)

Right now, we haven’t yet added a feature in the cockpit which allows the user to send arbitrary commands to the MCU, but it is on the radar to add that in. It is still technically possible to achieve this goal by directly accessing the serial port in Linux on the Beaglebone and sending command strings via the device file. However, if the cockpit software is still running, it may still have the serial port open, preventing you from doing this, so unfortunately there is no particularly easy way of sending arbitrary commands yet without modifying the cockpit software or leaving it closed while you do your testing through the Linux interface.