delphyne
|
IDMController implements the IDM (Intelligent Driver Model) planner, computed based only on the nearest car ahead.
See IdmPlanner and PoseSelector for details. The output of this block is an acceleration value passed as a command to the vehicle.
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library.
Input Port 0: PoseVector for the ego car. (InputPort getter: ego_pose_input())
Input Port 1: FrameVelocity of the ego car. (InputPort getter: ego_velocity_input())
Input Port 2: PoseBundle for the traffic cars, possibly inclusive of the ego car's pose. (InputPort getter: traffic_input())
Output Port 0: A BasicVector containing the acceleration request. (OutputPort getter: acceleration_output())
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library.
#include <src/systems/idm_controller.h>
Public Member Functions | |
IDMController (const maliput::api::RoadGeometry &road, ScanStrategy path_or_branches, RoadPositionStrategy road_position_strategy, double period_sec) | |
Constructor. More... | |
template<typename U > | |
IDMController (const IDMController< U > &other) | |
Scalar-converting copy constructor. More... | |
~IDMController () override | |
const drake::systems::InputPort< T > & | ego_pose_input () const |
See the class description for details on the following input ports. More... | |
const drake::systems::InputPort< T > & | ego_velocity_input () const |
const drake::systems::InputPort< T > & | traffic_input () const |
const drake::systems::OutputPort< T > & | acceleration_output () const |
Protected Member Functions | |
const maliput::api::RoadGeometry & | road () const |
int | ego_pose_index () const |
int | ego_velocity_index () const |
int | traffic_index () const |
int | acceleration_index () const |
void | ImplCalcAcceleration (const drake::systems::rendering::PoseVector< T > &ego_pose, const drake::systems::rendering::FrameVelocity< T > &ego_velocity, const drake::systems::rendering::PoseBundle< T > &traffic_poses, const IdmPlannerParameters< T > &idm_params, const maliput::api::RoadPosition &ego_rp, drake::systems::BasicVector< T > *command) const |
void | DoCalcUnrestrictedUpdate (const drake::systems::Context< T > &context, const std::vector< const drake::systems::UnrestrictedUpdateEvent< T > * > &, drake::systems::State< T > *state) const override |
Friends | |
template<typename > | |
class | IDMController |
IDMController | ( | const maliput::api::RoadGeometry & | road, |
ScanStrategy | path_or_branches, | ||
RoadPositionStrategy | road_position_strategy, | ||
double | period_sec | ||
) |
Constructor.
road | The pre-defined RoadGeometry. |
path_or_branches | If ScanStrategy::kBranches, performs IDM computations using vehicles detected in confluent branches; if ScanStrategy::kPath, limits to vehicles on the default path. See documentation for PoseSelector::FindSingleClosestPose(). |
road_position_strategy | Determines whether or not to cache RoadPosition. See calc_ongoing_road_position.h . |
period_sec | The update period to use if road_position_strategy == RoadPositionStrategy::kCache. |
|
explicit |
Scalar-converting copy constructor.
|
override |
|
protected |
const drake::systems::OutputPort< T > & acceleration_output |
|
overrideprotected |
|
protected |
const drake::systems::InputPort< T > & ego_pose_input |
See the class description for details on the following input ports.
|
protected |
const drake::systems::InputPort< T > & ego_velocity_input |
|
protected |
|
protected |
|
protected |
const drake::systems::InputPort< T > & traffic_input |
|
friend |