Adding new commands


#1

Hello,

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”)


#2

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.


#3

Thanks. Could you give me some more details on this please? It might worth trying this with the cockpit powered off.


#4

The Master branch currently has an upgraded terminal client built in to the UI that allows sending as well as viewing the telemetry stream.

If you are experimenting, you can also connect with a terminal client to ttyO1 on the beaglebone to directly send commands to the MCU.