Skip to content

Commit

Permalink
Merge pull request #234 from FS-Driverless/ubuntu-docs
Browse files Browse the repository at this point in the history
Ubuntu docs
  • Loading branch information
SijmenHuizenga authored Aug 24, 2020
2 parents d1678e2 + 9b7a5d6 commit f0d0596
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "ros/src/fs_msgs"]
path = ros/src/fs_msgs
url = https://github.com/FS-Online/fs_msgs.git
url = https://github.com/FS-Driverless/fs_msgs.git
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is a Formula Student Driverless Simulator (FSDS).
FSDS is a community project with the goal to provide an end to end simulation for FS Driverless teams.
It simulates all commonly used sensors and can connects with ros.
This project has proven itsself during [FS-Online 2020](https://formulastudentonline.com/) where 4 driverless teams competed.
See [day 1](https://www.youtube.com/watch?v=TCgKwuLo3Eo), [day 2](https://www.youtube.com/watch?v=A-RHuWMZbig) and [day 3](https://www.youtube.com/watch?v=1RwY1cNMqMg)

**Problems?** Ask questions in [Jitter chat](https://gitter.im/FS-Driverless/Formula-Student-Driverless-Simulator) or [open an issue](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues)

Expand Down
6 changes: 3 additions & 3 deletions UE4Project/Config/DefaultGame.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=367FFC384956CDC4377673B3217F380D
ProjectName="FSOnline"
CompanyName=FS-Online
Homepage="https://github.com/FS-Online/Formula-Student-Driverless-Simulator"
SupportContact="https://github.com/FS-Online/Formula-Student-Driverless-Simulator/issues"
CompanyName=Formula Student Driverless Community
Homepage="https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator"
SupportContact="https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues"
LicensingTerms=GPL V2
ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "8F8B6B2A472F9FDFB69E2B8CFAE8C4E0", "Formula Student Driverless Simulator")
ProjectDebugTitleInfo=NSLOCTEXT("[/Script/EngineSettings]", "F31D7C524A9E9BC66DD2AA922D309408", "Formula Student Driverless Simulator (debug)")
Expand Down
4 changes: 2 additions & 2 deletions config/team_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Team A",
"master": "http://autonomous-system-1:11311/",
"car_settings": {
"SeeDocsAt": "https://fs-online.github.io/Formula-Student-Driverless-Simulator/",
"SeeDocsAt": "https://FS-Driverless.github.io/Formula-Student-Driverless-Simulator/",
"SettingsVersion": 1.2,
"ViewMode": "SpringArmChase",
"ClockSpeed": 1.0,
Expand Down Expand Up @@ -50,7 +50,7 @@
"name": "Team B",
"master": "http://autonomous-system-2:11311/",
"car_settings": {
"SeeDocsAt": "https://fs-online.github.io/Formula-Student-Driverless-Simulator/",
"SeeDocsAt": "https://FS-Driverless.github.io/Formula-Student-Driverless-Simulator/",
"SettingsVersion": 1.2,
"ViewMode": "SpringArmChase",
"ClockSpeed": 1.0,
Expand Down
27 changes: 18 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Read [this tutorial](gcp-remote-workstation.md) on how to setup your virtual wor
The simulator will load settings from the file `Formula-Student-Driverless-Simulator/settings.json` in your **home directory**.
This file is required for the simulator to work and contains the sensor configuration of the car.
If you clone the repo you will already have this file in place.
If not, copy-paste the contents of the [settings.json file at the root of this repository](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/blob/master/settings.json) into the `~/Formula-Student-Driverless-Simulator`.
If not, copy-paste the contents of the [settings.json file at the root of this repository](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/blob/master/settings.json) into the `~/Formula-Student-Driverless-Simulator`.
This should get you started with the default sensor configuration, feel free to try your own custom sensor suite.

### From release binaries

The simulator is distributed as binaries on every release.
[At this moment only windows binaries are released. For now, if you are on Ubuntu you will have to run the simulator from the Unreal Engine Editor.](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/issues/107)
[At this moment only windows binaries are released. For now, if you are on Ubuntu you will have to run the simulator from the Unreal Engine Editor.](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues/107)
During competition, the simulation will run on Windows because it offers a bit better performance and stability.

Go to [releases](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/releases) and download the latest one.
Go to [releases](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases) and download the latest one.
Unzip it to anywhere on your computer and launch FSDS.exe.
A window with a car should popup!
Try driving the car around using the arrowkeys.
Expand All @@ -44,7 +44,7 @@ On Ubuntu you can skip the visual studio 2019 part.

#### Get the repository

You can either download the repo using the big green download button on the [github page of this project](https://github.com/FS-Online/Formula-Student-Driverless-Simulator) or clone the repository. For cloning, checkout the documentation on this further down this page.
You can either download the repo using the big green download button on the [github page of this project](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator) or clone the repository. For cloning, checkout the documentation on this further down this page.

When downloading or cloning, by default you get the latest, unreleased version. This is probably not the version that you want. Make sure you select the version that you need!

Expand All @@ -71,7 +71,16 @@ The first time this takes quite a while. Go walk around a bit, maybe start playi

#### Working with the Unreal Engine project

Launch Unreal Engine and open the project file `Formula-Student-Driverless-Simulator/UE4Project/FSOnline.uproject`
Launch Unreal Engine, press Browse and open the FSDS project in `~/Driverless-Competition-Simulator/UE4Project/FSOnline.uproject`.
The project should now open correctly.
If it does not, make sure of the following:

* you have cloned the repository inside your home folder (~/)
* you have cloned with LFS enabed. If not, run `git lfs install` and `git lfs pull` to download the large files.
* within `~/Driverless-Competition-Simulator/AirSim/`, you have run `build.cmd` on Windows and `./setup.sh && ./build.sh` on Ubuntu.

On Ubuntu, we recommend adding the following alias to your ~/.bashrc to speed up the process of opening the repository in the future:
`alias ue='~/UnrealEngine/Engine/Binaries/Linux/UE4Editor ~/Driverless-Competition-Simulator/UE4Project/FSOnline.uproject'`

It might show an error like 'This project was made with a different version of the Unreal Engine'. In that case select `more options` and `skip conversion`.

Expand Down Expand Up @@ -120,12 +129,12 @@ Make sure you have git lfs installed!

Ready? Lets clone the repo into your home directory:
```
git clone git@github.com:FS-Online/Formula-Student-Driverless-Simulator.git --recurse-submodules
git clone git@github.com:FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```

If you havn't setup your ssh keys, you can clone using https by running the following command:
```
git clone https://github.com/FS-Online/Formula-Student-Driverless-Simulator.git --recurse-submodules
git clone https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```

**THE REPO HAS TO BE CLONED IN THE HOME DIRECTORY!**. So the repo location should be `$HOME/Formula-Student-Driverless-Simulator`.
Expand All @@ -135,7 +144,7 @@ I know yes it is ugly but it works. If you are bothered by it I would welcome yo
If this folder already exists as a result of any previous step, move the existing folder out of the way and merge the content afterwards.

If you are on Windows and cloned this repository in a Windows directory, go into the cloned repo and run `git config core.fileMode false` to ignore file mode changes.
If you want to share the the clone directory with the Ubuntu WSL system, create a symlink within WSL like so:
If you want to share the the cloned directory with the Ubuntu WSL system, create a symlink within WSL like so:
```
ln -s /mnt/c/Users/developer/Formula-Student-Driverless-Simulator ~/Formula-Student-Driverless-Simulator
```
Expand Down Expand Up @@ -181,7 +190,7 @@ Make sure this is the same configuration file as the simulator uses.
## Connecting your autonomous system

The ROS bridge of this simulator had to make use of several custom msgs (for control commands, the groundtruth track, etc).
These messages are defined in a ROS package called `fs_msgs` which is located in a separate, light [repository](https://github.com/FS-Online/fs_msgs).
These messages are defined in a ROS package called `fs_msgs` which is located in a separate, light [repository](https://github.com/FS-Driverless/fs_msgs).
To implement publishers and subscibers for these messages types in your autonomous pipeline, you will have to add the `fs_msgs` repository as a submodule in your codebase (inside de `src` directory of an existing **catkin workspace** as done in this repository) or clone it and build it somewhere else in your system.

Now, all that is left to do is subscribe to the following topics to receive sensordata
Expand Down
2 changes: 1 addition & 1 deletion docs/joystick.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ You can debug the input values from the joy driver by checking the `/joy` topic.
Listens to joystick input which is then mapped to the control command msg. The mapping should feel intuitive but in case something is unclear, it is described in detail in `/ros/src/fsds_ros_bridge/src/joystick.cpp`

## Publishers:
- `/fsds_ros_bridge/VEHICLE_NAME/control_command` [fs_msgs/ControlCommand](https://github.com/FS-Online/fs_msgs/blob/master/msg/ControlCommand.msg)
- `/fsds_ros_bridge/VEHICLE_NAME/control_command` [fs_msgs/ControlCommand](https://github.com/FS-Driverless/fs_msgs/blob/master/msg/ControlCommand.msg)

4 changes: 2 additions & 2 deletions docs/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ pip install -r requirements.txt
```

Next, download a packaged version of the simulator
Go to the [releases](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/releases) and download the latest version.
Go to the [releases](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases) and download the latest version.
Extract the zip to the `simulator` folder at the root of this project.
The result should be that the following files and folders exist inside the `simulator` folder:

Expand All @@ -64,7 +64,7 @@ By default, the web interface binds to all ip's of the machine on port 5000.
## Running the bridge launcher

The ros bridge will most likely not run on the same computer as the simulator as the ros bridge works best on Ubuntu and the simulator best on Windows.
It is discouraged to run the ros bridge on WSL during competition, see [#199](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/issues/199).
It is discouraged to run the ros bridge on WSL during competition, see [#199](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues/199).

To help you quickly start the ros bridge with the configuration parameters set in the operator you can use the bridge launcher.
This script will request the configuration from the operator using an http api call and launch the bridge accordingly.
Expand Down
16 changes: 8 additions & 8 deletions docs/ros-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ The fsds_ros_bridge.launch launches the following nodes:
| `/fsds/imu` | Velocity, orientation and acceleration information. Read all about the IMU model [here](imu.md). Data is in the `fsds/FSCar` (enu) frame. | [sensor_msgs/Imu](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Imu.html) | 250 |
| `/fsds/gss` | Ground speed sensor provide linear velocity of the vehicle (`fsds/FSCar`). Velocity is m/s. | [geometry_msgs/TwistStamped](https://docs.ros.org/api/nav_msgs/html/msg/Odometry.html) | 100 |
| `/fsds/testing_only/odom` | Ground truth car position and orientation in ENU frame about the CoG of the car (`fsds/FSCar`). The units are `m` for distance. The orientation are expressed in terms of quaternions. The message is in the `fsds/map` frame. This is a frame that is not (yet) used anywhere else and is just here so you can easely reference it if needed. *THIS WILL NOT BE STREAMED DURING COMPETITION.* | [nav_msgs/Odometry](https://docs.ros.org/api/nav_msgs/html/msg/Odometry.html) | 250 |
| `/fsds/testing_only/track` | Ground truth cone position and color with respect to the starting location of the car in ENU. Currently this only publishes the *initial position* of cones that are part of the track spline. Any cones placed manually in the world are not published here. Additionally, the track is published once and the message is latched (meaning it is always available for a newly created subscriber). *THIS WILL NOT BE STREAMED DURING COMPETITION.* | [fs_msgs/Track](https://github.com/FS-Online/fs_msgs/blob/master/msg/Track.msg) | Latched |
| `/fsds/testing_only/track` | Ground truth cone position and color with respect to the starting location of the car in ENU. Currently this only publishes the *initial position* of cones that are part of the track spline. Any cones placed manually in the world are not published here. Additionally, the track is published once and the message is latched (meaning it is always available for a newly created subscriber). *THIS WILL NOT BE STREAMED DURING COMPETITION.* | [fs_msgs/Track](https://github.com/FS-Driverless/fs_msgs/blob/master/msg/Track.msg) | Latched |
| `/fsds/camera/CAMERA_NAME` | One of this topic type will exist for every camera specified in the `settings.json` file. On this topic, camera frames are published. The format will be bgra8. `CAMERA_NAME` will be replaced by the corresponding in the `Cameras` object in the `settings.json` file. `IMAGE_TYPE` is determand by the `SensorType` field. When choosing 0, it will be 'Scene'. | [sensor_msgs/Image](https://docs.ros.org/api/sensor_msgs/html/msg/Image.html) | ~18 |
| `/fsds/lidar/LIDARNAME` | Publishes the lidar points for each lidar sensor. All points are in the `fsds/LIDARNAME` frame. Transformations between the `fsds/LIDARNAME` and `fsds/FSCar` frame are being published regularly. More info on the lidar sensor can be found [here](lidar.md) | [sensor_msgs/PointCloud](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/PointCloud.html) | ``RotationsPerSecond` param in `settings.json` |
| `/fsds/signal/go` | GO signal that is sent every second by the ROS bridge.The car is only allowed to drive once this message has been received. If no GO signal is received for more than 4 seconds, the AS can assume that `fsds_ros_bridge` has been shut down. This message also includes the mission type and track. More info about signal topics can be found in the [integration handbook](integration-handbook.md) | [fs_msgs/GoSignal](https://github.com/FS-Online/fs_msgs/blob/master/msg/GoSignal.msg) | 1 |
| `/fsds/signal/go` | GO signal that is sent every second by the ROS bridge.The car is only allowed to drive once this message has been received. If no GO signal is received for more than 4 seconds, the AS can assume that `fsds_ros_bridge` has been shut down. This message also includes the mission type and track. More info about signal topics can be found in the [integration handbook](integration-handbook.md) | [fs_msgs/GoSignal](https://github.com/FS-Driverless/fs_msgs/blob/master/msg/GoSignal.msg) | 1 |
| `/tf_static` | See [Coordinate frames and transforms](#coordinate-frames-and-transforms) | [tf2_msgs/TFMessage](https://docs.ros.org/api/tf2_msgs/html/msg/TFMessage.html) | 1 |


## Subscribed topics

| Topic name | Description | Message |
|---|---|---|
| `/fsds/control_command` | This message includes the dimensionless values throttle, steering and brake. Throttle and brake range from 0 to 1. For steering `-1` steers full to the left and `+1` steers full to the right. The contents of this message fill the essential parts of the `msr::airlib::CarApiBase::CarControl` struct. This is the only way to control the car when the airsim ROS client is connected (keyboard will no longer work!). | [fs_msgs/ControlCommand](https://github.com/FS-Online/fs_msgs/blob/master/msg/ControlCommand.msg) |
| `/fsds/signal/finished` | Finished signal that is sent by the AS to stop the mission. The ros bridge will forward the signal to the operator which in turn will stop the ros bridge and finish the run. | [fs_msgs/FinishedSignal](https://github.com/FS-Online/fs_msgs/blob/master/msg/FinishedSignal.msg) |
| `/fsds/control_command` | This message includes the dimensionless values throttle, steering and brake. Throttle and brake range from 0 to 1. For steering `-1` steers full to the left and `+1` steers full to the right. The contents of this message fill the essential parts of the `msr::airlib::CarApiBase::CarControl` struct. This is the only way to control the car when the airsim ROS client is connected (keyboard will no longer work!). | [fs_msgs/ControlCommand](https://github.com/FS-Driverless/fs_msgs/blob/master/msg/ControlCommand.msg) |
| `/fsds/signal/finished` | Finished signal that is sent by the AS to stop the mission. The ros bridge will forward the signal to the operator which in turn will stop the ros bridge and finish the run. | [fs_msgs/FinishedSignal](https://github.com/FS-Driverless/fs_msgs/blob/master/msg/FinishedSignal.msg) |


## Services

- `/fsds/reset` [fsds_ros_bridge/Reset](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/srv/Reset.srv)
- `/fsds/reset` [fsds_ros_bridge/Reset](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/srv/Reset.srv)
Resets car to start location.

## Units

If a topic streams a standard ROS message (like [sensor_msgs/Imu](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Imu.html)) then the units will be the recommended units in the message documentation. Custom messages (from the [fs_msgs](https://github.com/FS-Online/fs_msgs) package) use the units specified in the message documentation as well. If in doubt, interpret distances in meters, angles in radians and rates in m/s and rad/s, etc.
If a topic streams a standard ROS message (like [sensor_msgs/Imu](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Imu.html)) then the units will be the recommended units in the message documentation. Custom messages (from the [fs_msgs](https://github.com/FS-Driverless/fs_msgs) package) use the units specified in the message documentation as well. If in doubt, interpret distances in meters, angles in radians and rates in m/s and rad/s, etc.

## Coordinate frames and transforms

Expand Down Expand Up @@ -111,9 +111,9 @@ Transforms to the ground truth are disabled because this would take away the sta
## Visualization
This package contains some useful launch and config files which will help you in visualizing the data being streamed through the above topics.

To open Rviz with [this](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/config/rviz/default.rviz) configuration file, run `roslaunch fsds_ros_bridge fsds_ros_bridge.launch rviz:=true`.
To open Rviz with [this](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/config/rviz/default.rviz) configuration file, run `roslaunch fsds_ros_bridge fsds_ros_bridge.launch rviz:=true`.

To open Multiplot with [this](https://github.com/FS-Online/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/config/multiplot/multiplot.xml) configuration file, run `roslaunch fsds_ros_bridge fsds_ros_bridge.launch plot:=true`.
To open Multiplot with [this](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/blob/master/ros/src/fsds_ros_bridge/config/multiplot/multiplot.xml) configuration file, run `roslaunch fsds_ros_bridge fsds_ros_bridge.launch plot:=true`.

## Monitoring
Performance monitoring of the ROS Bridge is described [here](statistics.md)
1 change: 1 addition & 0 deletions docs/software-install-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cd UnrealEngine
```

Run it by executing `./Engine/Binaries/Linux/UE4Editor`.
The Unreal Editor should now open without errors.

## Install visual studio 2019 (Windows)
[Download visual studio 2019 (community edition)](https://visualstudio.microsoft.com/vs/)
Expand Down
Loading

0 comments on commit f0d0596

Please sign in to comment.