Interface
commonroad_control.planning_converter.planning_converter_interface
PlanningConverterInterface
Bases: ABC
Source code in commonroad_control/planning_converter/planning_converter_interface.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
db_factory
property
Returns:
| Type | Description |
|---|---|
Union[DBSIDTFactory, DBSIDTFactory, Any]
|
controller state factory |
kb_factory
property
Returns:
| Type | Description |
|---|---|
Union[KBSIDTFactory, DBSIDTFactory, Any]
|
planner state factory |
vehicle_params
property
Returns:
| Type | Description |
|---|---|
Union[BMW3seriesParams, Any]
|
vehicle parameters |
__init__(kb_factory, db_factory, vehicle_params, *args, **kwargs)
Interface for the planner converter. The converter converts planner states to and from controller states.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kb_factory
|
Union[KBSIDTFactory, Any]
|
factory for kinematic single track states and inputs |
required |
db_factory
|
Union[DBSIDTFactory, Any]
|
factory for dynamic single track states and inputs |
required |
vehicle_params
|
Union[BMW3seriesParams, Any]
|
vehicle parameters |
required |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
sample_c2p_db(db_state, time_step, mode)
abstractmethod
Convert dynamic bicycle state or input to planner state or input at time step
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_state
|
DBState
|
Dynamic bicycle state or input |
required |
time_step
|
int
|
time step |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
Any
|
planner state or input |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
sample_c2p_kb(kb_state, mode, time_step)
abstractmethod
Converts kinematic bicycle state or input to planner state or input time step
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kb_state
|
KBState
|
kinematic bicycle state |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
time_step
|
int
|
time step |
required |
Returns:
| Type | Description |
|---|---|
Any
|
planner state or input |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
103 104 105 106 107 108 109 110 111 112 | |
sample_p2c_db(planner_state, mode)
abstractmethod
Convert planner state or input to dynamic bicycle state or input
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planner_state
|
Any
|
planner state or input |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
Union[DBState, DBInput]
|
DBState or DBInput |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
135 136 137 138 139 140 141 142 143 | |
sample_p2c_kb(planner_state, mode)
abstractmethod
Convert planner state or input to kinematic bicycle state or input
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planner_state
|
Any
|
planner state or input |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
Union[KBState, KBInput]
|
Kinematic bicycle state or input |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
89 90 91 92 93 94 95 96 97 98 99 100 101 | |
trajectory_c2p_db(db_traj, mode)
abstractmethod
Convert planner state or input to dynamic state or input
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_traj
|
DBTrajectory
|
Dynamic bicycle trajectory |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Planner trajectory |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
125 126 127 128 129 130 131 132 133 | |
trajectory_c2p_kb(kb_traj, mode)
abstractmethod
Generate planner trajectory from kinematic bicycle trajectory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kb_traj
|
KBTrajectory
|
Kinematic bicycle trajectory |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
Any
|
planner trajectory |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
79 80 81 82 83 84 85 86 87 | |
trajectory_p2c_db(planner_traj, mode)
abstractmethod
Generate dynamic bicycle trajectory from planner trajectory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planner_traj
|
Any
|
planner trajectory |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
Returns:
| Type | Description |
|---|---|
DBTrajectory
|
Dynamic bicycle trajectory |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
115 116 117 118 119 120 121 122 123 | |
trajectory_p2c_kb(planner_traj, mode, t_0, dt)
abstractmethod
Generate Kinematic bicycle state or input trajectory from planner
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planner_traj
|
Any
|
planner trajectory |
required |
mode
|
TrajectoryMode
|
state or input mode |
required |
t_0
|
float
|
initial time |
required |
dt
|
float
|
time step size |
required |
Returns:
| Type | Description |
|---|---|
KBTrajectory
|
KBTrajectory |
Source code in commonroad_control/planning_converter/planning_converter_interface.py
66 67 68 69 70 71 72 73 74 75 76 | |