Software apps and online services
Hand tools and fabrication machines
I slowly found some ideas slowly about a product called ArduPilot.
I have been using the BeagleBone Blue (BBBlue) for a bit and wanted to advance my perspective on the BBBlue and ArduPilot/ArduCopter.
Finally, I received my drone in a DIY project kit. It came with a power board, some components, and a lot of ideas. So, I started on a yearlong journey to figure out ArduCopter, the BBBlue, and this non-soldered, DIY drone kit.
Luckily, I discovered this fellow on GitHub that was promoting a "build" and some other ideas on how to get ArduPilot on a Linux development, target board. I jumped at the occasion.
So, that was all she wrote. I decided to dive in and call myself a full-fledged ArduPilot type person.
I found this fellow: https://github.com/mirkix/ardupilotblue.
This fellow: https://github.com/imfatant/test.
I also came across Jadonks' ideas on the subject at: https://gist.github.com/jadonk/6080ca92d6e225eb89d33ad7744e1775.
So, if bored and if you get the itch like I did, jump on the imfatant/test page on GitHub and go for it. It is feature rich and full of ideas.
My ideas were a bit different so far but he has guided me through a specific set up that has proved valuable. See here on what I am discussing...oh and I move backwards through this lesson.
The bottom is the start. Enjoy! Oh and I know, Win 10 is being used here w/ PuTTY. If you are a Linux Pro and know your way around, these odd, elongated lessons are a bore. Excuse me...enjoy. Be sure to check the bottom and make the loop.
Oh... start now!
Use this command to run your arducopter on the BBBlue for testing. Look for the Ready to Fly notation.
sudo /usr/bin/ardupilot -C udp:192.168.7.2:14550 After running all the ideas below, this cmd should work. If you choose to not use the local BeagleBone Blue address, use your ip addr cmd to find your Wlan0 address on your bbblue!
sudo apt install g++ make pkg-config python python-dev python-lxml python-pip sudo pip install future git clone https://github.com/ArduPilot/ardupilot cd ardupilot git checkout Copter-3.6 git submodule update --init --recursive ./waf configure --board=blue ./waf sudo cp ./build/blue/bin/a* /usr/bin/ardupilot
I had to use sudo at the commands, all of the commands, but it worked. I was able to get ArduPilot on my BBBlue and run a .service file to set up the ArduCopter on boot.
Here is a systemd .service file example if you need it or you can look here for ideas on .service files in systemd: https://www.freedesktop.org/software/systemd/man/systemd.service.html.
To write a file to your BBBlue, use whatever text editor you are used to using. For instance, if you are using nano, please type sudo nano arducopter.service to write the file to the /lib/systemd/system directory or if you are using your system, use /etc/systemd/system directory.
Either way...use one of those two directories to write a file, this .service file, to your BBBlue for starting the arducopter.service file on boot. To stop your .service file, please just type sudo systemctl stop <your .service file>. I got this idea directly from the imfatant/test article on GitHub.
[Unit] Description=ArduCopter Service After=networking.service StartLimitIntervalSec=0 [Service] EnvironmentFile=/etc/default/ardupilot ExecStartPre=/usr/bin/ardupilot/aphw ExecStart=/usr/bin/ardupilot/arducopter $TELEM2 Restart=on-failureRestartSec=1 [Install] WantedBy=multi-user.target
Ideas: will be found on the www.freedesktop.org/software/systemd/man/systemd.service.html.
To enable your service and start it, use these commands if your .service file is named arducopter.service.
sudo systemctl enable arducopter.service sudo systemctl start arducopter.service and then...you can check your .service file w/ this command. sudo systemctl status arducopter.service
create a file... /etc/default/ardupilot and add this line! TELEM2="-C udp:<target IP address>:14550"
command: sudo mkdir /usr/bin/ardupilot and put in this software:
In that directory, make a file called aphw. then, use the command sudo chmod 0755 aphw to make it an executable file.
#!/bin/bash # aphw # ArduPilot hardware configuration. /bin/echo pruecapin_pu >/sys/devices/platform/ocp/ocp:P8_15_pinmux/state
I learned some extra commands by listening to the imfatant/test, too.
Here are the ideas I have found that work for my system:
- Use this image: Linux beaglebone 4.4.113-ti-rt-r149
- This image can be fixed up by doing these commands:
Either you can find this image by going to https://beagleboard.org/latest-images and downgrading your kernel by:
cd /opt/scripts/tools git pull sudo ./update_kernel.sh - sudo ./grow_partition.sh sudo reboot
You can listen to the image and kernel versioning on the imfatant/test page I listed earlier.
I think that person has an updated version of the image that you would put on your BBBlue via the application at etcher.io.
I also found something interesting that is needed on the imfatant/test page that I used:
cd /boot sudo nano uEnv.txt
Now...change your uEnv.txt file to fit this idea and take out the comment on this line if it is commented (take the hash mark out).
Put the hash mark where the 4-9 kernel was located...it will be located two lines down from where you took the hash mark out of that specific line.
Get this file, a device tree blob file (.dtb), from https://github.com/imfatant/test/blob/master/bin/am335x-boneblue.dtb.
Or, you can get it here: https://github.com/imfatant/test/tree/master/bin.
Place this file here by using WinSCP, which can be found here: https://winscp.net/eng/index.php.
Add the.dtb file to your Linux Distro via PuTTY and WinSCP by dragging and dropping the file in your /home/debian directory.
Now... we just need to use the command sed to place this.dtb file where our.txt file will know to store it for use. Right-o! Here we go...
sudo sed -i 's/#dtb=/dtb=am335x-boneblue.dtb/g' /boot/uEnv.txt
Add this command to make sure you have your clock frequency set:
sudo sed -i 's/GOVERNOR="ondemand"/GOVERNOR="performance"/g' /etc/init.d/cpufrequtils
sudo apt update sudo apt dist-upgrade sudo apt install cpufrequtils git
Just for reference, you will most likely need to make loop after loop until these commands are satisfied. Oh and it will be a good example to look through the commands and find your best example.
Use this command to get your WiFi up and running:
connmanctl services Copy your "wifi_xxxxxxxx_xxxxx_managed_psk" print out on your agent on connect wifi_xxxxxxxxx_xxxxx_managed_psk Type your WiFi passphrase
Use this link to get your board up and running:
Be clam and clam on?