LabVIEW Robotics Documents

Showing results for 
Search instead for 
Did you mean: 

Controlling a Starter Kit robot with an iPhone

by Active Participant CMal on ‎02-04-2012 01:25 PM

This example demonstrates how to use the NI OSC library and the TouchOSC iPhone app to control a Starter Kit robot.  Messages are sent to the robot using the Open Sound Control (OSC) format.

Required Software:
Required Hardware:
Instructions:
  1. Use the TouchOSC editor to upload the "NI_Robotics_Demo_iphone.touchosc" or "NI_Robotics_Demo_ipad.touchosc" to your iOS device.  Both devices must be on the same wireless network for this to work.
  2. Download the attached zip file.
  3. Unzip the file to the installed LabVIEW directory.  For example, the installed LabVIEW directory is typically C:\Program Files\National Instruments\LabVIEW 2011 on a 32-bit OS.
  4. Open the example project at <LabVIEW>\examples\robotics\Starter Kit OSC Control\Starter Kit OSC Control.lvproj, where <LabVIEW> is the installed LabVIEW directory.
  5. This project contains execution targets for both simulated and real robots.  Use the VIs under the "My Computer" target to control a simulated robot.  Use the VI under the "Starter Kit 2.0 Robot" or "Starter Kit 1.0 Robot" target to control a real robot.
  6. Run the VI, then open the TouchOSC app.  Follow the instructions on the front panel of the VI.
Comments
Member superjing
Member

I need to change the outgoing port to 9000 in TouchOSC before the demo can work.

Member sergio.bg
Member

Hi, do you know about something like this but for RSK 1.0?, because I want to perate my RSK from the iphone but it's a 1.0.

Active Participant CMal
Active Participant

The example should work with the Starter Kit 1.0 if you swap out a few of the initialize VIs:

Replace "Initialize Starter Kit 2.0 (sbRIO-9632).vi" with "Initialize Starter Kit 1.0 (sbRIO-9631).vi"

Replace "Create Starter Kit 2.0 Steering Frame.vi" with "Create Starter Kit 1.0 Steering Frame.vi"

Both of the VIs you'll need are in the paletttes under Robotics >> Starter Kit >> 1.0.

Member N3utrin0
Member

Does this work? I try to open the project, but is missing some subVIs: Parse Message, Dispatch all messages, etc. Does anybody else experience the same problems?

Active Participant CMal
Active Participant

Alex,

The VIs you are missing are part of the NI OSC Library.  This is one of the items listed under the Required Software section.  You will need all of the requred items to run this example.

Member N3utrin0
Member

Hi, thanks for the reply! I have downloaded everything but in the software there there is not any VIs from the ones I am missing when starting the project.

Member N3utrin0
Member

Hi, I got it now! thanks!!!

Member neallou
Member

Looks awesome !! But I have a question, how to change it to RSK 1.0? Can you talk about more detail?

Active Participant CMal
Active Participant

neallou wrote:


                       

Looks awesome !! But I have a question, how to change it to RSK 1.0? Can you talk about more detail?


                   

Please see my reply from Feb 19 on how to replae the initialize VIs to support the Starter Kit 1.0.

Member neallou
Member

Hi, When I start the project, some Vi couldn't be found, such NiFpgaLv.dll and niLvFpga_open_sbRIO-9632.vi.  And

Replace "Initialize Starter Kit 2.0 (sbRIO-9632).vi" with "Initialize Starter Kit 1.0 (sbRIO-9631).vi"

Replace "Create Starter Kit 2.0 Steering Frame.vi" with "Create Starter Kit 1.0 Steering Frame.vi"

Where are the folder? How to change it?

Member neallou
Member

Hi, do I need to install all things in the Vi package manager?

Member neallou
Member

Hi, When I replace the Vi, need password?

Active Participant CMal
Active Participant

The latest version of the example includes VIs for both the 1.0 and 2.0 versions of the Starter Kit robot.  Regarding some of the questions that have been asked here:

  • This example does not need to be installed with VI Package Manager (VIPM).  However, it requires the NI OSC Library, which is installed from the LabVIEW Tools Network through VIPM.
  • If you need to replace one VI with another that is on the palettes, just right-click > "Replace > All Palettes".  Then browse to the location in the palettes where the new VI is located.  The Starter Kit VIs are located in the palettes under "Robotics > Starter Kit > 1.0 [or 2.0]".
Member neallou
Member

Thanks a lot! It works. And in the Block Diagram, which part is about accelerometer controlling? Can I use a Serial Accelerometer Dongle which is a 3 axis accelerometer to control?

Active Participant CMal
Active Participant

neallou wrote:


                       

Thanks a lot! It works. And in the Block Diagram, which part is about accelerometer controlling? Can I use a Serial Accelerometer Dongle which is a 3 axis accelerometer to control?


                   

The acceleration messages are being handled in the "AccXYZ" implementation of "Handle Message.vi".  It is simply reading the x and y acceleration components, then applying them to the velocity setpoint.  You could certainly use a serial accelerometer for control, but you might need to rearchitect the code, since this example is only meant to demonstrate how to receive commands using the OSC data format.  If you have questions about using the serial accelerometer, I would recommend posting to the LabVIEW disucssion forums.

Member aild
Member

Does anyone know why Labview can't find the "Parse Message.vi"

Active Participant CMal
Active Participant

aild wrote:


                       

Does anyone know why Labview can't find the "Parse Message.vi"


                   

"Parse Message.vi" is part of the OSC library, so the example will not work without it.  Make sure that VI exists in the "<Program Files>\National Instruments\LabVIEW 20xx\vi.lib\NIOSC\" folder.  If there aren't any VIs in that folder, then make sure you installed the OSC package to the correct version of LabVIEW through VI Package Manager.  Also make sure you have the Real Time and Robotics modules installed.