Here is a progressive guide to using my Nvidia Jetson TK1 as a companion computer with an Ardupilot/APM/Pixhawk flight board.
Things will be added as I get through my list of experiences, hopefully by the end I will have a nice .img file of everything I tried/did, so others may just make a copy and install.
All in time.
*Please note, I migrated my experiences here to continue to ensure I can be a part of an open source project, sharing ideas for others to use freely*
Got the TK1 today, super simple to setup:
First time setup =
1)Plug in power
2)command: cd NVIDIA-INSTALLER
3)command: sudo ./installer.sh //(installs the desktop environment)
4)command: sudo reboot
Ubuntu is pre-installed to the TK1's onboard 16GB fast eMMC (i think)
Things I want to setup this week:
1)3d print a case
2)look at the mini pcie options: wifi + bt 4.0
4)hardware button shutdown?
5)look into an ssh app + remote keyboard/mouse app to control using my android tablet. (I would like to do away with keyboard & mouse)
1) look at available vision systems. I had a few rejection emails for dev kits, and too costly ($$$$) for me to buy as a diy tech developer, so in true DIY style it might be some kinda hack of a laser range finder, or a kinect-mod with a brighter ir-led installed. see how that goes.
2) the sata power port looks like a neat option for +5v & +12v outlet for devices. time will tell.
3)look into gpio for servo control/sweep
Thanks, look forward to DiyDrone input.
Things I've learned over coffee:
1) Soft power button brings up Ubuntu shutdown options menu.
2) There's an Android app which enables ssh control, and also acts as a mouse & keyboard for Ubuntu. There is a guide to making it work here, however i'm currently having issues after executing 'sudo apt-get install xdotool'. console says 'unable to locate xdotool', so I have to fix that.
That's all today.
There is a way to modify the power button to shutdown on press.
So I decided to get myself a mini pcie wifi & bt 4.0 module (Atheros AR5B225 WLAN Bluetooth 4.0 Mini PCIE WiFi Card > eBay > $2)
I also required a pair of antenna (which strangely cost more than the pcie card):
Unfortunately (or fortunately if you are a developer wanting to start from scratch) the TK1 does not have a vast array of driver handling as it arrives in the box.
So I had to install the Grinch kernel:
My board: Jetson TK1 R19 Rev 2.0 (important to check using: "sudo head -n 1 /etc/nv_tegra_release")
Therefore for my R19 version: Grinch Kernel version: 19.3.6
-install guide worked first time: (https://gist.github.com/jetsonhacks/928d84f159e1c7c2eacb)
-few tweaks used here: (https://gist.github.com/jetsonhacks/9259acbd31b2dfc6dfe6)
-bit more information: http://jetsonhacks.com/2014/10/12/installing-grinch-linuxfortegra-l...
Amazingly, everything compiled and installed smoothly and without issue first time. Coming from an Arduino background, it is pretty similar to using a host computer with Arduino IDE > connecting the Arduino to the computer > compiling > uploading.
In the case of the TK1, it requires a host computer running linux (to use terminal commands), I used the latest Ubuntu on a (ghetto) laptop. Compiling, then installing to the TK1 is all done using USB cable & Terminal window.
It took about an hour and a half to compile and upload the Grinch code.
The Grinch works well. I have my Mini Pcie WIFI + Bt 4.0 adapter working straight away.
As a test, I connected & played some youtube using audio over bluetooth A2DP to a small speaker.
Anyway, I just wanted a pcie wifi device to allow me to setup and use ssh with my android device. it cost me very little, and works without issues. It was a gamble on which devices are compatible with the TK1.
I'll be testing the ssh + android app soon.
Hope this helps others.
For the record, I got an Android ssh + mouse + keyboard app working with the TK1.
The android app is called 'Home Remote Control'.
- It has a nag screen to upgrade to a pro version which I.....blah.
- It seems that when TK1 is started, without a keyboard or mouse initially connected, I'm not getting the mouse cursor on screen showing up, even though I can move around, forcing me to guess, or replug/unplug the mouse which brings up the cursor and fixes the issue. Bit of a pain. Maybe fixable somehow? SSH works well.
Maybe try a different remote app in future....There's lots of them.
To use a remote app on the TK1 you have to install SSHserver & XDOtool:
sudo apt-get install openssh-server
sudo apt-get install openssh-client
sudo service ssh restart
sudo apt-get install xdotool
That is all.
Later on, I'll be upgrading again to L4T 21.3 (Grinch), but for now some discovery and exploring.
- I have a good idea to create a 3d-printed case/drone mount for the TK1 which i'll get around to making this next week or so. I hope to integrate a decent LED-Ring switch to allow me to boot/shutdown with a little bit of $swag$.
I would really like it if there are some device developers out there who would offer me test devices, right now, i'm looking at Kinect & Webcam + OpenCV, but would be pleased to get involved with Zed/Lidarlite. Any offers just get in touch. Thanks
I have belief that the tk1/tx1 module is going to create a next generation of drones that are complete packages > I can see why DJI added it to their system. The TK1, i'm certain, is capable of flight control + 4gmetry + vision system + on-the-fly image processing + more. All in one package. - a downward facing webcam to manage optical flow & precision landing, a depth camera such as zed/or a DIY 360 lidar controlling obstacle avoidance & point cloud mapping.
I think 3DR would be wise to create a standalone IMU unit for the TK1, an install script for Ardupilot + 4gmetry, and the vision systems will arrive and develop separately.
Today I also contacted Ericsson & Huawei to help me find a Half-mini pcie 4g lte board so I can make better use of 4gmetry with APM. Fingers crossed I get some good support form these guys.
Unfortunately I have no reply yet. I have looked around the internet and only seem to find full-mini 4g lte boards, it would make the TK1 look a bit clumsy, i'd have to 3D-print a holder to keep it flat.
The good news is, that my 3.5G HSDPA+ dongle works with Grinch Kernel without having to install anything (wvdial, ppp, qt) to Ubuntu. It already has a neat setup wizard. Here's a picture:
(Green for Go)
Now, I need to read up on enabling UDP over 3G/3.5G/4G, sending webcam video to the New Droidplanner app, installing and configuring mavproxy.
I'd also be interested in learning about 4Gmetry from @Silvio.
I'm sure it's a neat collection of scripts, i'm wondering if it is:
- using wvdial, ppp qt, to make the 3G connection for boards not running ubuntu such as Odroid & Rpi2?
- is it therefore limited to certain usb modems & supported/tested drivers?
- is it also including mavproxy?
- is it also including gstreamer?
It's all really interesting anyhow. It's a totally new level of drone use. Too complicated for general users, but eventually should be good as a package.
Looks like whole 'TK1 on a Drone' thing is taking off.
Even at low-entry & poorly funded institutions such as MIT
I wish I had a doctoral and funding...
Power Switch (Auto Shutdown) Mod:
Kinect room scanning:
Hi - i am really interested in how far you got with the TK1 as a Flight Controller - i have one and a kinect sitting idle - (it was driving my ground rover) and now i would like to put it in a UAV if possible - did you ever get a useful working img setup that you would share - cheers - look forward to your reply..