README.md 1.45 KB
Newer Older
1 2
Steps to build a component:

Helge Simon Hartleb's avatar
Helge Simon Hartleb committed
3 4 5 6
* 1.) move **mw-generator.jar** to the directory of the component you wish to build.
* 2.) open shell, cd to the directory of the component and execute: **java -jar mw-generator.jar project.json** (in this case it's called **valid.json** for both components)
* 3.) switch to the target directory (**cd target/**)
* 4.) execute compile.sh (**./compile.sh**)
Helge Simon Hartleb's avatar
Helge Simon Hartleb committed
7 8
* 5.) if the generator can't find carla_msgs message type: execute the following command and retry step 4
*       export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/path/to/rosbridge/catkin_ws/devel/share/carla_msgs/cmake
Helge Simon Hartleb's avatar
Helge Simon Hartleb committed
9
*       usually the path is something like "~/carla-ros-bridge/catkin_ws/devel/share/carla_msgs/cmake"
Helge Simon Hartleb's avatar
Helge Simon Hartleb committed
10 11
* 6.) after successfull compiling the generated code switch to install/bin directory (**cd install/bin/**)
* 7.) execute Coordinator_<model-package>_<component-name> (here it's **./Coordinator_test_bumpBot** or **./Coordinator_test_collisionDetection**)
Lennart Bucher's avatar
Lennart Bucher committed
12

Lennart Bucher's avatar
Lennart Bucher committed
13
## Wie bringe ich das Auto zum Fahren und lese den Kollisionssensor aus?
Lennart Bucher's avatar
Lennart Bucher committed
14

Lennart Bucher's avatar
Lennart Bucher committed
15 16 17
Carla Starten  
Unter PythonAPI/examples: `python manual_control.py --rolename=ego_vehicle`  
Zum Starten des Containers in den Ordner des Projektes (hier ein ausgechecktes Verzeichnis BumbBot_test) gehen:  
Lennart Bucher's avatar
Lennart Bucher committed
18
`docker/run.sh`
Lennart Bucher's avatar
Lennart Bucher committed
19

Lennart Bucher's avatar
Lennart Bucher committed
20
Dann in einem neuen Terminal um das Auto fahren zu lassen:  
Lennart Bucher's avatar
Lennart Bucher committed
21
`docker/compile_exec.sh`
Lennart Bucher's avatar
Lennart Bucher committed
22

Lennart Bucher's avatar
Lennart Bucher committed
23
Um den Collision Sensor auszulesen in einem neuen Terminal:  
Lennart Bucher's avatar
Lennart Bucher committed
24
`docker/open_shell.sh` und darin `rostopic echo /carla/ego_vehicle/collision`