Camera tilt control very limited


Is there any calibration for the camera servo? I only get limited movement using the keyboard
commands Q A Z. When powered off I can move the servo twice as far in each direction




I been meaning to look into his myself, from what I understand the range of movement of the camera servo has been limited to protect the servo from moving anywhere near the mechanical limit of the camera mount, this also provide additional tolerance during assembly (if the servo zero position is not accurately in the middle of the range.

The available range appears to be limited in two locations, firstly in mapping the control inputs to the servo pulse period in;

\opt\openrov\cockpit\src\lib\ArduinoPhysics.js : in the following section:

physics.mapTiltServo = function (value) {
value = limit(value, -0.7, 0.7);
return mapA(value, -1, 1, 1000, 2000);

The second limitation is in the arduino code, located in;

\opt\openrov\arduino\OpenROV\CameraMount.cpp : in the section:

void CameraMount::device_loop(Command command){
if (command.cmp(“tilt”)) {
if ((command.args[1] > 999) && (command.args[1] < 2001)){
tilt_val = command.args[1];
cameraMountdata::CMTG = tilt_val;

The HS-81 has a full range of 180 degrees (600us - 2400us) which works out as 1 degree per 10us (with 1500us being the zero position), mapTiltServo limits this to 1500us +/- 350us (or +/- 35 degrees). If your zero position is faily close any you have free movement of the camera mount over the full range it should be pretty safe to increase the limits in mapTiltServo from (-0.7,0.7) to (-1,1) which should give you another 15 degrees of travel in each direction (three additional steps in each way).

If you wanted to go more than this, I would carefully measure the maximal travel of the camera mount in each direction from the zero position and take the smaller of the two, subtract a safety margin (say 10 degrees)
and use this to calculate the max/min pulse period to be used in both locations (as well as changing the limits above). Note: you will need to re-compile/upload the changes to the ardiuno for this to take effect.

Just to re-iterate, I have not tried any of this (yet) and mistakes will likely end up stripping the gears in the servo. Care would also need to be taken if you remove/adjust the servo at any point in the future as a small misalignment of the horn could result in the same.


Thanks for your answer. Right now, it moves maybe 15 deg. up and about 20deg. down
and there is nothing it would hit if it moves an additional 20deg in each direction.
I am not a programmer and especially not a Linux user, so I would not attempt to
change the software settings myself.


It would be very helpful to have a guide on all of these changes, including the management of engines, complete with instructions for re-compile and upload.

ps … but why recompile and upload?
it is not possible to edit directly on the rov (with WinSCP)??


Globallink, sorry I assumed, like me you were wondering why it doesn’t make near full use of the available range. 15-20 degrees in each direction doesn’t sound right at all, can you confirm you are using the HS-81 servo that comes with the kit (servos resonses vary a bit from one manufacturer to another). Also could you check the number of steps you are getting in each direction?

Steve, you can edit the source code for the arduino (controller board) that is stored on the beaglebone, but this still needs to be compiled and sent to the ardiuno (really it is just a process of uploading, as the code is automatically compiled from the source code that exists on the beaglebone).

This can be done via ssh by running:
sudo /etc/init.d/openrov stop
sudo /opt/openrov/cockpit/linux/arduino/

I agree it would be handy to have a guide that includes some of the more common software modifications, but given the target audience would be those not familiar with linux and/or coding in general this may not be a trivial exercise. Maybe the place to start is to create a new post on the forum and get everyone to put suggestions together of a list of topics that would be handy in a ‘modders guide’.


I confirm that use the original servo.
Swirled gently by hand I have available 10/20 degrees on both sides.
As I wrote in another post, it would be very interesting to change the control of the engines in reverse (more power) and in curves. There are many free controls on the gamepad and I do not understand why you did not enable the rotation of the ROV, very useful in small spaces (1 motor 100% forward and another motor 100% back).

When I change the code on the Beagle Bone, I can copy it to Arduino with the utility to compile and upload available in the cockpit?

PERFECT !!! with value
value = limit(value, -0.8, 1);
the webcam makes the maximum rotation without touching the plastic.
Considered that the maximum utility is in swing it down,
if the two lasers were mounted in the upper part, the value can be -1, 1.

Next step:
Rotation axis commanded by right gamepad controller (right / left), currently not used !



ah …
another question:
I replaced wires of the power supply of LEDs and lasers with soft silicone wires
and have also replaced the cable usb webcam with another short and soft.
In this way the camera is much more free to move !!!
Unfortunately I find the internal and external wiring of our ROV very poor quality (too rigid plastic insulation, no double insulation…


My camera servo stopped working completely. It was moving fine about 7 clicks in
each direction and suddenly it stopped and it seems that ht servo has no power, This
is the servo that came with the original kit. It is defective and I ordered a new one