Skip to content

Commit 99c3913

Browse files
TaikiYamada4ahmeddesokyebrahimpre-commit-ci[bot]isamu-takagitkhmy
authored
docs(how-to-guides): fill the documentation of creating vehicle interface for ackerman kinematic model (#404)
* feat: invalid lanelet documentation (#337) * feat: invalid lanelet documentation Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat: changing module name from invalid_lanelet to no_drivable_lane Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat(no_drivable_lane): updating the node diagram file will smaller one in size Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat(no_drivable_lane): reverting back to large size image Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat(no_drivable_lane): fix review comments / add missing parts regarding no_drivable_lane module documentation Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat(no_drivable_lane): updating no_drivable_lane doc link Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> * feat(no_drivable_lane): fixing review comment / update missing no_drivable_lane link Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> --------- Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Start to get writing about vehicle interfaces. Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Finished the implementation part Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * First draft done Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed ackerman to Ackermann, and changed the path of images. Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed the html description of figures in md_in_html style Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Changed ROS2 to ROS 2. Added description about autoware.repos Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Minor revision Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed typo and indents Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Removed redundant new lines Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Revert Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Changed url for source installation explanation Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * docs(ad-api): add use cases of vehicle status (#381) * init vehicle status Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix spelling error Signed-off-by: tkhmy <tkh.my.p@gmail.com> * remove old file Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix spelling error Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix dead link Signed-off-by: tkhmy <tkh.my.p@gmail.com> * update vehicle message Signed-off-by: tkhmy <tkh.my.p@gmail.com> * change vehicle motion Signed-off-by: tkhmy <tkh.my.p@gmail.com> * feat(ad-api): add vehicle information api Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * fix msgs Signed-off-by: tkhmy <tkh.my.p@gmail.com> * update geo position Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix typo Signed-off-by: tkhmy <tkh.my.p@gmail.com> * change naming Signed-off-by: tkhmy <tkh.my.p@gmail.com> * feat: add door group Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update message Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix naming Signed-off-by: tkhmy <tkh.my.p@gmail.com> * fix typo Signed-off-by: tkhmy <tkh.my.p@gmail.com> * update geographic_msgs Signed-off-by: tkhmy <tkh.my.p@gmail.com> * docs(ad-api): add use cases of vehicle status Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: remove old files Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: use template Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * apply template Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update message name Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update vehicle status feature Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * fix link Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update door layout Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> --------- Signed-off-by: tkhmy <tkh.my.p@gmail.com> Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Co-authored-by: tkhmy <tkh.my.p@gmail.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * chore: add mkdocs template for sync files from other repository (#395) chore: add mkdocs template for sync files from other directory Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * ci(sync-files): fix source path (#398) Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * docs(how-to-guides): add creating vehicle and sensor description. (#399) * docs(how-to-guides): Creating vehicle and sensor description. Fixes #396 Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> * style(pre-commit): autofix Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> * fix: typo Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> * fix: typo Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> --------- Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * docs(coding-guidelines): add note for test file with private headers (#402) Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * merged upstream/main Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Adjust md file to markdown lint Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Adjust style again Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * feat: change the adapi page structure (#406) * move user stories Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * move features Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * add list page Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update message Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * update menu Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> --------- Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style: fix pre-commit errors Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * fix indent Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Changed list to subsubsections Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * feat(how-to-guides): add important temporal performance metrics (#389) * feat(how-to-guides): add new pages for important temporal performance metrics. Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fix: removed unnecessary sub component names. Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed section for top-level temporal performance metrics Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed note Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * fixed table for Perception Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fix table of Perception Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed table of Perception Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed table of Perception Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed not saved Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed table of obstacle segmentation Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * removed or Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * replaced LiDAR by sensor Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * add some minor fix Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * add high-level component name Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * style(pre-commit): autofix * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * Update docs/how-to-guides/integrating-autoware/tuning-parameters-and-performance/important-temporal-performance-metrics.md Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> * fixed reason expression. Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed model for perception Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * replace the by a Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * fixed the sentence Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * replace image by correct one Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * fixed missing link Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * chore: mv the pages to how-to-guides/others Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * chore: add page item to the list Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * chore: add the reason why temporal performance is used. Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * chore: add guide to performance evaluation tools Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * add explanation of definition policy Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * fix: completed writing policies Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> * style(pre-commit): autofix * chore: fixed missing link. Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> --------- Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Update docs/how-to-guides/integrating-autoware/creating-vehicle-interface-package/.pages Get rid of redundancy Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Apply three suggestions from code review Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed typos. Added proper articles to the title. Fixed inconsistancy for the term vehicle interface. Break paragraphs into lines. Changed the term hardware (ECU) to control device. Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed typo Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> --------- Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com> Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> Signed-off-by: tkhmy <tkh.my.p@gmail.com> Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Signed-off-by: Naophis <naoto.hiramatsu@tier4.jp> Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> Co-authored-by: Ahmed Ebrahim <36835765+ahmeddesokyebrahim@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> Co-authored-by: tkhmy <tkh.my.p@gmail.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: Naophis <naoto.hiramatsu@tier4.jp> Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: Takayuki AKAMINE <38586589+takam5f2@users.noreply.github.com> Co-authored-by: takeshi-iwanari <takeshi.iwanari@tier4.jp> Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
1 parent 5708b56 commit 99c3913

5 files changed

Lines changed: 251 additions & 5 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nav:
2+
- Creating a vehicle interface for an Ackermann kinematic model: creating-a-vehicle-interface-for-an-ackermann-kinematic-model.md
3+
- customizing-for-differential-drive-model.md
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# Creating a vehicle interface for an Ackermann kinematic model
2+
3+
This page introduces a module vehicle interface and explains how to implement it.
4+
5+
## What is a vehicle interface
6+
7+
Vehicle interface is an interface that connects the control commands and your vehicle's control device.
8+
Autoware publishes control commands such as:
9+
10+
- Velocity control
11+
- Steering control
12+
- Car light commands
13+
14+
Then, the vehicle interface converts these commands into actuation such like:
15+
16+
- Motor and brake activation
17+
- Steering wheel operation
18+
- Lighting control
19+
20+
So think of the vehicle interface as a module that runs the vehicle's control device to realize the input commands provided by Autoware.
21+
22+
<figure markdown>
23+
![vehicle_interface_IO](images/Vehicle-Interface-Bus-ODD-Architecture.drawio.svg){ align=center }
24+
<figcaption>
25+
An example of inputs and outputs for vehicle interface
26+
</figcaption>
27+
</figure>
28+
29+
This page shows you a brief explanation how to implement your vehicle interface, but [you can see further information of vehicle interface in the "design" page](https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-interfaces/components/vehicle-interface/).
30+
31+
**Note that there is no package named "vehicle interface" prepared in Autoware.**
32+
**It is a necessary package to actuate your vehicle, but you have to create one by yourself since it is very specific to your vehicle's control device.**
33+
34+
For example, if you are using a by-wire kit [PACMod](https://autonomoustuff.com/platform/pacmod), a vehicle interface named [`pacmod_interface` published by TIER IV, Inc.](https://github.com/tier4/pacmod_interface/tree/main) is available.
35+
However, if you have constructed something original and haven't found an open source vehicle interface applicable, you have to implement your own vehicle interface from scratch.
36+
37+
---
38+
39+
## How to implement a vehicle interface
40+
41+
The following instructions describe how to create a vehicle interface.
42+
43+
### 1. Create a directory for vehicle interface
44+
45+
It is recommended to create your vehicle interface at `<your-autoware-dir>/src/vehicle/external`
46+
47+
```bash
48+
cd <your-autoware-dir>/src/vehicle/external
49+
```
50+
51+
### 2. Install or implement your own vehicle interface
52+
53+
If there is an already complete vehicle interface package (like [`pacmod_interface`](https://github.com/tier4/pacmod_interface/tree/main)), you can install it to your environment.
54+
If not, you have to implement your own vehicle interface by yourself.
55+
Let's create a new package by `ros2 pkg create`.
56+
The following example will show you how to create a vehicle interface package named `my_vehicle_interface`.
57+
58+
```bash
59+
ros2 pkg create --build-type ament_cmake my_vehicle_interface
60+
```
61+
62+
Then, you should write your implementation of vehicle interface in `my_vehicle_interface/src`.
63+
Again, since this implementation is so specific to the control device of your vehicle, it is beyond the scope of this document to describe how to implement your vehicle interface in detail.
64+
Here are some factors that might be considered.
65+
66+
- Subscription of control command topics from Autoware
67+
- Communication between the vehicle interface and your vehicle's control device
68+
- Modification of control values if needed
69+
70+
### 3. Prepare a launch file
71+
72+
After you implement your vehicle interface or you want to debug it by launching it, create a launch file of your vehicle interface, and include it to `vehicle_interface.launch.xml`.
73+
74+
Do not get confused. First, you need to create a launch file for your own vehicle interface module (like `my_vehicle_interface.launch.xml`) **and then include that to `vehicle_interface.launch.xml` which exists in another directory.** Here are the details.
75+
76+
1. Add a `launch` directory in the `my_vehicle_interface` directory, and create a launch file of your own vehicle interface in it. Take a look at [Creating a launch file](https://docs.ros.org/en/humble/Tutorials/Intermediate/Launch/Launch-Main.html) in the ROS 2 documentation.
77+
78+
2. Next, go to `<your-autoware-dir>/src/vehicle`, copy the directory `/sample_vehicle_launch/`, and paste it to the same place (which means it should be lined up with `external` and `sample_vehicle_launch`).
79+
80+
3. You have to rename each "sample_vehicle" to something else. For example, if you want to rename "sample_vehicle" to "my_vehicle_name", you need to change the following. Note that it is restricted to keep the "\_launch" and "\_description" part.
81+
82+
- **Rename the directories**
83+
- `sample_vehicle_launch` &rarr; `my_vehicle_name_launch`
84+
- `my_vehicle_name_launch/sample_vehicle_launch` &rarr; `my_vehicle_name_launch/my_vehicle_name_launch`
85+
- `my_vehicle_name_launch/sample_vehicle_description` &rarr; `my_vehicle_name_launch/my_vehicle_name_description`
86+
- **After you rename your directories, rename each "sample_vehicle" to "my_vehicle_name" in the source code.**
87+
- `my_vehicle_name_description/CMakeLists.txt`
88+
- `my_vehicle_name_description/package.xml`
89+
- `my_vehicle_name_description/urdf/vehicle.xacro` (there are two parts)
90+
- `my_vehicle_name_launch/CMakeLists.txt`
91+
- `my_vehicle_name_launch/package.xml`
92+
- `README.md`
93+
94+
4. Include your launch file to `my_vehicle_name_launch/my_vehicle_name_launch/launch/vehicle_interface.launch.xml` by opening it and add the include terms like below.
95+
96+
```xml title="vehicle_interface.launch.xml"
97+
<?xml version="1.0" encoding="UTF-8"?>
98+
<launch>
99+
<arg name="vehicle_id" default="$(env VEHICLE_ID default)"/>
100+
101+
<include file="$(find-pkg-share my_vehicle_interface)/launch/my_vehicle_interface.launch.xml">
102+
</include>
103+
</launch>
104+
```
105+
106+
Finally, your directory structure may look like below.
107+
Most of the files are omitted for clarity, but the files shown here needs modification as said in the previous and current process.
108+
109+
```diff
110+
<your-autoware-dir>/
111+
└─ src/
112+
└─ vehicle/
113+
├─ external/
114+
+ │ └─ my_vehicle_interface/
115+
+ │ ├─ src/
116+
+ │ └─ launch/
117+
+ │ └─ my_vehicle_interface.launch.xml
118+
├─ sample_vehicle_launch/
119+
+ └─ my_vehicle_name_launch/ (COPIED FROM sample_vehicle_launch)
120+
+ ├─ my_vehicle_name_launch/
121+
+ │ ├─ launch/
122+
+ │ │ └─ vehicle_interface.launch.xml
123+
+ │ ├─ CMakeLists.txt
124+
+ │ └─ package.xml
125+
+ ├─ my_vehicle_name_description/
126+
+ │ ├─ config/
127+
+ │ ├─ mesh/
128+
+ │ ├─ urdf/
129+
+ │ │ └─ vehicle.xacro
130+
+ │ ├─ CMakeLists.txt
131+
+ │ └─ package.xml
132+
+ └─ README.md
133+
```
134+
135+
### 4. Build the vehicle interface package and the launch package
136+
137+
Build three packages `my_vehicle_interface`, `my_vehicle_name_launch` and `my_vehicle_name_description` by `colcon build`, or you can just build the entire Autoware if you have done other things.
138+
139+
```bash
140+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select my_vehicle_interface my_vehicle_name_launch my_vehicle_name_description
141+
```
142+
143+
### 5. When you launch Autoware
144+
145+
Finally, you are done implementing your vehicle interface module! Be careful that you need to launch Autoware with the proper `vehicle_model` option like the example below. This example is launching planning simulator.
146+
147+
```bash
148+
ros2 launch autoware_launch planning.launch.xml map_path:=$HOME/autoware_map/sample-map-planning vehicle_model:=my_vehicle_name sensor_model:=sample_sensor_kit
149+
```
150+
151+
### Tips
152+
153+
There are some tips that may help you.
154+
155+
- You can subdivide your vehicle interface into smaller packages if you want. Then your directory structure may look like below (not the only way though). Do not forget to launch all packages in `my_vehicle_interface.launch.xml`.
156+
157+
```diff
158+
<your-autoware-dir>/
159+
└─ src/
160+
└─ vehicle/
161+
├─ external/
162+
│ └─ my_vehicle_interface/
163+
│ ├─ src/
164+
│ │ ├─ package1/
165+
│ │ ├─ package2/
166+
│ │ └─ package3/
167+
│ └─ launch/
168+
│ └─ my_vehicle_interface.launch.xml
169+
├─ sample_vehicle_launch/
170+
└─ my_vehicle_name_launch/
171+
```
172+
173+
- If you are using a vehicle interface and launch package from a open git repository, or created your own as a git repository, it is highly recommended to add those repositories to your `autoware.repos` file which is located to directly under your autoware folder like the example below. You can specify the branch or commit hash by the version tag.
174+
175+
```yaml title="autoware.repos"
176+
# vehicle (this section should be somewhere in autoware.repos and add the below)
177+
vehicle/my_vehicle_name_launch:
178+
type: git
179+
url: https://github.com/<repository-name-A>/my_vehicle_name_launch.git
180+
version: main
181+
vehicle/external/my_vehicle_interface:
182+
type: git
183+
url: https://github.com/<repository-name-B>/my_vehicle_interface.git
184+
version: main
185+
```
186+
187+
Then you can import your entire environment easily to another local device by using the `vcs import` command. (See [the source installation guide](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/#how-to-set-up-a-workspace))
188+
189+
---
190+
191+
## Ackermann kinematic model
192+
193+
Autoware now supports control inputs for vehicles based on an Ackermann kinematic model.
194+
This section introduces you a brief concept of Ackermann kinematic model and explains how Autoware controls it.
195+
196+
- If your vehicle does not suit the Ackermann kinematic model, you have to modified the control commands. [Another document gives you an example how to convert your Ackermann kinematic model control inputs into a differential drive model.](https://autowarefoundation.github.io/autoware-documentation/main/how-to-guides/integrating-autoware/creating-vehicle-interface-package/customizing-for-differential-drive-model/)
197+
198+
### Geometry
199+
200+
The basic style of Ackermann kinematic model has four wheels with an Ackermann link on the front, and it is powered by the rear wheels.
201+
The key point of Ackermann kinematic model is that the axes of all wheels intersect at a same point, which means all wheels will trace a circular trajectory with a different radii but a common center point (See the figure below).
202+
Therefore, this model has a great advantage that it minimizes the slippage of the wheels, and prevent tires to get worn soon.
203+
204+
In general, Ackermann kinematic model accepts the longitudinal speed $v$ and the steering angle $\phi$ as inputs.
205+
In autoware, $\phi$ is positive if it is steered counter clockwise, so the steering angle in the figure below is actually negative.
206+
207+
<figure markdown>
208+
![ackermann_link](images/Ackermann_WB.png){ align=center }
209+
<figcaption>
210+
The basic style of an Ackermann kinematic model. The left figure shows a vehicle facing straight forward, while the right figure shows a vehicle steering to the right.
211+
</figcaption>
212+
</figure>
213+
214+
### Control
215+
216+
Autoware publishes a ROS 2 topic named `control_cmd` from several types of publishers.
217+
A `control_cmd` topic is a [`AckermannControlCommand`](https://gitlab.com/autowarefoundation/autoware.auto/autoware_auto_msgs/-/blob/master/autoware_auto_control_msgs/msg/AckermannControlCommand.idl) type message that contains
218+
219+
```bash title="AckermannControlCommand"
220+
builtin_interfaces/Time stamp
221+
autoware_auto_control_msgs/AckermannLateralCommand lateral
222+
autoware_auto_control_msgs/LongitudinalCommand longitudinal
223+
```
224+
225+
where,
226+
227+
```bash title="AckermannLateralCommand"
228+
builtin_interfaces/Time stamp
229+
float32 steering_tire_angle
230+
float32 steering_tire_rotation_rate
231+
```
232+
233+
```bash title="LongitudinalCommand"
234+
builtin_interfaces/Time stamp
235+
float32 speed
236+
float32 accelaration
237+
float32 jerk
238+
```
239+
240+
See the [AckermannLateralCommand.idl](https://gitlab.com/autowarefoundation/autoware.auto/autoware_auto_msgs/-/blob/master/autoware_auto_control_msgs/msg/AckermannLateralCommand.idl) and [LongitudinalCommand.idl](https://gitlab.com/autowarefoundation/autoware.auto/autoware_auto_msgs/-/blob/master/autoware_auto_control_msgs/msg/LongitudinalCommand.idl) for details.
241+
242+
The vehicle interface should realize these control commands through your vehicle's control device.
243+
244+
Moreover, Autoware also provides brake commands, light commands, and more (see [vehicle interface design](https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-interfaces/components/vehicle-interface/)), so the vehicle interface module should be applicable to these commands as long as there are devices available to handle them.

docs/how-to-guides/integrating-autoware/creating-vehicle-interface-package/creating-vehicle-interface-for-ackerman-kinematic-model.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
488 KB
Loading

docs/how-to-guides/integrating-autoware/creating-vehicle-interface-package/images/Vehicle-Interface-Bus-ODD-Architecture.drawio.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)