IP CAMERA 4K / 60FPS / Plug and play for BR2

Hi @lbentes ,

I will make the cameras on demand and I will accept orders via email at customrovs@gmail.com.

I haven’t had time to finish the final presentation post of the product, I’m making a video of the use of the camera control software and a pdf of the assembly and technical specifications.

I hope to have it ready next week.

Regards

2 Likes

Hi @Andres -
If you’ve got any questions on how to integrate your camera’s controls in Cockpit, we’d be happy to help! We’ve been setting up lua scripts for focus and zoom control on our (similar) camera update, due out next year…

2 Likes

Hi @tony-white

Thanks a lot for the offer! I’ve never written in Lua, but it would be great to be able to integrate camera control into Cockpit.

I’ve recently finished writing my own code for controlling camera parameters via the joystick.

I’ve written it in python and exported it to exe to run on Windows, and it’s based on cgi commands sent via request through keyboard keys, which I convert into joystick buttons using Antimicro.

The buttons can be customized, that’s why I decided to use Antimicro, but I also have a joystick mapping that I recommend for use and that is tested and I’ll share it soon.

With this software I can control the following parameters: zoom, focus, brightness, contrast, ISO, shutter, white balance auto/manual (WB_blue, WB_red), antifog, WDR, hight ligth compensation, back ligth compensation, plus a combination of buttons to record video and take photos directly on the SD.

The software runs in the background, simply at the beginning it requests the user, password and IP data of the camera and then you have a mini window, at the bottom right, which is superimposed on Qgroundcontrol or Cockpit, where it indicates the changes of the parameters used and it is easier to control. I will share a video of its use soon.

It would also be great to convert this code to Lua and integrate it into Cockpit, but I don’t know if my programming level would allow me to do it. If you are ok with it, I can send you the Python code and you can tell me how you see it to adapt it to Lua.

Regards

1 Like

Hi @Andres -
Very cool - it sounds like your python code is talking via HTTP requests to the camera?

I’d think you’d have many more customers if you could support Mac and Linux, instead of just Windows…

Our approach initially used HTTP requests to control zoom and focus, but we’re moving these to servo PWM control, with things like one-push white-balance still handled via HTTP. By putting the camera lua script in the correct location (/configs/ardupilot-manager/firmware/scripts) Cockpit gains the ability to map whatever button you’d like to script 1, 2, 3, or 4 for focus and zoom control, and custom1 triggering the auto white balance.
radcam_control.lua (7.3 KB)
I’ve added this script to my repository of useful Lua scripts for Blue Robotics applications!

This approach is only going to work for Cockpit, but requires very little configuration - just drop the lua script with camera IP configured in the correct place (requires ArduSub 4.5+, and map the buttons as desired!

1 Like

Hi @tony-white ,

Thank you very much for the information!

I agree with you, my next steps will be to adapt the Python script to MAC and Linux, there should not be any major modifications except for the use of some library, but of course it is one of the things that is on my list. In any case I will share the Python script for people who want to adapt it to their liking and do tests on MAC or Linux.

The camera also works on other operating systems, since it is an IP camera, with rtsp and http access. As well as all the parameters via http.

The option of control directly through Cockpit seems very interesting to me. I am going to try to make the Lua scripts, one for each function and test. A question, is the directory you indicate for blueOS or Cockpit? Is it a directory that you find before compiling or is it the program directory once installed?

Thank you very much

Hi @Andres -
If the camera supports parameters changing via http request, it should be very easy to adapt the lua script shared to your use case, and not have users need to install additional software!
The directory the script goes in is within BlueOS, found with the File Manager, yes.

Thanks @tony-white !

I’ll test it as soon as possible.

The only limitation I see is that at the moment, if I’m not mistaken, Cockpit can only do button combinations with “Shift”, and this does not allow you to use all the camera configuration parameters that I’ve added to the script at the same time; you’d have to choose the most important ones, or the ones you use most often.

To avoid this, what I’ve done is write my script using key combinations instead of joystick buttons to call the http functions. In this way, by using Antimicro and converting the joystick buttons into keys, you can use any combination without limitations (always avoiding coinciding with the buttons you use to control the ROV, obviously), which allows full control of the camera live. In this way, you can adapt the camera live, and record fantastic images adapted to each situation of luminosity, depth, turbidity, focal length, etc. This .exe runs in the background and consumes few resources so for now I think it’s a good option.

It’s also a great idea to explore Lua in Cockpit, so I’m very grateful for your input and support. It would be great to be able to combine functions with some other button besides “shift”.

Regards

Hi @Andres -
For the moment, you can only map the shift key to one button at a time, so yes it only doubles the button presses available. I’ve found some controllers with more buttons, particularly 6 triggers, to be a good option.
There is mention of improving this in this feature request if you’d like to follow along or comment.
You do have quite a lot of functions! I’d think making a BlueOS extension with a web interface to hold the less common ones, in a small layout (maybe a few hundred pixel square?), would then allow you to embed this on-screen in cockpit as aniframe widget. This way you could map the critical ones to buttons, but then things like light compensation to the cockpit interface via clicks…
We hope to support keyboard-as-joystick in cockpit as well- this is mentioned in the same cockpit issue.

Hi @tony-white ,

Thank you very much for the advice! I haven’t answered before because I was finishing the camera project.

The option of developing a BlueoOS extension is interesting, but this option, by not having so many buttons available on the joystick, forces you to use the mouse to configure some parameters and this doesn’t quite convince me. Also, currently you can do something similar by embedding the camera as an iframe in Cockpit and directly accessing the configuration of all the parameters without leaving Cockpit.

I still believe that for now using the software I wrote (Windows OS) is still the best option. It is very easy to use, as you can see in the video I share below. The video is just an example of the use of the software. The image is not at its highest quality since it is only a screen recording in 1080 at 30fps and the PC had a bit of trouble recording the screen and showing the camera in parallel in 4k at 60fps, which is why it has a small delay. The actual average camera delay is 0.2 in 4k at 60fps.

Here are the final camera features to have all the info together for those interested:

-Photos:

-CustomROV_4k_60fps dossier, with the main technical features of the camera.

-Video of the real image quality in an underwater environment.

Interested people can write to me at customrovs@gmail.com

If the administrators don’t mind, tomorrow I will make a new post presenting the final product, independent of this thread because the current one contains all the development of the camera and I don’t want to confuse people interested in the final product, since there have been some hardware and software modifications during the process.

Best regards

1 Like

Hi @Andres ,
Truly impressive work! I wanted to kindly ask you to check your mailbox at your earliest convenience,
Looking forward to your reply.

Regards

Hi @ryan354

Thank you for your kind comment!

I just returned from my Christmas vacation, here in Spain the festivities last until the 7th, so I haven’t checked my mailbox. I’ll check your message now and reply as soon as possible.

Best regards

Hi Andres, Looking forward to seeing the final product & a link to acquire one from you

Hi @real_kiwi

Sorry for the delay in my response. Thank you for your comment!

The camera is already available, I make them to order. You can contact me at customrovs@gmail.com , and I will tell you the conditions and delivery times.

Thank you very much for your interest!

Best regards