README.md 4.24 KB
Newer Older
Séverin Lemaignan's avatar
Séverin Lemaignan committed
1
2
3
ROBOPILOT -- MORSE simulation prototype
=======================================

Séverin Lemaignan's avatar
Séverin Lemaignan committed
4
![Screenshot of the simulation](robopilotsim/media/screenshot1.jpg)
Séverin Lemaignan's avatar
Séverin Lemaignan committed
5
6
7
8

This repository contains an early prototype of a [MORSE-based simulation](http://morse-simulator.github.io/) for the
ROBOPILOT project.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Inputs/outputs
--------------

This version of the simulation provides the following inputs/outputs for the
autonomous van decision logic. These are determined by the MORSE
sensors/actuators attached to the van, as [defined here](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/builder/robots/van.py).

**This list is expected to evolve depending on the Arrival's input/ouput
requirements to their decision making module.**


- **inputs to the van's decision making software**
  - absolute `x`,`y`,`z`,`yaw`,`pitch`,`roll` of the van in the world reference
    frame (provided by a MORSE's [Pose sensor](http://www.openrobots.org/morse/doc/1.4/user/sensors/pose.html))
  - the list of visible objects with their 6D pose, relative to the vehicle
    (provided by a MORSE's [Semantic camera](http://www.openrobots.org/morse/doc/latest/user/sensors/semantic_camera.html))

- **expected outputs from the van's decision making software**
  - linear and angular velocities of the van (`v`, `ω`)

29
30
31
32
**An example of a simple decision making module that can controls the van is
available here:**
[`scripts/van_decision_making.py`](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/scripts/van_decision_making.py)

Séverin Lemaignan's avatar
Séverin Lemaignan committed
33
34
35
36
Structure
---------

The ROBOPILOT van is defined in
Séverin Lemaignan's avatar
Séverin Lemaignan committed
37
38
39
40
41
42
[`van.blend`](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/data/robopilotsim/robots/van.blend)
(for the physical appearance + physics properties), in
[`builder/robots/van.py`](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/builder/robots/van.py)
(for the configuration of sensors and actuators), and in
[`robots/van.py`](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/robots/van.py)
(for the in-simulation behaviour -- mostly empty for now).
Séverin Lemaignan's avatar
Séverin Lemaignan committed
43
44
45
46
47

Depending on the MORSE's sensors (like the [semantic camera
sensor](http://www.openrobots.org/morse/doc/latest/user/sensors/semantic_camera.html)
used
[here](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/builder/robots/van.py#L34))
Séverin Lemaignan's avatar
Séverin Lemaignan committed
48
and actuators (like the [`MotionVW` actuator](http://www.openrobots.org/morse/doc/1.4/user/actuators/v_omega.html) used
Séverin Lemaignan's avatar
Séverin Lemaignan committed
49
50
51
52
53
[here](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/builder/robots/van.py#L21)
used on the van, MORSE makes it possible to control the van at different levels
of abstraction.

Other vehicles in the simulation (bikes, cars) are modelled as independent
Séverin Lemaignan's avatar
Séverin Lemaignan committed
54
robots (cf the [`Vehicle` type](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/src/robopilotsim/builder/robots/vehicle.py)). They can be controlled externally (cf below).
Séverin Lemaignan's avatar
Séverin Lemaignan committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81


Running the simulation
----------------------


The simulation is entierly contained in this repository. To launch it, install
MORSE (on Ubuntu Linux/Debian, `sudo apt install morse-simulator`), clone this
repository, and run `morse run default.py` from within the repository.

Interfacing with MORSE
----------------------

External *clients* of the simulator can interact with each of the simulated
entities (the ROBOPILOT van, obviously, but also all the other vehicles in the
simulation).

In this early prototype, the default interface is using raw sockets. MORSE
provides a convenient python wrapper (`pymorse`) on top of the sockets to make
it easy to communicate with the simulation (note that, while MORSE is mostly a
Linux/macOS tool, `pymorse` runs happily on Windows: you can have the simulator
running on a Linux machine, and communicate with the simulator using `pymorse`
from a Windows machine).

Examples of `pymorse` usage are [available online](https://www.openrobots.org/morse/doc/stable/pymorse.html).

One example of a very simple client to control a bike is available in [scripts/](https://caidin.brl.ac.uk/s-lemaignan/morse-robopilot-sim/blob/master/robopilotsim/scripts/bikes_agent.py)