Ardusub and MAVProxy modules

I am re-posting a question from another subforum, with additional info.

I am trying the following MAVProxy commands and keep getting the corresponding results (in both Linux and Windows environments):

open mavproxy (it connects to Bluerov2 normally)
arm throttle (motors armed as shown in console)
rc 3 1510 (motors start spinning trying to move rov forward)
rc 3 1500 (motors continue – although I think they should stop)
disarm (motors stop – camera servo starts “hiccup”)
arm throttle (motors start spinning)
disarm (motors stop);

I was expecting that I could start/stop thrusters with “rc” mavproxy commands, but this doesnot happen.
Any ideas?

In addition, I tried the same thing by connecting to the companion raspberry (through “SSH pi@192.168.2.2”) and issuing the following commands in order to get into MAVProxy:

% sudo screen -ls #to find mavproxy's PID
% sudo screen -r "PID" #where "PID" is the process id of mavproxy

This gets me into the running MAVProxy with the prompt:

mode (19)>

Then I enter the above MAVProxy commands with the same results.

What is happening and how can I control the bluerov through commands in MAVProxy command line?

PS: During the above tests, I had not QGC running.

Try using ‘rc all 1500’ first. You can open qgroundcontrol without a joystick connected, and use the mavlink inspector widget to look at RC_CHANNELS_RAW and SERVO_OUTPUT_RAW to get a sense of what is going on.

To use qgroundcontrol and mavproxy at the same time, start mavproxy like this:

‘python mavproxy.py --master=/dev/ttyACM0 --out=udp:0.0.0.0:14550’

QGroundControl will connect to the udp port.

-Jacob

1 Like

Thanks Jacob.

I just upgraded to Ardusub3.4-RC1 and downloaded the latest QGC.
I suppose that the mavproxy start command you propose is for the companion raspberry, meaning that I have to edit the start_mavproxy script there accordingly?

Just starting mavproxy in companion raspberry doesn’t work…

UPDATE:
If connect through ssh to companion raspberry and do a screen -r "mavproxy_pid", open QGC in the computer and start giving “mavproxy rc” commands it works! (with the exception of changing between modes which has to be done through QGC.

UPDATE #2:
If I close QGC and start mavproxy (with no options) in the “surface computer” I can also arm/disarm and give mavproxy rc commands successfully.
The only thing that does not work (and used to work before the 3.4 upgrade) is the capability to change between modes by giving the command rc 5 1100 (or 1300 or 1420) for Manual/Depth_Hold/Stabilize modes accordingly.

I had no success on running QGC in parallel (no joystick connected)

So, we are approaching but not still there 100%…

Any ideas on how to do that are welcome!

Vagelis

Using rc 5 to change modes will no longer work, the channel value will change when you enter different modes using the joystick just so that QGC will show you which mode you are on in the flight modes page. You can use the mode command in mavproxy. ‘mode 0’ for stabilize, ‘mode 2’ for depth hold, and ‘mode 19’ for manual.

 

Oh, yes I’m sorry the mavproxy command you would use for the surface computer connected to BROV2 would be:

‘python mavproxy.py --master=udp:0.0.0.0:14550 --out=udp:0.0.0.0:14551’

Then in QGC, create a connection for port 14551.

 

-Jacob

Great news!
Thanks Jacob!
(I will try it tomorrow and will confirm!)

Hi Jacob

Following your yesterday’s message here is my update:
(I have updated to Ardusub3.4-rc2 and QGC daily update of Dec 13, 13:51)

  1. mode command does not work - it gives a No mode mapping available message
  2. Working on a linux environment, i cannot change connection to port 14551

Vagelis

  1. There is a mode mapping in mavproxy master. Try updating your mavproxy installation. Alternatively, you can use the SET_MODE message in your program.
  2. Click the Q icon, then the comm links tab, there you can add a connection for udp 14551.
 

-Jacob

Thanks Jacob.

I appreciate your support.

  1. You mean to upgrade mavproxy at RPI or @surface machine?
  2. I know that, but it does not save the connection. Maybe i do not set the correct “target”?

UPDATE on #1 above:
Upgraded both surface and companion(RPI) to MAVProxy v.1.5.7.
Still the same answer no mode mapping available

My mistake, the mode mapping is in pymavlink master, but not the package release. You will have to download pymavlink and install/build from source to use the mode command. Otherwise, you can still use the SET_MODE mavlink message.

 

In QGroundControl, select udp for the type and 14551 for the port, you shouldn’t have to put anything for target host.