BlueROV ROS pkg without APM

Following on from my earlier build post, my original thinking was to use an Adafruit PWM driver / Arduino combo to interface the RPi with the ESC’s and various sensors, using a modified version of the ros_arduino_bridge package.

Is anyone else using the bluerov-ros-pkg with a non APM method of sending PWM signals to the thrusters? My search of the various forums hasn’t turned up anything yet.

I’m keen too to keep a watchful eye on the APM based software developments as this may be a better option. Is there a roadmap for the functionality that is intended to be moved onto the APM? Sensor support? Use of the IMU for stability control?

This is all at a very exciting stage, so keen to be involved in testing etc wherever I can assist.

Hi Andrew,

I think it’s time we put together a roadmap for our software and electronics plans for the BlueROV. I’ll work on that and post it here or in another discussion topic and add a link.

Basically, we’re planning to move enough code onto the APM so that it can function as a standalone ROV controller while the Raspberry Pi will add the more complex features of ROS, video compression, etc. This will be similar to the autopilot + companion computer approach used on many drone designs.

We’d be happy to have you involved in testing and development!

Best,

Rusty

Andrew, it is possible to run all control code from the rpi, but a lot of work will need to be done.

I have just started working on modifying the apm code for more functionality and autonomy, with good results so far.

See Recomended Complete ROV Control package? - #4 by jwalser

 

If you are interested in the servo hat, search for pca9685 on ebay, it can be had for less than half the price of a servo hat. The apm is worth the price just to have all of the necessary hardware and sensors on one board.

I have considered both routes deeply, and I think going with the apm is the better option at this point.

Hi Jacob,

Thinking things through over the past few days I’d come to the same conclusion about heading down the APM route. As you say, there are advantages in having the sensors on one board. Nice not to have to worry about level shifters and power supply etc, etc

I managed to get my hands on an APM today so have started playing. So far the ROS package is installed and the basic APM topics seem to be publishing fine - haven’t tried with ESC’s yet, that’s next on the list.

How are you powering you APM? Via APM power module, USB (with powered up) or power to the output line?

I like where you’re heading with the modified APM code and will take a closer look once the basics are up and running. Thanks for sharing your code.

Right now, I am powering apm off raspi, which is plugged into wall wart. Using the arducopter code, you can scale outputs according to voltage, and implement failsafes depending on the battery voltage. This is done with the use of the apm power module, which I plan to use. I have one, I just have not plugged it in at this point.

 

I should note that the code on github is in it’s pure first revision, and has not been tested while connected to motors of any sort.

Thanks,

My current test setup is similar, except using a powered USB hub.

The ROS setup was going fine until I hit a snag I havn’t been able to solve yet:

Mavlink topics and Raspicam images are showing fine (albiet cam image is upside down for now).

Node graph looks fine, see attached.

Problem is no thruster commands are hitting the APM outputs? Not sure where the issue might be yet, but time to call it a day and try again tomorrow.

<span class=“blob-code-inner”><span class=“pl-s1”> </span></span>

 

 


Look at the terminal that you launch simple_pilot in and press the a button, it should say “thrusters enabled.” Also try changing js0 to js1 in teleop_xbox.launch, this needs to be changed manually from time to time right now.

Andrew,

Do you have the APM code from our fork and “br-ros-rov” branch of the ArduPilot repo loaded? It’s here if not: https://github.com/bluerobotics/ardupilot/tree/br-ros-rov

The standard code does not respond to PWM output messages on all channels.

Best,

Rusty

@Andrew,

There is a cape (shield) now called the PXFmini that can provide an IMU and PWM outputs for the RPi. It is designed for the RPi Zero, but will work with the RPi and the PRi 2.

Regards,

TCIII AVD

In one of those strange quirks of projects, I restarted everything this morning and the PWM outputs are coming through just fine. Don’t know why it wasn’t working last night, but all good now.

I reflashed an Afro ESC I borrowed from one of my drones and paired it with a spare brushless motor - again all worked without a hitch this morning. :slight_smile:

Now back to working on the frame while I wait for the thrusters to arrive.

 

 

 

 

Today’s effort was focused on getting a proper power supply circuit in place. Again cannibalizing one of my drones, I’ve put in place an APM power module to power the APM and installed a separate 5v buck regulator to power the RPi2. I wasn’t confident enough that I had enough headroom with the APM power module to power both the APM and the RPi2, along with any sensors I might want to add on in the future.

As a precaution I also removed the +5v wire from the USB cable connecting the APM to the RPi2. There seems to be some debate about whether cutting the 5v is necessary or not, but for the sake of a quick snip with a knife and a bit of heatshrink, it seemed worth the effort. USB and power module

Thanks TCIII for your suggestion re. the PFXmini, but for now I’ve decided to head down the APM path using an RCTimer 2.5.2 APM clone (as far as I can tell, essentially the same as the 2.6 except with a mag sensor on boards).

I’ve had good success with the RCTimer boards in drones, with no failures from the four I’ve used. Surprisingly, the only board failure I’ve ever had was with a genuine Pixhawk, thankfully only a few seconds after takeoff so only two broken landing struts to deal with.

I’m not generally a supporter of cloned products because of the intellectual property issues and my preference to support the organisations that put in the R&D effort, but where products like the APM are no longer being actively developed happy to try a good quality clone.

p.s. I’ve appreciated reading your build blog and have made a few changes to my original design as a result.

Andrew