Planning path problems

How can I specify a path in the code, say a circle with a diameter of two meters, so that the ROV can follow the specified path? Does anyone know where this part of the code is in that file, or how I should go about writing this code?

Hi @suitangxiaoyi,

Which code are you talking about?

ArduSub is the firmware that runs on the autopilot, and it receives control instructions from an external controller - ArduSub should not need to be modified in order to control the vehicle.

If you have a positioning sensor you should be able to set up missions using QGroundControl’s Plan View.

Controlling the path with your own external program should also be possible, but the possibilities depend on what you have available. This post (and the posts it links to) may be of interest :slight_smile:

The action I want to accomplish is similar to an ROV following a predetermined trajectory after powering on, such as a circle, and does not require the involvement of a QGC.

I understood that mission planning and route following with waypoint or circle or any shape was not supported with the QGC / ardusub firmware. This reply make me doubt:

Should I understand that if I have a GPS on my ardusub ROV, I should be able to do waypoint following in QGC without using arduboat, ardurov or else?

thanks

A circle relative to what? Following a path in physical space requires live positioning estimates, or at minimum some form of positional error estimation.

  1. If your path is defined by known GPS coordinates then it should be specifiable before launch as a mission.
  2. If your path is defined relative to the launch location then
    • if you have a positioning system you should be able to programatically define a circle to follow when the vehicle starts, using either
    • if you have no positioning system, and are wanting to move relative to a known object in view of the camera then see the post I linked to in my previous comment

Note that ArduSub’s positional control features are developmental, and many related features may currently be poorly documented (if at all), and the features that are implemented may be buggy. If you’re interested in something in particular I can try to find or ask about more detailed information on it, but much of the existing knowledge is in the general ArduPilot side, so for non sub-specific things it may be best to ask in the ArduPilot developer communication channels.

It may be worth looking at the ArduCopter Missions documentation. Not all of the information will be applicable, but it should hopefully at least provide an overview of the general missions structure and what kind of functionality may be available (in which case you can search for and/or ask about it in the context of ArduSub).

As I understand it,

  1. All ArduPilot firmwares have access to the mission library
  2. ArduSub has some positional control modes (see control_*.cpp) and commands implemented (including things like mission following and the circle control mode), but they haven’t been extensively validated on our end so we present them as developmental rather than stable and fully supported.

So basically, yes, you should be able to do waypoint following in QGC, but there may be unexpected issues or buggy behaviour that occur when trying to do so (in which case please report them and we can try to work together to fix them - as with any other issues).

In the ROV manual, there are several modes, and in the official manual there are a dozen or so.But it doesn’t say how to switch, if I am interested in circular mode, how do I access it?

I spoke with our lead ArduSub developer today to get a better understanding of this.

Circle mode can be switched into like a standard flight mode (via a set mode MAVLink message, from QGroundControl or code using a library like Pymavlink), assuming you have an active position estimate. When switching into circle mode, the CIRCLE_* parameters determine the radius and vehicle behaviour while circling. That’s a link to the ArduCopter parameters, because at the moment the CIRCLE parameters aren’t included in the ArduSub documentation, but the parameters are available and work the same way.

Be aware that the latest beta release of ArduSub has a bug that means the vehicle may not correctly face the center of the circle (or the direction of travel, if that’s configured), and instead may continue facing close to the direction it started the circle in. That bug is not present in the latest stable or development releases.

I tried to use model_circle on the ROV, and after I configured the parameters and the handle, I still couldn’t start the circle mode properly


Hi, CIRLE is a “position-enabled” mode, do you have a gps or similar attached to your ROV?
Are you able to enter Position Hold mode?

I tried to do that, but QGC reported an error after I configured the pose hold model for the gamepad button, the error is :
PreARM: Must assign a disarm or arm_toggle button.
error

befor that, the ROV works well.
I don’t know if this has something to do with the circle mode not working.

That means you don’t have a button for arming or a button for disarming the ROV set up in the joystick. You probably reassigned one of them for the POSHOLD mode.

1 Like


I really reassigned one of them for the POSHOLD mode.
Thanks, I will test the POSHOLD mode. :grinning:

Here is my joystick setup


When I press the button 0, the ROV didn’t respond, so, is that means I can’t enter the Position Hold mode?

Do you have a positioning sensor? Eitehr GPS, DVL, or UGPS?
One of these is required for entering position-enabled modes.