Ardusub initial setup

Hey Rusty,

Here is my clip. To make the changes that you reccomend above would you type?

start_video.sh --bitrate 15000000

qgroundcontrol-development-head_70d225b-2016-08-19-19_10_23-0700-8_26_2016-6_32_13-pm (8.41 MB)

Hi Ryan,

To make the changes above, you should edit the script by opening it in a text editor:


nano start_video.sh

You’ll see the lines that need to be changed near the bottom. To save an exit, press Ctrl-X and then say “yes” to saving.

Restart the system after that so the changes will take effect.

Let me know how it goes!

-Rusty

Ryan,

As I found out, to make the changes Rusty mentions, you may have to install a GUI to actually get into those files. I installed LXDE for the GUI, gedit for the text editor, and firefox for the browser. Then you log-in using a remote desktop application (Windows has it built in), then “sudo startx”, and then you should be into the GUI and able to drill down into the “companion” folder to find the “start_video.sh”.

Being new, that took me a few hours to figure out a few nights ago. Jump on the Gitter chat if you need help and I’ll walk you through what I remember: https://gitter.im/bluerobotics/ardusub

@Kevin,

That’s one way to do it but you definitely don’t have to install a GUI to make these changes. I would recommend trying a simple command line text editor like nano.

I’ll work on a new SD card image that has these changes included as well.

-Rusty

Yep, I definitely went the long way around.

@Ryan,

Here is the reference to the text editors: https://www.raspberrypi.org/documentation/linux/usage/text-editors.md

Hey Kevin and Rusty,

When I use nano start_video.sh it takes me into the text editor but I do not see any text. Any ideas?

 

Ryan


Hi Ryan,

You have to be in the directory that holds that file for it to open properly. Try this, which has the complete directory:

nano /home/pi/companion/RPI2/Raspbian/start_video.sh

While you’re starting to learn to use Linux and the command line, I’d recommend reading some tutorials and learning about basic commands like ls to list the current directory and cd to change directory.

-Rusty

Thank you Rusty and Kevin,

Those changes fixed everything! I appreciate you explaining things to a Linux noob. Hopefully this thread will help others along the way.

One last question. What is the best way to flip the image from the camera? I may flip the camera mechanically if I can’t figure out a way in software.

Thanks guys

Ryan

 

Hi Ryan,

You can add the vflip option to do this. Add a line to the start_video.sh file that says this:

--vflip \

The "" at the end just tells it that the command continues at the end of the line. Make sure you insert this near the other options in the command.

-Rusty

Hi rusty,

Thanks for your help, i made the changes that you mention to video_start.sh and the image it is much better but continue with high latency. I try with the qgroundcontrol for android and i have full mavlink connection but have the same problem with the video, so the problem is not the computer.

i download the linux version of qgroundcontrol but i don’t have video streaming, i supose in linux works instantaneally but not. i test in ubuntu 16LTS, may be i need test with older version??

about windows, how is the command for change streaming resolution in video_start.sh??

thanks a lot

Hi Cristian,

Okay. Do you know how long the latency is? We normally see about 200ms latency in our testing.

To change resolution for faster response, you can replace:

--mode 5 \

With:

--width 640 \ --height 480 \

In our testing, the latency is about 100ms at that resolution. Note that you can’t change the resolution to any number as the camera can only operate in certain modes.

Also, video streaming should work immediately on Linux if you have the most recent daily build and your host computer IP address is set to 192.168.2.1.

-Rusty

Dear all,

Somebody know how to do use Ardusub/QgroundControl on Android? My Idea is use a router wifi, here is connected the ethernet cable from Raspberry (ROV), and use the QGroundControl on Android device connected over wifi and some Bluetooth joystick to control the ROV . I don’t know how to setup the router wifi, and if need other apk on the android, to receive the video stream, because on Windows, need the GStreamer for UDP Stream and other thinks to connect the joystick.

Jonathan Santrovitsch

Jonathan,

I tried using a USB hub with ethernet connection (worked fine on a Surface Pro4) to my Android powered Sony Z4 Tablet, but I couldn’t get it to work for me, so I think your wifi router idea might be the only option. If you enable “developer options” on your Android device, you can change the USB configuration to RNDIS (USB Ethernet). However when I tried connecting everything, I couldn’t get a connection to QGC even though it was passing data packets…so I dunno.

Kevin