Skip to content

Commit f54db16

Browse files
authored
feat(control-messages): add control messages (#11)
Signed-off-by: M. Fatih Cırıt <[email protected]>
1 parent 2ce4d9c commit f54db16

9 files changed

+182
-0
lines changed

NOTICE

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Copyright 2022 The Autoware Foundation
2+
3+
Some of the messages within this repository are based on autoware_auto_msgs messages that were developed in cooperation with Apex.AI, Inc.

autoware_control_msgs/CMakeLists.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(autoware_control_msgs)
3+
4+
find_package(ament_cmake_auto REQUIRED)
5+
ament_auto_find_build_dependencies()
6+
7+
set(msg_files
8+
"msg/Control.msg"
9+
"msg/ControlHorizon.msg"
10+
"msg/Lateral.msg"
11+
"msg/Longitudinal.msg")
12+
13+
set(msg_dependencies
14+
builtin_interfaces)
15+
16+
rosidl_generate_interfaces(${PROJECT_NAME}
17+
${msg_files}
18+
DEPENDENCIES ${msg_dependencies}
19+
ADD_LINTER_TESTS)
20+
21+
if(BUILD_TESTING)
22+
find_package(ament_lint_auto REQUIRED)
23+
ament_lint_auto_find_test_dependencies()
24+
endif()
25+
26+
ament_auto_package()

autoware_control_msgs/README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# autoware_control_msgs
2+
3+
## Design
4+
5+
Vehicle dimensions and axes: <https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-interfaces/components/vehicle-dimensions/>
6+
7+
### Lateral.msg
8+
9+
Defines a lateral control command message with a timestamp.
10+
11+
The message conveys the expectation for vehicle's lateral state to be in the given configuration in the time point: `control_time`.
12+
13+
- The field `steering_tire_angle` is required.
14+
- The field `steering_tire_rotation_rate` is optional but may be required by some nodes.
15+
- If this field is used, `is_defined_steering_tire_rotation_rate` must be set `true`.
16+
17+
### Longitudinal.msg
18+
19+
Defines a longitudinal control command message with a timestamp.
20+
21+
The message conveys the expectation for vehicle's longitudinal state to be in the given configuration in the time point: `control_time`.
22+
23+
- The field `velocity` is required.
24+
- The field `acceleration` is optional but may be required by some nodes.
25+
- If this field is used, `is_defined_acceleration` must be set `true`.
26+
- The field `jerk` is optional but may be required by some nodes.
27+
- If this field is used, `is_defined_jerk` must be set `true`.
28+
29+
### Control.msg
30+
31+
Defines a control command message, combining `Lateral.msg` and `Longitudinal.msg`.
32+
33+
The message conveys the expectation for vehicle's combined control state to be in the given configuration in the time point: `control_time`.
34+
35+
If the `control_time` is defined, the `control_time` field in the `lateral` and `longitudinal` fields are ignored.
36+
37+
### ControlHorizon.msg
38+
39+
Defines a control commands array calculated for a future horizon.
40+
41+
- Control messages are ordered from near to far future `[0 to N)` with `time_step_ms` increments.
42+
- First element of the array contains the control signals at the `control_time` of this message.
43+
- The `control_time` field in each element of the controls array can be ignored.

autoware_control_msgs/msg/Control.msg

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Control message with lateral and longitudinal components
2+
3+
# Time this message was created
4+
builtin_interfaces/Time stamp
5+
6+
# Time this configuration state is expected to be achieved in (optional)
7+
builtin_interfaces/Time control_time
8+
9+
# Lateral control command
10+
Lateral lateral
11+
12+
# Longitudinal control command
13+
Longitudinal longitudinal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Control messages calculated for a future horizon
2+
#
3+
# Control messages are ordered from near to far future [0 to N) with time_step_ms increments.
4+
#
5+
# First element of the array contains the control signals at the control_time of this message.
6+
#
7+
# The control_time field in each element of the controls array can be ignored.
8+
9+
# Time this message was created
10+
builtin_interfaces/Time stamp
11+
12+
# Time when controls[0] configuration state is expected to be achieved in
13+
builtin_interfaces/Time control_time
14+
15+
# Time difference between consecutive elements of the controls array in milliseconds
16+
float32 time_step_ms
17+
18+
Control[] controls

autoware_control_msgs/msg/Lateral.msg

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Lateral control message for Ackermann-style platforms
2+
#
3+
# Note regarding tires: If the platform has multiple steering tires, the commands
4+
# given here are for a virtual tire at the average lateral position of the steering tires.
5+
#
6+
# Look up Ackermann Bicycle Model for more details
7+
#
8+
# Positive values represents left inclination (if forward)
9+
# Negative values represents right inclination (if forward)
10+
11+
# Time this message was created
12+
builtin_interfaces/Time stamp
13+
14+
# Time this configuration state is expected to be achieved in (optional)
15+
builtin_interfaces/Time control_time
16+
17+
# Desired angle of the steering tire in rad (radians)
18+
float32 steering_tire_angle
19+
20+
# Desired rate of change of the steering tire angle in rad/s
21+
float32 steering_tire_rotation_rate
22+
23+
# Controller has filled in the steering_tire_rotation_rate value
24+
bool is_defined_steering_tire_rotation_rate
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Longitudinal control message
2+
#
3+
# Values are in the base_link frame in X axis
4+
#
5+
# Positive values represent forward motion (+X)
6+
# Negative values represent backward motion (-X)
7+
8+
# Time this message was created
9+
builtin_interfaces/Time stamp
10+
11+
# Time this configuration state is expected to be achieved in (optional)
12+
builtin_interfaces/Time control_time
13+
14+
# Desired vehicle velocity in in m/s
15+
float32 velocity
16+
17+
# Desired vehicle acceleration in m/s²
18+
float32 acceleration
19+
20+
# Desired vehicle jerk in m/s³
21+
float32 jerk
22+
23+
# Controller has filled in the acceleration value
24+
bool is_defined_acceleration
25+
26+
# Controller has filled in the jerk value
27+
bool is_defined_jerk

autoware_control_msgs/package.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>autoware_control_msgs</name>
5+
<version>1.0.0</version>
6+
<description>Autoware control messages package.</description>
7+
8+
<maintainer email="[email protected]">M. Fatih Cırıt</maintainer>
9+
10+
<license>Apache License 2.0</license>
11+
12+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
13+
<buildtool_depend>rosidl_default_generators</buildtool_depend>
14+
15+
<depend>builtin_interfaces</depend>
16+
17+
<exec_depend>rosidl_default_runtime</exec_depend>
18+
19+
<test_depend>ament_lint_auto</test_depend>
20+
<test_depend>ament_lint_common</test_depend>
21+
22+
<member_of_group>rosidl_interface_packages</member_of_group>
23+
24+
<export>
25+
<build_type>ament_cmake</build_type>
26+
</export>
27+
</package>

build_depends.repos

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
repositories:

0 commit comments

Comments
 (0)