You must login or register to participate.

Description

Explore basic concepts of robotics, learn about robotics hardware and embedded controllers, and program a (simulated) robot in Java!

GET STARTED

Learning Path Provided By


The "Introductory Robotics for Programmers" Learning Path is provided by our friends at Hill Air Force Base

 

Programming Robots with Java

Programming Robots with Java

Description

iRobot Create is a hobbyist robot based on iRobot's popular Roomba robotic vacuum cleaner (but without the vacuum!).

Sun SPOT is a small, wireless sensor node that can be built into larger projects (such as robots) that need sensing and reporting functions.

This activity uses the Sun SPOT Software Development Kit (SDK) with Robot Emulation to allow you to program a Sun SPOT to control the iRobot Create.  You will download and install the Sun SPOT SDK, update it with the Robot Emulation environment, and then explore the development environment, including the NetBeans Integrated Development Environment (IDE), to learn how to control the iRobot Create using the Java programming language.

Basic Steps

  1. Visit the Sun SPOT Robotics Emulator Tutorial page.  Follow the instructions on the page to download and install the basic Sun SPOT Software Development Kit (SDK), and then update it to the latest developer preview SDK, which includes the robot emulator.  Be sure to install the correct software for your computer platform (Windows, Mac, or Linux).  Once you have the software istalled, follow the instructions to click on the NEXT: Robot View link at the bottom of the page to begin the robotics tutorial.
  2. This page of the tutorial is titled The Robot View in Solarium.  Follow the instructions on the page, which will introduce you to Solarium, the Sun SPOT and robot emulator view.  In Solarium, you will have a view of your emulated Sun SPOT device, and also a view of the emulated iRobot Create, which is controlled by the Sun SPOT (you can see the Sun SPOT on the iRobot Create in the emulator view; the Sun SPOT is small compared to the size of the robot).  The basic operation is to create a Java program, load it into the Sun SPOT, and then run it, where the program running on the SPOT will control the robot.  When done with this page, click on the link at the bottom, NEXT: Run the Demo.
  3. This page, titled Load and Run the Demo Program, will show you how to build and deploy a MIDlet to the Sun SPOT.  A MIDlet is a Java program created for mobile devices, like cell phones or embedded controllers. In this case, the Sun SPOT is considered an embedded controller; it is embedded in a larger device (the iRobot Create) and its job is to control the operation of the larger device.  Follow the instructions to load the demo onto the Sun SPOT, and then run the demo, to see the emulated robot in action.  When finished, click NEXT: Your Own Robot Program at the bottom of the page.
  4. On this page (Your Own Robot Program), you will modify the demo code to make the robot behave differently, and then learn how to create a new project where you can create your own code for the robot.  You will be exposed to the NetBeans IDE, which can be used to create projects and code for controlling the robot.  Note the mention of the javadoc for the robot emulator SDK.  This is very important, as the javadoc shows all of the functions that you can use to control the robot. If you are new to Java, you should know that javadoc is the standard way to document Java classes and functions.
  5. When finished with step (4), you have completed the tutorial.  At this point, you can experiment a bit with the development environment: explore the javadoc, make some changes in your code, and see what the robot can do.  When you are finished, submit your code to this activity.  Optionally, if you know how to capture a video from your computer screen, upload a video of your program running on the simulated robot in Solarium, and upload that, too!

Suggested Activity Tools

Resource Links

Recent Submissions

There are currently no submissions, check back soon!

Activity Forum

There are currently no forum topics posted.