Skip to content

Commit cacd7ab

Browse files
committed
Update README.md
1 parent 793ce35 commit cacd7ab

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

autodrive_matlab_api/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,20 @@ This directory hosts the MATLAB API for AutoDRIVE, which can be used to develop
1515
1616
After having done this, **restart MATLAB** and check that the path was read by MATLAB properly by running the `javaclasspath` command. The newly added path should appear at the bottom of the list, before the `DYNAMIC JAVA PATH` entries. Note that seeing the entry here does not mean that MATLAB necessarily found the `jar` file properly. You must make sure that the actual `jar` file is indeed available at this location.
1717
- **[OPTIONAL]** To build the `jar` file yourself, it is recommended to use [Apache Maven](https://maven.apache.org/download.cgi) (tested with version 3.8.1) with [Java Development Kit](https://www.oracle.com/java/technologies/downloads/?er=221886#java8) (tested with version 8u411). Maven will automatically take care of downloading the [`Java-WebSocket`](https://github.com/TooTallNate/Java-WebSocket) library and neatly package everything into a single file (an "uber jar") based on the [`pom.xml`](lib/pom.xml). Once the `mvn` command is on your path, simply `cd` to the `lib` directory and execute the `mvn package` command.
18-
2. Add the `autodrive_matlab_api` directory to MATLAB path by right-clicking on it from MATLAB's file explorer and selecting `Add to Path` → `Selected Folders and Subfolders`.
18+
2. Add the `autodrive_matlab_api` directory to MATLAB path by right-clicking on it from MATLAB's file explorer and selecting `Add to Path` → `Selected Folders and Subfolders`.
19+
20+
## USAGE
21+
22+
1. Execute AutoDRIVE MATLAB API:
23+
```MATLAB
24+
autodrive = example_{vehicle}(4567)
25+
```
26+
Replace `{vehicle}` by one of the available objects:
27+
- `roboracer` for [RoboRacer (formerly F1Tenth)](https://roboracer.ai)
28+
29+
2. Terminate AutoDRIVE MATLAB API:
30+
```MATLAB
31+
autodrive.stop
32+
delete(autodrive)
33+
clear autodrive
34+
```

0 commit comments

Comments
 (0)