Controlling ROV to 90 degrees not working

Hi @williangalvani, @Elliott , we are opening this forum again.

We were able to make the code executable, and test it but we are having some issues at the moment.

I modified just a little the code, previously the code will spin in one direction (certain degrees per second), wait, and then come back to same position.
At the moment, the code just make the ROV spin 180 degrees and stay there, just that.

But we are seeing that the spin instead of being on the roll axis (or pitch axis), it is spining on the yaw axis, in other words, is never reaching the upside-down position.

We have calibrate and re-calibrate orientation, sensor, compass, etc.
QGround is showing the correct orientations and positions, thus we believe the issue is not on that side.

Something worth saying is that when running on Manual mode, some joystick signals are mixed, ex. Forwards is backwards, sometimes the throttle is yaw, forward is left, etc.

We have run several times joystick calibration, sensor calibrations, it corrects, but when disarmed and arm again, this MAY happen again. On joystick calibration sometimes we faced issues as the throttle not behaving as expecting, jiterring or stickin in place.

I think these two problems are related, but not so sure how to correct them.

We are thinking on changing the controller, but still, even if the controller is bad, shouldnt the code work as expected, as it relies on the sensors signals?

Any idea?

Thanks in advance.

Hi @reimonha

This sounds like misconfigured motor outputs. please check the thrusters one by one.

I checked each motor manually and they function as they should but when I do the automatic test I immediately get an error on motor one. @williangalvani

A post was merged into an existing topic: Automatic Motor Setup and frame

Hi @EliotBR , @williangalvani , i will like to continue with this thread.

Now we are making test on a simulator, this to speed up the try/test process. We follow instructions from : Setting up a simulation environment

Everything is working fine, so on that part, all good.

I was testing the code you shared, @williangalvani . Pymavlink · GitBook

And i have an observation:

  • Target depth is hold as expected, if i input 5 meters, 2 meters, the ROV follows the instruction as it should. No problem on that.
  • The issue arise on the set_target_attitude function. i try with something simple, like test the yaw movement, i see that what it actually does is go to that yaw angle, and then comes back to the original position. This behavior is follow on roll and pitch.

Is there a way to modify this function so it can actually hold the angle asked?, like the 90 degrees or 180 degrees for roll

Thanks in advance.

Cc: @SaferHarbors
.

1 Like

@williangalvani @EliotBR please help with this issue. It’s something we have been stuck on for a very long time.

1 Like

Hi, I’m very sorry for the delay.

ArduSub requires periodic messages in order to keep pointing to an attitude target. That is why it is sent every one second in our example.

1 Like

I tried the take a spin code through SITL and it dives a bit and then the rov just goes out of control in every aspect.

1 Like

I’ve noticed some issues with SITL here, I’ll do some investigation.

2 Likes

It didn’t the same thing with on the rov as well.

Do you have any updates for us? I also ran into that problem a while ago and made a forum post, but i found no proper solution.

I never got a solution.

Any luck?

Sadly not. I moved on.

I’m guessing it is just impossible.