orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

Driving a robot simulated with Player/Stage

Note:
Reviewed for release 2.10.0.
In this tutorial we will teleoperate a robot simulated using 2-D Player/Stage simulator. The system diagram is shown below (IceGrid Registry and IceStorm are not shown).

doc_tute_teleop.png

In this tutorial we will use components which have external dependencies.

  • Player/Stage to simulate the robotic platform. Debian installation instructions for Player can be found in Installing Orca on Debian Linux. This tutorial was tested with Player/Stage version 2.0.4.

Starting Orca

Start IceGrid Registry and IceStorm server as described in the Quick-Start Guide.

Create a new system directory and copy Orca sample files.

$ mkdir -p ~/sys/tuteteleop; cd ~/sys/tuteteleop
$ cp [ORCA-INSTALL]/share/orca/cfg/robot2d.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/teleop.cfg .

Starting Player/Stage

Copy Stage sample files.
$ cp -r [STAGE-SRC]/worlds .

Start up the Stage simulator with the simple world.

$ player worlds/simple.cfg

Robot component

We're now going to set up the low level control to the actuators for the simulated robot using the Robot2d component. The robot2d.cfg file is already configured the way we want it here, so simply run the component:

$ robot2d

Teleoperation using keyboard

To tell the robot to move we can use the Teleop component which allows us to send commands to the Robot2d component via keyboard (a joystick driver is also available, see component documentation).
$ teleop

Keyboard command options are printed to the screen. Give the robot a motion command by typing in this terminal and watch it move in the Stage GUI.

You'll see a simple feedback in this terminal:

  • a text print-out of every new command (e.i. when you press a key on the keyboard).
  • a '.' when the previous command is re-sent (after an interval specified in the config file)
  • an 'x' when sending a command has failed some reason (the robot2d component is down or the network call has timed out)

What else?

Take a look at the configuration files to understand how this system was setup.
  • Find the properties which determine the drivers ('playerclient' for Robot2d, and {'keyboard','term-iostream'} for Teleop).
  • Find the properties which configured the provided and required interfaces. Matching them insured that the two components connected to each other.

Check out more Orca Tutorials.

 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5