Difference between revisions of "Roomba/Eclipse"

From GICL Wiki
Jump to: navigation, search
(GICL Bot: Updated link(s))
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Notes on how to set up to use Eclipse IDE to develop for iRobot Roomba. You can follow the steps below or just download, extract, and import this Eclipse project: [[CS511.zip]]
+
Notes on how to set up to use Eclipse IDE to develop for iRobot Roomba. You can follow the steps below or just download, extract, and import this:
 +
*  <!--GICL Bot edit:-->[[CS511.zip Contents|Eclipse Project]]
 +
* [[Media:RoombaProject.zip | another Eclipse Project with some stub classes for subsumption architecture]]
  
 
==Background==
 
==Background==
Line 10: Line 12:
  
 
==Configuration==
 
==Configuration==
There's probably more detail required here...
+
 
 +
[[Connecting_Roomba_to_Your_Computer|Connect Roomba to your Computer]]
  
 
===Install Processing===
 
===Install Processing===
 
* Install [[Processing]].
 
* Install [[Processing]].
 
** This may require configuring the speed of the serial data communications link via an application like Zterm. [http://todbot.com/blog/2006/02/23/howto-mac-os-x-bluetooth-serial-port for configuring Bluetooth]
 
** This may require configuring the speed of the serial data communications link via an application like Zterm. [http://todbot.com/blog/2006/02/23/howto-mac-os-x-bluetooth-serial-port for configuring Bluetooth]
 +
* If you are running on Mac OS 10.4, you will need to run the macosx_setup.command script as root in the Processing 0123 directory.  '''NOTE:''' I could not get the macosx_setup.command script in the roombacomm-java_1.zip package to run.
 +
* If you are running Mac OS 10.5, then you may also need to change some permissions on system folders.
 +
Mac OS X 10.5 (from processing) error message:
 +
check_group_uucp(): error testing lock file creation Error details:Permission denied
 +
check_lock_status: No permission to create lock file.
 +
 +
[http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Electronics;action=display;num=1193459849 Steps on how to fix this.]
  
 
===Create Eclipse Project===
 
===Create Eclipse Project===
Line 25: Line 35:
  
 
===Configure Execution within Eclipse===
 
===Configure Execution within Eclipse===
Any main class that will run Roomba code must add a VM argument to use the [http://rxtx.org RXTX] JNI libraries correctly.
+
Any main class that will run Roomba code must add a VM argument to use the [http://rxtx.org RXTX] JNI libraries correctly.  
 +
 
 +
===The process of running is easy as 1,2,3,...,4, and 5!===
 +
# Eclipse Menu->Run->Open Run Dialog...
 +
# create 'New' launch configuration [[Image:EclipseProject-01-createApplication.png|thumb|left|100px|create 'New' launch configuration]] <br style="clear:both;"/>
 +
# Select a Java class that contains your main() method [[Image:EclipseProject-02-chooseMainMethod.png|thumb|left|100px|choose a main() method]]<br style="clear:both;"/>
 +
# Add command line arguments and '''add the RxTx lib to your -Djava.library.path''' [[Image:EclipseProject-03-addRxTxLib.png|thumb|left|100px|add rxtx libraries to your Java library path]]<br style="clear:both;"/>
 +
# Save and Run!
  
 
==Notes==
 
==Notes==

Latest revision as of 19:09, 17 March 2009

Notes on how to set up to use Eclipse IDE to develop for iRobot Roomba. You can follow the steps below or just download, extract, and import this:

Contents

Background

Below is a shortcut method to set up Eclipse IDE Instead of using the pseudo-Java development tools provided by Processing The basic idea is to:

  • Get Processing to work with Roomba. (i.e. follow procedures from Processing
  • Copy the roombacomm libraries into a new Eclipse workspace
  • Configure the classpaths
  • Configure run paths through Eclipse

Configuration

Connect Roomba to your Computer

Install Processing

  • Install Processing.
    • This may require configuring the speed of the serial data communications link via an application like Zterm. for configuring Bluetooth
  • If you are running on Mac OS 10.4, you will need to run the macosx_setup.command script as root in the Processing 0123 directory. NOTE: I could not get the macosx_setup.command script in the roombacomm-java_1.zip package to run.
  • If you are running Mac OS 10.5, then you may also need to change some permissions on system folders.

Mac OS X 10.5 (from processing) error message:

check_group_uucp(): error testing lock file creation Error details:Permission denied
check_lock_status: No permission to create lock file.

Steps on how to fix this.

Create Eclipse Project

  1. Create a new Eclipse project using the "New Project Wizard"
  2. Copy /Applications/Processing 0123/libraries/roombacomm/library/* into the newly created Eclipse Project
  3. Add RXTXcomm.jar to buildpath
  4. Add roombacomm classes to buildpath
    • roombacomm.jar to buildpath. OR
    • rename "roombacomm.jar Folder" to "classes" and add as a src folder

Configure Execution within Eclipse

Any main class that will run Roomba code must add a VM argument to use the RXTX JNI libraries correctly.

The process of running is easy as 1,2,3,...,4, and 5!

  1. Eclipse Menu->Run->Open Run Dialog...
  2. create 'New' launch configuration
    create 'New' launch configuration

  3. Select a Java class that contains your main() method
    choose a main() method

  4. Add command line arguments and add the RxTx lib to your -Djava.library.path
    add rxtx libraries to your Java library path

  5. Save and Run!

Notes

Tested with a Macbook C2D, Bluetooth, Mac OS 10.4, Sun Java 1.5. If you have gotten your computer to connect to a Roomba and used the Processing dev environment, then there is no reason why you would not be able to get Eclipse IDE to work too.

References

  • Eclipse.org
  • Todd E Kurt. connecting via bluetooth. roombacomm/processing
  • Processing
  • Rxtx
  • JNI