Channels ▼

Mike Riley

Dr. Dobb's Bloggers

The Parrot Asteroid Development Experience

May 31, 2012

I have been interested in car computing since it was more popularly called telematics. The first in-car app I wrote was back in the late '90s using a laptop and a first-generation Sierra Wireless Edge network modem. It was a Java-based application that grabbed weather and news from the Internet and ran these through a Text-To-Speech engine so that my eyes didn't leave the road while driving. Other than the bulky size and power hunger of the laptop combined with the limited cellular network bandwidth, it did a pretty good job overall.

Nearly a dozen years later, that original vision I had for an in-dash telematics device has been fully realized. Parrot, the company behind the imagination-capturing AR.Drone, has released the first Android-based in-dash car computer. The Parrot Asteroid is an in-car multimedia infotainment system that provides a foundation for an in-car real-time computing experience. The Asteroid ships with a standard bundle of five apps for the US market: Maps (GPS+Data = Google Maps), TuneIn (Streaming Internet Radio), Wikango HD (a subscription-based speed trap detection app), Roadtrip (a points-of-interest app that compliments the Maps app), and Weather (local forecasts).

Figure 1: The Android-Based Parrot Asteroid

Asteroid uses Bluetooth to pair with your phone for hands-free calling, and the dual-microphone accessory helps to improve the noise cancellation for crystal clear hands-free phone conversations. Also included in the package is a GPS puck for placement near your windshield to improve GPS signal reception.

Figure 2: The front of the Asteroid.

Asteroid can also play back the expected variety of Android-supported audio formats (MP3, OGG, WMA, etc.). Music sources include standard iOS (iPhone, iPod, etc.) devices, USB-based players, SD cards, A2DP-compliant Bluetooth stereo, and even traditional line-in sources. Asteroid allows you to navigate to a particular album, song, or artist by voice selection. It has a 4x55W built-in MOSFET amplifier 6xRCA preamp-output and a subwoofer output that packs a punch. Music can also be equalized using on-screen music playback and sound shaping controls.

Figure 3: The back of the Asteroid.

Installation

While the more electrically and auto-mechanically inclined should have no trouble installing the Asteroid on their own, Parrot recommends having a trained, authorized service center perform the installation. Fortunately, its installer network is fairly extensive in the US. I only had to travel a few miles from my home to have a local authorized dealer install the Asteroid into my vehicle. Many thanks goes out to Marty Deane, his assistant Chris Eyers, and the team of professionals at Soundz Plus in Warrenville, IL, a Parrot Certified Installer. Without their assistance and friendly recommendations, the installation process would have taken much longer on my own. It was their expert knowledge that helped resolve a particularly odd issue with my automatic antenna that most others (including me) would have been defeated by. Yet another reason why going to a certified Parrot installer is the best way to ensure a fully functional and operationally satisfying experience.

Figure 4: Installing the Asteroid will likely be faster and more effective with help from a Parrot Certified Installer.

Since the Asteroid does not have a built-in 3G radio, you have to supply your own via a USB modem. Fortunately, with the Asteroid's version 1.5 software update, you can also tether your mobile phone as an alternative, which is what I did. The new version also supports Bluetooth network sharing, and that worked equally well for me. In fact, it became my preferred means of bridging the Asteroid to the Internet via my mobile phone's Bluetooth Internet sharing capability. Since I was already connecting my phone to the Asteroid via Bluetooth for audio, contact list, and phone call operation, the Internet sharing option was a welcome feature. That said, it's too bad that the Asteroid does not include built-in WiFi to allow you to connect to WiFi hotspot modems or sync up with your home network when you pull into your driveway. The WiFi feature is currently only available in Parrot's FC6100 OEM module exclusively for car and equipment manufacturers. Perhaps a future version of the Asteroid will have this useful capability.

Normal Operation

Using the Asteroid is a straightforward process. Scroll to the on-board app you want to execute using the single large dial. Press the dial to launch the app. Pressing the Home icon located toward the upper right of the dial returns you to the main menu. When playing music, you can press the play/pause icon toward the lower left corner of the dial to pause playback. To the lower right of the dial are the skip back/forward buttons. The 3.5" display beautifully renders 24-bit color, but it's not a touch screen (even though it begs to be touched, and the fingerprints all over the display made by friends and family continue to prove this point). As such, the interface takes a few minutes getting used but quickly becomes intuitive once you've explored Asteroid's applications and settings.

Development Experience

Now that I have this Android OS-driven stereo installed in my car, it's time to see what else it can do besides pair with my phone, play music, and show maps. I have had an app idea in my head ever since my early telematics experiments, but it wasn't until the Asteroid came on the scene that I have been able to give the app a proper context. Here's the idea, spawned from watching lots of James Bond and other futuristic car sci-fi movies. I call the app Virtual Road Rage. The basic premise being to pepper my driving experience with sounds of highly penetrating explosives when offending vehicles drive to slow, cut me off, or otherwise raise my ire. Instead of venting silently at the other driver's callousness or incompetence, I want to unleash a torrent of voice-activated sonic destruction, giving me the simulated satisfaction of giving into my primal instincts. By triggering the action via a voice-activated directive of "Fire", Virtual Road Rage will come to life with a targeting-style graphic on the Asteroid display. Then it will randomly play back one of several audio files ranging from hellfire missile or rocket launches, machine guns, and the like followed by a variety of bass speaker popping explosions.

Building the app was straightforward courtesy of the Asteroid SDK, available here for download. The SDK isn't as polished as other Android-centric SDKs I've worked with, but since Asteroid is based on Android 1.5, developing an app for the platform is simple once you get the hang of the recommended approaches to displaying lists, radio buttons, pop-ups, and selection menus. Examples of these are available in the Asteroid developer forum, along with a more recent example of using Asteroid's Text-To-Speech engine.

Since Virtual Road Rage is a very basic program (essentially, a soundboard-style app), packaging up the audio and video files as resources was the easy part, as was calling the Android media player intent for AV playback. One compromise I had to make from my original design specification was changing the voice activated "Fire" command to an on-screen "Launch" button instead. This was because the Asteroid firmware version 1.5 that I used did not expose Parrot's multimedia voice recognition. Hopefully future releases of the firmware and SDK will open this important hands-free functionality as an Android Intent that can be easily called from apps like mine.

Another change I had to make to my design was how to manage the sound effects. Android has a library called android.media.SoundPool that was intentionally designed to manage an array of sound effects, primarily for use in games. Since this has been around since the Android 1.5 SDK release, I assumed it would also be in Asteroid. Unfortunately, it isn't. Another staple Android multimedia library not supported in Asteroid is video. So much for calling on Android's VideoView class to watch videos watch while driving. Hey, maybe that's why Parrot opted to yank the functionality from Asteroid after all!

As a result of these constraints, my app had to be altered to rely on Android's audio MediaPlayer class instead of the SoundPool and using the Parrot push-button dial to trigger the playback event. I also had to scrap the idea of playing back a video simulating a virtual explosion and instead converted the entire screen to an image button that toggled between android:drawable "normal" and "pressed" states. The Launch button is displayed in the normal view, which is replaced by a static image of an explosion when the button is pressed.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video