I’ve got this question a couple times so I’m documenting the technique for all:
I do a lot of development directly on the ROV. Over time we hope to make it super easy, but for now there are still a couple of steps to make it work.
If you run on a set of the batteries with everything else turned off, you can code a 6+ hours off of a full charge. You can increase that by turning off power to the ESCs which is currently the ‘’ key command in the OpenROV cockpit.
When I am doing node development, I will pull the BBB off of the ROV and power it off of USB from my laptop. It is small and portable, easy to take to a cafe
If your really dedicated, I have an electronics only package which is sold in the OpenROV store that has a controllerboard + beaglebone. If others want I can document how I prepped that for development, along with a case the @Brian_Grau put together for me.
Step #2: Development Image
I download the latest image on to a 4GB SD card and use that for development. It is portable and I can always get the ROV ready for a dive with the stable code by putting in a different card. As of this post I was using the latest beta from BETA for OpenROV Image 30.0.0.
Step #3: Internet
There is actually an clever browser as proxy solution we use to give the ROV access to the Internet when plugged in to your computer without having to do any software setup. Unfortunately there are a couple things that still need to be fixed before it works seamlessly for development:
I currently manually execute a work around as recorded in https://github.com/OpenROV/openrov-software/issues/389 to setup the proxies correctly. This only needs to be done once and then the images needs to be restarted:
sed -i 's|https://localhost:3000|http://localhost:3000|g' /opt/openrov/proxy/openrov-proxy.service
I also set a current date per https://github.com/OpenROV/openrov-software/issues/390, which will hopefully get automated at some point. This is needed when downloading software via SSL or validating signatures. This has to be done everytime the system is power cycled.
date -s yyyy/mm/dd
To enable Internet access just open up the dashboard http://192.168.254.1, is will transparently establish the bridge.
Step #4 Prep Image for development
Set the github username and email options
sudo git config --global user.email "firstname.lastname@example.org" sudo git config --global user.name "Billy Everyteen"
Pick the code I want to work on and attach the github instance.
cd /opt/openrov/arduino sudo git remote add myrepo https://github.com/<gitusername>/openrov-software-arduino.git sudo git update sudo git fetch sudo git checkout -b <nameofbranchlocally> myrepo/<nameofbranchonremote>
Change the permissions to make everything writeable. Eventually we will check this in. Replace arduino with the project you are working on.
sudo chmod -R 777 /opt/openrov/arduno
Mount the ROV drive remotely. You can of course enable the samba service
sudo /etc/init.d/samba start
but I prefer mounting using sshfs (osx/linux) this is done from the laptop
mkdir /Volumes/rov sshfs -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no email@example.com:/ /Volumes/rov
Open up an editor to make changes. I prefer atom by github. This is done from the laptop
I usually have the atom editor open on one side of my laptop and the ssh session on the ROV on the other. As I make code changes I will restart the dependent services as needed or reload firmware which I will then get immediate feedback on.
I can use git commit to save everything locally and then use git push to send it up to my repository where I can later create a Pull Request for the team to pull in to the official OpenROV repositories.
Let me know if you have any questions! Good luck!
Other useful commands: