scenario_simulator_v2 C++ API
Public Member Functions | Public Attributes | List of all members
vehicle_simulation::EgoEntitySimulation Class Reference

#include <ego_entity_simulation.hpp>

Public Member Functions

auto calculateAccelerationBySlope () const -> double
 
auto setAutowareStatus () -> void
 
 EgoEntitySimulation (const traffic_simulator_msgs::msg::EntityStatus &, const traffic_simulator_msgs::msg::VehicleParameters &, double, const std::shared_ptr< hdmap_utils::HdMapUtils > &, const rclcpp::Parameter &use_sim_time, const bool consider_acceleration_by_road_slope)
 
auto overwrite (const traffic_simulator_msgs::msg::EntityStatus &status, const double current_time, const double step_time, bool is_npc_logic_started) -> void
 
auto update (const double current_time, const double step_time, const bool is_npc_logic_started) -> void
 
auto requestSpeedChange (double value) -> void
 
auto getStatus () const -> const traffic_simulator_msgs::msg::EntityStatus
 
auto setStatus (const traffic_simulator_msgs::msg::EntityStatus &status) -> void
 
auto updateStatus (const double current_time, const double step_time) -> void
 

Public Attributes

const std::unique_ptr< concealer::AutowareUniverseautoware
 
const std::shared_ptr< hdmap_utils::HdMapUtilshdmap_utils_ptr_
 
const traffic_simulator_msgs::msg::VehicleParameters vehicle_parameters
 

Constructor & Destructor Documentation

◆ EgoEntitySimulation()

vehicle_simulation::EgoEntitySimulation::EgoEntitySimulation ( const traffic_simulator_msgs::msg::EntityStatus initial_status,
const traffic_simulator_msgs::msg::VehicleParameters &  parameters,
double  step_time,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils,
const rclcpp::Parameter &  use_sim_time,
const bool  consider_acceleration_by_road_slope 
)
explicit

Member Function Documentation

◆ calculateAccelerationBySlope()

auto vehicle_simulation::EgoEntitySimulation::calculateAccelerationBySlope ( ) const -> double

◆ getStatus()

auto vehicle_simulation::EgoEntitySimulation::getStatus ( ) const -> const traffic_simulator_msgs::msg::EntityStatus

◆ overwrite()

auto vehicle_simulation::EgoEntitySimulation::overwrite ( const traffic_simulator_msgs::msg::EntityStatus status,
const double  current_time,
const double  step_time,
bool  is_npc_logic_started 
) -> void

◆ requestSpeedChange()

void vehicle_simulation::EgoEntitySimulation::requestSpeedChange ( double  value) -> void

◆ setAutowareStatus()

auto vehicle_simulation::EgoEntitySimulation::setAutowareStatus ( ) -> void

◆ setStatus()

auto vehicle_simulation::EgoEntitySimulation::setStatus ( const traffic_simulator_msgs::msg::EntityStatus status) -> void
Note
The lanelet matching algorithm should be equivalent to the one used in EgoEntity::setStatus
The offset value has been increased to 1.5 because a value of 1.0 was often insufficient when changing lanes. ( @Hans_Robo )
Ego uses the unique_route_lanelets get from Autoware, instead of the current lanelet_id value from EntityStatus, therefore canonicalization has to be done in advance, not inside CanonicalizedEntityStatus

◆ update()

void vehicle_simulation::EgoEntitySimulation::update ( const double  current_time,
const double  step_time,
const bool  is_npc_logic_started 
) -> void

◆ updateStatus()

auto vehicle_simulation::EgoEntitySimulation::updateStatus ( const double  current_time,
const double  step_time 
) -> void

Member Data Documentation

◆ autoware

const std::unique_ptr<concealer::AutowareUniverse> vehicle_simulation::EgoEntitySimulation::autoware

◆ hdmap_utils_ptr_

const std::shared_ptr<hdmap_utils::HdMapUtils> vehicle_simulation::EgoEntitySimulation::hdmap_utils_ptr_

◆ vehicle_parameters

const traffic_simulator_msgs::msg::VehicleParameters vehicle_simulation::EgoEntitySimulation::vehicle_parameters

The documentation for this class was generated from the following files: