Login to disable ads!

Building iOS example in Xcode

Parrot SDK, Linux SDK, Java, PC, Mac, scripts for Parrot drones... etc.
Post Reply
_DrifteR_
Ready for take off
Posts: 26
Joined: 28 Dec 2010, 09:24
Location: Brisbane, Australia
Has thanked: 0
Been thanked: 0

Building iOS example in Xcode

Post by _DrifteR_ » 03 Jan 2011, 14:31

I'm new to objective-c programming, but I am quickly becoming interested in it since I got my drone.

My problem is I can't get the Parrot example to build in Xcode. I've got Apple iOS SDK 3.2.5 and the latest Parrot SDK, but when I go to build the example Xcode project I get errors. (I'll report errors when back at my iMac).

What am I missing? Do I need to do more than hit "build and run"? Do I need to run some other code first? I tried searching multiple forums but couldn't find Anything. I've got some good ideas I want to solidify into code, but can't get past step 1.0.

Would appreciate any guidance anyone can offer.

EDIT: So far, changed:

1. "IPHONE_MODE = yes" and "USE_LiNUX = no" in custom.makefile
2. Changed XCode Project to Xcode 3.2-compatible
3. Tried to build ARDroneEngine in "SIM-debug" mode and now get the following error:
Downloads/ARDrone_SDK_1_5_Version_20101004 4/ControlEngine/iPhone/Classes/Menus/HUD.m:175: error: object cannot be set - either readonly property or no setter found

_DrifteR_
Ready for take off
Posts: 26
Joined: 28 Dec 2010, 09:24
Location: Brisbane, Australia
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by _DrifteR_ » 07 Jan 2011, 08:27

After days of experimenting, a steep learning curve and a lot of trial and error, I am giving up.

I have registered with the ARDrone SDKs, and posted several times there. It looks like building the iPhone example is not a straight "open and run" scenario, at least for me using the Free Apple iOS SDK (software simulator only, not capable of copying onto a device for testing). From playing around, it looks like the plethora of files, scripts and routines that build the app and associated engine library need to be customized for a successful build. Not having developed the scripts, it's really hard to unravel the switches required to make it build. Judging by the lack of responses on this thread, I'm guessing no one else has got this compiled either.

I wasn't really interested in a total re-progamming exercise, just revamping of the HUD for a more friendly FPV setup.

Anyway, looks like I might have a look at the Linux SDK...

tdekort
Ready for take off
Posts: 25
Joined: 17 Dec 2010, 09:58
Location: Veldhoven, Netherlands
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by tdekort » 07 Jan 2011, 22:37

Hi Drifter,

I'm about to get into the same thing, upgrading OS and memory on a second hand iMac to have a shot at programming my own app to control the drone.

My understanding from the apple web site is that you need SDK 4 to creat iphone/ipad/ipod touch apps, you mention some version of SDK 3. Could that have something to do with your troubles ?

Regards,
Toine

Symon
Site Admin
Posts: 443
Joined: 18 Aug 2010, 21:45
Drone Type: Jumping Sumo
Location: Southampton, UK
Has thanked: 0
Been thanked: 0

Building iOS example in Xcode

Post by Symon » 07 Jan 2011, 23:08

Simulation mode does not work at all. All the library's created by parrot operate only on the iPhone.
Dunno why but I have a dev account and if I do a simulation it breaks whereas if I send to iPhone it works. Very odd.

_DrifteR_
Ready for take off
Posts: 26
Joined: 28 Dec 2010, 09:24
Location: Brisbane, Australia
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by _DrifteR_ » 08 Jan 2011, 00:19

I have the Apple SDK 4.2, it's just the XCode component of the the SDK that's version 3.2.5. This is the latest version from Apple (I downloaded 1 week ago).

After searching the ARDrone developer forums, there were a few comments about not being able to compile in simulator mode, but the latest drone SDK is supposed to be able to be compiled and run in sim mode. Some people are telling me that it compiles in sim mode, but i think modifications to the custom scripts is required. I tried for hours to work this out but being a beginner and wading through a complete SDK was not straight forward. If I make headway, I'll post back here.

RogerJoys
Ready for take off
Posts: 15
Joined: 05 Jan 2011, 15:50
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by RogerJoys » 11 Jan 2011, 02:04

3. Tried to build ARDroneEngine in "SIM-debug" mode and now get the following error:
Downloads/ARDrone_SDK_1_5_Version_20101004 4/ControlEngine/iPhone/Classes/Menus/HUD.m:175: error: object cannot be set - either readonly property or no setter found

This is a code error. I am going to fix this and repost that module.

I've been struggling with this too. It mostly has to do with the various versions of SDK's that have been used.

Your tip on custom.makefile got me past what I hope to be one of the last humps.

I was one the ARDrone API forums and found some other good info on this. Mostly about using XCODE and needing to update BASE SDK's.

I currently get a clean build on the ARM version, and the missing setters on the SIM version will soon be corrected (I hope).

Unfortunately this is an interest and not my day job :)

