Skip to content

Commit c47eccd

Browse files
Merge pull request #182 from FS-Online/docs-feedback
Docs improvements
2 parents 45cd8a2 + 1c3de1f commit c47eccd

4 files changed

Lines changed: 29 additions & 9 deletions

File tree

docs/getting-started.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Getting started
22

33
When running this simulator there are two main components: the simulator and the ros bridge.
4-
Your autonomous system and the ros bridge should use the same ros core, either by running on the same computer or through a network connection.
4+
Your autonomous system and the ros bridge should use the same ros core, either by running on the same computer or through a network connection.
5+
It is required that the simulator and the ros bridge have the same version!
56

67
This page is an overview of the different methods to get these components up and running.
78

@@ -41,6 +42,12 @@ Try driving the car around using the arrowkeys.
4142
If you want to run the unreal engine project from source you will need [unreal engine and visual studio 2019](software-install-instructions.md).
4243
On Ubuntu you can skip the visual studio 2019 part.
4344

45+
#### Get the repository
46+
47+
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.
48+
49+
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!
50+
4451
#### Compiling the AirSim plugin
4552
The Unreal Engine project requires the AirSim plugin.
4653
We have to compile this plugin first.
@@ -71,7 +78,8 @@ It might show an error like 'This project was made with a different version of t
7178
When asked to rebuild the 'Blocks' and 'AirSim' modules, choose 'Yes'.
7279
This is the step where the plugin part of AirSim is compiled.
7380

74-
After some time Unreal Engine will start and you can launch the game.
81+
After some time Unreal Engine will start and you can launch the game.
82+
Run the game in standalone mode or or selected viewport mode, simulate and eject mode do not support camera's.
7583

7684
If you make changes to AirLib you have to run `build.cmd` again.
7785

@@ -89,9 +97,9 @@ If you want to run it like it would run when packaged, choose 'Run as standalone
8997
The simulator exposes an RPC api that is used by the ros bridge to communicate with the vehicle.
9098
The ros bridge should preferable run on the same computer as the simulator to ensure low latency and high bandwidth.
9199

92-
> It is theoretically possible to run the ros bridge on a different computer than the simulator.
93-
However, this has not been tested recently and it might be broken.
94-
You should look into the fsds_ros_bridge.launch file and check the `host_ip` variable.
100+
It is possible to run the ros bridge on a different computer than the simulator.
101+
To get this to work you should use the `host` argument in the `fsds_ros_bridge.launch` file.
102+
The ros bridge will connect to the simulator on port 41451.
95103

96104
The ros bridge only works on Ubuntu.
97105
If you have the simulator running on windows we reccommend Windows Subsystem for Linux.
@@ -132,6 +140,8 @@ If you want to share the the clone directory with the Ubuntu WSL system, create
132140
ln -s /mnt/c/Users/developer/Formula-Student-Driverless-Simulator ~/Formula-Student-Driverless-Simulator
133141
```
134142

143+
Now, checkout the version equal to the simulator. If you are running for example simulator packaged version beta-3, run `git checkout beta-3` to get the ros brige to the same version
144+
135145
### Preparing AirLib
136146

137147
AirLib is the shared code between the ros wrapper and the AirSim Unreal Engine plugin.
@@ -166,4 +176,4 @@ roslaunch fsds_ros_bridge fsds_ros_bridge.launch
166176
The ros bridge will read the settings from `~/Formula-Student-Driverless-Simulator/settings.json`.
167177
Make sure this is the same configuration file as the simulator uses.
168178

169-
[Read all about configuring the ros bridge here.](ros-bridge.md)
179+
[Read all about configuring the ros bridge here.](ros-bridge.md)

docs/software-install-instructions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ You probably only need parts of it.
55
The other guides in this documentation will tell you what you need.
66

77
## Install Unreal Engine (Windows)
8+
Ensure your windows user has no special characters!
9+
If it contains special characters there will be a conflict with your Win10 user folder name, and mess up unreal engine reading the directory path.
10+
811
Go to [unrealengine.com](https://www.unrealengine.com/) and download the epic installer.
912
You need an account for this.
1013
Install the epic installer.
@@ -71,4 +74,4 @@ It is easy to get this working though!
7174
Just install [Xming](https://sourceforge.net/projects/xming/) on windows, and run it.
7275
Next, go into the Ubuntu terminal and run `export DISPLAY=:0`.
7376
Now you can run any all them gui apps!
74-
You can even add `export DISPLAY=:0` to your `~/.bashrc` to always be able to use gui apps without having to manually run export.
77+
You can even add `export DISPLAY=:0` to your `~/.bashrc` to always be able to use gui apps without having to manually run export.

ros/src/fsds_ros_bridge/launch/fsds_ros_bridge.launch

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
<env name="OPERATOR_ACCESS_TOKEN" value="$(arg access_token)"/>
2828
</node>
2929

30-
<node pkg="fsds_ros_bridge" name="cameralauncher" type="cameralauncher.py" output="screen" required="true"/>
30+
<node pkg="fsds_ros_bridge" name="cameralauncher" type="cameralauncher.py" output="screen" required="true">
31+
<param name="host_ip" type="string" value="$(arg host)" />
32+
</node>
3133

3234
</group>
3335

ros/src/fsds_ros_bridge/scripts/cameralauncher.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
import json
55
import signal
66
import sys
7+
import rospy
78

89
CAMERA_FRAMERATE = 30
9-
AIRSIM_HOSTIP = "localhost"
10+
11+
rospy.init_node('cameralauncher', anonymous=True)
12+
AIRSIM_HOSTIP = rospy.get_param("~host_ip")
13+
14+
print(AIRSIM_HOSTIP)
1015

1116
settings = {}
1217

0 commit comments

Comments
 (0)