Add vehicle_constants_manager package
Description
This package is expected to be the place to enter vehicle specific constants to the system.
AutowareArchitectureProposal.iv
Connection to the I've encountered this issue when I was trying to port the behavior_velocity_planner and realized Autoware.Auto didn't have a unified way of representing and distributing these parameters like vehicle_info_util did.
This issue is basically porting vehicle_info_util
from AutowareArchitectureProposal.iv
.
graph TD;
classDef Package fill:#FF9C9C;
classDef ROS2 fill:#CDFFF7;
classDef OtherPackage fill:#FDFFB3;
ndYamlFile[Yaml File]:::Package -- Primary Vehicle Constants --> ndNodeVCM[vehicle_constants_manager]:::Package;
ndNodeVCM -- Vehicle Constants --> ndRPS[ROS2 Parameter Server]:::ROS2;
ndRPS -- Vehicle Constants --> ndR[Random Node using `get_vehicle_constants` method]:::OtherPackage;
Purpose
Currently following packages require their parameters to be set separately in their corresponding parameter files:
- https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/planning/behavior_planner_nodes
- https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/planning/lane_planner_nodes
- https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/planning/object_collision_estimator_nodes
- https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/planning/parking_planner_nodes
- https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/tree/master/src/control/mpc_controller_nodes
These are some common parameters used by them:
vehicle:
cg_to_front_m: 1.228
cg_to_rear_m: 1.5618
front_corner_stiffness: 17000.0
rear_corner_stiffness: 20000.0
mass_kg: 1460.0
yaw_inertia_kgm2: 2170.0
width_m: 2.0
front_overhang_m: 0.5
rear_overhang_m: 0.5
These values don't change over time and they are specific to the vehicle. We shouldn't be entering these values to the nodes separately because someone could make a mistake and enter different values for different nodes.
Also there are ones that could be derived like ones from the vehicle_info_util from AutowareArchitectureProposal.iv
And there is no central place to pass these parameters to the nodes.
Desired Behavior
The nodes mentioned above (behavior_planner_nodes
,lane_planner_nodes
,object_collision_estimator_nodes
,parking_planner_nodes
, mpc_controller_nodes
) should require vehicle related constants from the parameter server in a unified manner.
vehicle_constants_manager
will have a params.yaml
file to let user enter the constants. Once it is launched, it will also calculate the desired derived parameters. And publish them under its namespace to the ROS2 parameter server.
We could also create
- a
VehicleConstants
struct
- and
get_vehicle_constants
method
under this package to make it easy for nodes to obtain the information they want. And if the values are not published to the server, it would return the required error/failure information.
Definition of Done
-
Create the barebones of the package -
Make package read primary constants from a params.yaml
file, declare them as parameters -
Create the derived constants -
Provide a get_vehicle_constants
method to let other nodes use -
Write tests -.- -
Document the code ---.--- -
Create an issue to modify other packages to use this package eventually