APMrover2 code modifications

Greetings enthusiasts!

Can anyone detail the BlueRov modifications to APMrover2 code? I would like to familiarize myself with the modifications for the BlueROV. I am building a ROV with 4 laterally vector thrusters and 1 vertical thruster and will need to modify both the APM and ROS code. Maybe not the APM, but I am unsure at this point. The ROS code isn’t an issue.

Thanks

Jim

Hi Jim,

I’d be happy to talk about it. The modifications made are actually incredibly minimal. We are using the APM as more of a hardware input/output layer than as an actual controller right now. If you look at our fork of the ArduPilot repo, you’ll see that there is a branch called br-ros-rov. We only made one small change to that branch, namely enabling MavLink PWM output through all available channels. (By default most of the channels are disabled).

That allows ROS and mavros to interact with everything onboard the APM, including the PWM outputs. The actual motor commands are all calculated in ROS instead of on the APM.

Here’s a diff of the changes for you to see:

https://github.com/bluerobotics/ardupilot/commit/98ccf27ef5565e639d21f19c69f1109027b64996

Best,

Rusty

That’s great news. I’ll create a new pilot, call it penta_rov_pilot or something for the configuration I’m building.

My next challenge, however, is getting the new APM code into the rpi prempt rt so I can use the navio+ as the apm…fun times.

Thanks

Jim

Jim,

Another alternative is to use a different APM flavor on your Navio+. At the moment, the only thing we use the APM for is the servo commands so really any mavlink-compatible controller that understands the “set servo” (183) command should work.\

In the future, we plan on utilizing the APM’s IMU for some minor closed-loop control. We’ll be using mavlink again for this communication, so you should be future proof as long as your Navio+ code does the same.

Josh

Small update, I’ve added you APM modifications to the navio branch of ardupilot. Compiled APMrover2 and all is well as far as the navio+ is concerned.