Hi everyone,
If you read the title and thought “but why??” - let me give you the answer: for science!
However, it doesn’t quite work yet and I would appreciate if someone could point me into the right direction.
In a nutshell, we are trying to modify a BlueROV2 Heavy so that it can drive around on vertical surfaces.
(In our case, on the towers of offshore wind turbines and on retaining walls of harbour basins. These things need to be coated with protective paint every once in a while and the current solution of divers going down there and doing it by hand is both dangerous and expensive. So we’re researching ways to automate this.)
We are building a crawler with wheels that will be mounted underneath the ROV and that will be used to drive around and spread the paint. For this setup to work, the ROV will need to turn (pitch upwards) by 90 degrees and then engage the four downwards thrusters (full throttle). That way, it will stick to the vertical surface like Spiderman!
I am currently trying to find a way to modify the ArduSub code so that the ROV can be moved into the target position by the push of a button, after a human drives it to a location. I have looked at joystick.cpp
and tried a few things but nothing has worked so far and I feel like I’m missing a very basic step somewhere.
Approach 1: set target pitch, then engage thrusters
case JSButton::button_function_t::k_custom_1:
if (!held) {
attitude_control.input_angle_step_bf_roll_pitch_yaw(0.0F, 90.0F, 0.0F);
motors.set_throttle(1.0F);
}
break;
This will briefly engage the four top thrusters (5,6,7,8) but nothing else happens.
Approach 2: use stabilize
mode to keep pitch, then set target position to 10 cm below ROV
(I first tried depth_hold
mode and setting a target depth but that uses a “global” depth instead of the ROV as reference frame.)
case JSButton::button_function_t::k_custom_2:
// user will need to pitch ROV first
if (!held) {
set_mode(STABILIZE, MODE_REASON_TX_COMMAND);
Vector3f v(0.0F, 0.0F, 10.0F);
pos_control.set_pos_target(inertial_nav.get_position() - v);
}
break;
This will move the ROV back to its original (horizontal) position but nothing else happens.
Approach 3: use attitute control
case JSButton::button_function_t::k_custom_3:
if (!held) {
attitude_control.rate_bf_pitch_target(90.0F);
attitude_control.set_throttle_out(1.0F, false, g.throttle_filt);
}
break;
Nothing happens with this one either.
Approach 4 would be to implement a new mode or modify an existing mode, but I thought I’d ask here first if that would be more fruitful than my first three approaches.
Now I am out of ideas. There seem to be different functions doing essentially the same thing (setting throttle via motors or attitute control, for example). But I can’t decide which one will solve my problem. Is there a simple and efficient way to do this?