15 #ifndef TRAFFIC_SIMULATOR__ENTITY__EGO_ENTITY_HPP_
16 #define TRAFFIC_SIMULATOR__ENTITY__EGO_ENTITY_HPP_
19 #include <autoware_auto_system_msgs/msg/emergency_state.hpp>
20 #include <boost/filesystem.hpp>
29 #include <traffic_simulator_msgs/msg/entity_type.hpp>
38 const std::unique_ptr<concealer::FieldOperatorApplication> field_operator_application;
40 static auto makeFieldOperatorApplication(
41 const Configuration &,
const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &)
42 -> std::unique_ptr<concealer::FieldOperatorApplication>;
44 bool is_controlled_by_simulator_{
false};
45 std::optional<double> target_speed_;
46 traffic_simulator_msgs::msg::BehaviorParameter behavior_parameter_;
47 std::shared_ptr<traffic_simulator_msgs::msg::PolylineTrajectory> polyline_trajectory_;
54 const std::shared_ptr<hdmap_utils::HdMapUtils> &,
55 const traffic_simulator_msgs::msg::VehicleParameters &,
const Configuration &,
56 const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &);
75 -> const traffic_simulator_msgs::msg::DynamicConstraints & override;
83 auto
getObstacle() ->
std::optional<traffic_simulator_msgs::msg::Obstacle> override;
87 auto
getWaypoints() -> const traffic_simulator_msgs::msg::WaypointsArray override;
91 void onUpdate(
double current_time,
double step_time) override;
102 const
std::shared_ptr<traffic_simulator_msgs::msg::PolylineTrajectory> &) ->
void override;
109 const
double, const speed_change::
Transition, const speed_change::Constraint,
110 const
bool continuous) ->
void override;
113 const speed_change::RelativeTargetSpeed &, const speed_change::
Transition,
114 const speed_change::Constraint, const
bool continuous) ->
void override;
122 is_controlled_by_simulator_ = state;
135 auto setMapPose(
const geometry_msgs::msg::Pose & map_pose) ->
void override;
137 template <
typename... Ts>
142 "You cannot set entity status to the ego vehicle named ", std::quoted(
status_->getName()),
143 " after starting scenario.");
Definition: ego_entity.hpp:37
auto getObstacle() -> std::optional< traffic_simulator_msgs::msg::Obstacle > override
Definition: ego_entity.cpp:109
auto setMapPose(const geometry_msgs::msg::Pose &map_pose) -> void override
Definition: ego_entity.cpp:297
void requestAssignRoute(const std::vector< CanonicalizedLaneletPose > &) override
Definition: ego_entity.cpp:182
void requestLaneChange(const lanelet::Id) override
Definition: ego_entity.cpp:227
void requestAcquirePosition(const CanonicalizedLaneletPose &) override
Definition: ego_entity.cpp:172
auto getWaypoints() -> const traffic_simulator_msgs::msg::WaypointsArray override
Definition: ego_entity.cpp:135
auto getEntityStatus(const double, const double) const -> const CanonicalizedEntityStatus
auto getCurrentPose() const -> const geometry_msgs::msg::Pose &
Definition: ego_entity.cpp:130
auto getDefaultDynamicConstraints() const -> const traffic_simulator_msgs::msg::DynamicConstraints &override
Definition: ego_entity.cpp:261
~EgoEntity() override=default
auto setStatus(Ts &&... xs)
Definition: ego_entity.hpp:138
auto asFieldOperatorApplication() const -> concealer::FieldOperatorApplication &override
Definition: ego_entity.cpp:83
void requestClearRoute() override
Definition: ego_entity.cpp:259
auto updateFieldOperatorApplication() const -> void
Definition: ego_entity.cpp:140
void onUpdate(double current_time, double step_time) override
Definition: ego_entity.cpp:146
auto setControlledBySimulator(bool state) -> void override
Definition: ego_entity.hpp:120
auto getEntityTypename() const -> const std::string &override
Definition: ego_entity.cpp:103
auto requestFollowTrajectory(const std::shared_ptr< traffic_simulator_msgs::msg::PolylineTrajectory > &) -> void override
Definition: ego_entity.cpp:219
auto setVelocityLimit(double) -> void override
Definition: ego_entity.cpp:291
auto operator=(EgoEntity &&) -> EgoEntity &=delete
auto getCurrentAction() const -> std::string override
Definition: ego_entity.cpp:89
auto operator=(const EgoEntity &) -> EgoEntity &=delete
auto getRouteLanelets(double horizon=100) -> lanelet::Ids override
Definition: ego_entity.cpp:114
EgoEntity(const EgoEntity &)=delete
auto setBehaviorParameter(const traffic_simulator_msgs::msg::BehaviorParameter &) -> void override
Definition: ego_entity.cpp:267
EgoEntity(EgoEntity &&)=delete
auto getBehaviorParameter() const -> traffic_simulator_msgs::msg::BehaviorParameter override
Definition: ego_entity.cpp:95
auto requestSpeedChange(const double, const speed_change::Transition, const speed_change::Constraint, const bool continuous) -> void override
Definition: ego_entity.cpp:243
auto isControlledBySimulator() const -> bool override
Definition: ego_entity.cpp:217
virtual auto setStatus(const EntityStatus &status, const lanelet::Ids &lanelet_ids) -> void
Definition: entity_base.cpp:545
const std::string name
Definition: entity_base.hpp:255
std::shared_ptr< CanonicalizedEntityStatus > status_
Definition: entity_base.hpp:260
Definition: vehicle_entity.hpp:37
Definition: entity_status.hpp:32
Definition: lanelet_pose.hpp:27
#define THROW_SEMANTIC_ERROR(...)
Definition: exception.hpp:59
Definition: autoware.hpp:30
Transition
Definition: speed_change.hpp:26
Definition: junit5.hpp:25
std::string string
Definition: junit5.hpp:26
Definition: configuration.hpp:29
Definition: speed_change.hpp:51