Home > iPhone > iPhone Player/Stage Remote Control

iPhone Player/Stage Remote Control

August 20th, 2009 Leave a comment Go to comments

Here’s the iPhone Player/Stage Remote Control project! There’s a .pdf that describes how to setup Xcode in the .zip file.

Controlling a Robot over Wi-Fi

A Virtual Robot in a Virtual World

The goal of this project was to use the Player/Stage robotics code on the iPhone to communicate and control robots. I discuss how to setup the Xcode development environment. There are two example Xcode projects. The first one is an Objective-C project that wraps around the C++ Player/Stage code. The second project is a very primitive C++ program running on the iPhone without any UI. Both of these Xcode projects are fully documented and will serve as a starting point to iPhone Player/Stage development.

iPhone Player/Stage Remote Control Project: iPhonePlayerStage

Feel free to ask questions and let me know how you use the code.

  1. August 20th, 2009 at 11:45 | #1

    This is an awesome and innovative project. I’m looking over the PDF now, but do you need an iPhone developer license to use it?

  2. August 20th, 2009 at 12:33 | #2

    You’ll need the developer license to run the Xcode project on your iPhone/iPod Touch. However, you can install the iPhone 3.0 SDK for free and work with the iPhone Simulator.

    If you set the IP address correctly on the Simulator you’ll be able to remote control a robot from your Mac. You don’t need the developer license right away. And it’s faster to develop with the Simulator. I only periodically test against the actual device.

    RIT’s registered with the iPhone Developer University Program, which is a resource for current students. (http://developer.apple.com/iphone/program/university.html)

  3. Cabrita
    October 15th, 2009 at 09:25 | #3

    Very interesting stuff! I’m just starting with Player/Stage and I’m a long time Mac user. Have you ever tried using Player 3? Also, would you think it would be possible to create e Player Framework for the Mac to build Cocoa based Player applications for the Mac/iPhone?

  4. October 15th, 2009 at 12:24 | #4

    The player 2.03 project that I include has both an iPhone version and a Mac version of player/stage.

    You can do a project reference in a new Xcode Cocoa application and “import” the code. Then you can create iPhone/Mac applications.

    I haven’t used Player 3, since it was released after I worked on the project. I may look into it if I have more time, but the robots here at RIT are still using version 2.03 and 2.1

  5. alfak
    November 23rd, 2009 at 04:44 | #5

    Hi Paul!

    I tried your project on my ipod touch and it works well.
    I’m trying to port the playerjoy with a simple interface.
    Have you got any idea?

  6. November 25th, 2009 at 23:39 | #6

    @alfak Can you explain what the issue is with porting it?

    I’m not entirely familiar with playerjoy, is that some kind of additional interface for a robot sensor/accessory?

    If so, you’ll need to use either the 2.03 or the 2.1 source and then pull out the appropriate headers and fix them so that they reference each other. Those files should be added to the existing 2.03 or 2.1 Xcode projects that I have in the zip. It’s not the cleanest approach, but it was the only way we got things working for this project.

  7. alfak
    December 9th, 2009 at 05:27 | #7

    @Paul

    playerjoy: “playerjoy allows you to manually drive your (physical or simulated) robot around.”
    http://player.sourcearchive.com/documentation/2.0.4-3.2ubuntu2/playerjoy_8cc-source.html

    I’m not familiar with Objetive-C and the SDK (i only compile some examples).

  8. December 9th, 2009 at 23:21 | #8

    @alfak ok, so the sample that I have posted lets you randomly drive a physical or simulated robot around. I use the Position2D class to control the movement. If you look at the Xcode project there are places to change the drive functionality.

    You’re going to have to read up on Objective-C and the SDK if you want to understand iphone development. http://developer.apple.com/iphone/

  1. October 14th, 2009 at 22:05 | #1
  2. February 27th, 2010 at 11:37 | #2