RogerJoys
Ready for take off
Posts: 15
Joined: 05 Jan 2011, 15:50
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by RogerJoys » 11 Jan 2011, 08:00

Well my progress was to get a good build of the ARDroneEngine in all configurations.

With minor tweaks I was able to get things to build from the sample.

What I had to do was:
1. "IPHONE_MODE = yes" and "USE_LiNUX = no" in custom.makefile
2. Change the BASE SDK to iPhoneSimulator4.1 for the 2 sim configurations
3. Change the BASE SDK to Latest IOS for the 2 ARM configurations
4. Change the IOS Deployment Target to 3.0 from the list

NOTE: for 2-4 make sure you change both the Project Setings and Target Settings to match by double clicking on both and setting values

5. Change HUD.m for sim code to this:
#if TARGET_IPHONE_SIMULATOR == 1
- (void)simulate_accelerometer:(id)sender
{
UIAcceleration *acceleration = [[UIAcceleration alloc] init];
// acceleration.x = 0.0;
// acceleration.y = 0.0;
// acceleration.z = 0.0;

accelero[0] = 0.0;
accelero[1] = 0.0;
accelero[2] = 0.0;


#else
NOTE: I highly suspect this will cause problems! :)

All targets built.

I am still stuck with the FreeFLight app not linking properly. I get a build success, but the app throws this exception on launch:
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit
Referenced from: /Users/rogerjoys/Development/Workspace/ARDrone/ARDrone_SDK_1_5_Version_20101004/Examples/iPhone/FreeFlight/SIM-debug-iphonesimulator/FreeFlight.app/FreeFlight
Reason: image not found

More to follow.

-r

RogerJoys
Ready for take off
Posts: 15
Joined: 05 Jan 2011, 15:50
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by RogerJoys » 11 Jan 2011, 14:57

Of course if I had been more awake.. I may have realized that I was not running it in the sim :)

I can connect and see the video now. I have not tried to fire it up in my office. Time to move the project to my laptop and take it to an open place.

Problem Solved ?

_DrifteR_
Ready for take off
Posts: 26
Joined: 28 Dec 2010, 09:24
Location: Brisbane, Australia
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by _DrifteR_ » 19 Jan 2011, 08:02

Just a quick follow up on my progress. I finally was able to build the app in simulator mode thanks to Roger's instructions above (although I deleted the three instances of "=0.0" in the HUD.m file).

But having built the app in Sim mode is no use for anything (other than that fuzzy feeling inside). The app tries to connect to the drone and you can't simulate the drone-simulator connection, and you cant go much further than that, without removing/modifying code.

rtheron
Newcomer
Posts: 1
Joined: 10 Apr 2014, 23:06
Drone Type: AR.Drone 2
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by rtheron » 10 Apr 2014, 23:10

Any chance you guys could post a step by step in getting the AR Drone example app to compile?

DaveyPow
Newcomer
Posts: 3
Joined: 12 Jan 2015, 12:15
Drone Type: Airborne Night
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by DaveyPow » 13 Jan 2015, 13:50

Yeah I'd like to see that too. ;-)

User avatar
JanMeier
Newcomer
Posts: 1
Joined: 20 Jan 2015, 09:39
Drone Type: AR.Drone 2
Location: UK
Has thanked: 0
Been thanked: 0

Re: Building iOS example in Xcode

Post by JanMeier » 20 Jan 2015, 09:52

rtheron wrote:Any chance you guys could post a step by step in getting the AR AR.Drone example app to compile?
Agree and join rtheron, I'm very curious to see a compilation example, as well.
Make cool apps for an app development company

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest