/
tute_teleop.dox
77 lines (54 loc) · 3.02 KB
/
tute_teleop.dox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Orca-Robotics Project: Components for robotics
* http://orca-robotics.sf.net/
* Copyright (c) 2004-2009 Ben Upcroft, Alex Makarenko
*
* This copy of Orca is licensed to you under the terms described in
* the LICENSE file included in this distribution.
*
*/
/*!
@page orca_doc_tute_teleop 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).
@image html 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 @ref orca_doc_installdebian. This tutorial was tested with Player/Stage version 2.0.4.
@section orca_doc_tute_teleop_orca Starting Orca
Start IceGrid Registry and IceStorm server as described in the @ref orca_doc_quickstart.
Create a new system directory and copy Orca sample files.
@verbatim
$ mkdir -p ~/sys/tuteteleop; cd ~/sys/tuteteleop
$ cp [ORCA-INSTALL]/share/orca/cfg/robot2d.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/teleop.cfg .
@endverbatim
@section orca_doc_tute_teleop_player Starting Player/Stage
Copy Stage sample files.
@verbatim
$ cp -r [STAGE-SRC]/worlds .
@endverbatim
Start up the Stage simulator with the @e simple world.
@verbatim
$ player worlds/simple.cfg
@endverbatim
@section orca_doc_tute_teleop_robot Robot component
We're now going to set up the low level control to the actuators for the simulated robot using the @ref orca_component_robot2d component. The @c robot2d.cfg file is already configured the way we want it here, so simply run the component:
@verbatim
$ robot2d
@endverbatim
@section orca_doc_tute_teleop_keyboard Teleoperation using keyboard
To tell the robot to move we can use the @ref orca_component_teleop component which allows us to send commands to the @ref orca_component_robot2d component via keyboard (a joystick driver is also available, see component documentation).
@verbatim
$ teleop
@endverbatim
Keyboard command options are printed to the screen. Give the robot a motion command by typing in @b 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)
@section orca_doc_tute_teleop_next 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 @ref orca_doc_tutorials.
*/