15 #ifndef TRAFFIC_SIMULATOR__ENTITY__ENTITY_MANAGER_HPP_
16 #define TRAFFIC_SIMULATOR__ENTITY__ENTITY_MANAGER_HPP_
18 #include <tf2/LinearMath/Quaternion.h>
19 #include <tf2_ros/static_transform_broadcaster.h>
20 #include <tf2_ros/transform_broadcaster.h>
22 #include <autoware_perception_msgs/msg/traffic_signal_array.hpp>
25 #include <rclcpp/node_interfaces/get_node_topics_interface.hpp>
26 #include <rclcpp/node_interfaces/node_topics_interface.hpp>
27 #include <rclcpp/rclcpp.hpp>
31 #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
46 #include <traffic_simulator_msgs/msg/behavior_parameter.hpp>
47 #include <traffic_simulator_msgs/msg/bounding_box.hpp>
48 #include <traffic_simulator_msgs/msg/entity_status_with_trajectory_array.hpp>
49 #include <traffic_simulator_msgs/msg/traffic_light_array_v1.hpp>
50 #include <traffic_simulator_msgs/msg/vehicle_parameters.hpp>
51 #include <type_traits>
52 #include <unordered_map>
55 #include <visualization_msgs/msg/marker_array.hpp>
64 explicit LaneletMarkerQoS(std::size_t depth = 1) : rclcpp::QoS(depth) { transient_local(); }
77 std::shared_ptr<rclcpp::node_interfaces::NodeTopicsInterface> node_topics_interface;
78 const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr node_parameters_;
80 tf2_ros::StaticTransformBroadcaster broadcaster_;
81 tf2_ros::TransformBroadcaster base_link_broadcaster_;
83 const rclcpp::Clock::SharedPtr clock_ptr_;
85 std::unordered_map<std::string, std::shared_ptr<traffic_simulator::entity::EntityBase>> entities_;
91 bool npc_logic_started_;
93 using EntityStatusWithTrajectoryArray =
94 traffic_simulator_msgs::msg::EntityStatusWithTrajectoryArray;
95 const rclcpp::Publisher<EntityStatusWithTrajectoryArray>::SharedPtr entity_status_array_pub_ptr_;
97 using MarkerArray = visualization_msgs::msg::MarkerArray;
98 const rclcpp::Publisher<MarkerArray>::SharedPtr lanelet_marker_pub_ptr_;
100 const std::shared_ptr<hdmap_utils::HdMapUtils> hdmap_utils_ptr_;
102 MarkerArray markers_raw_;
104 const std::shared_ptr<TrafficLightManager> conventional_traffic_light_manager_ptr_;
105 const std::shared_ptr<TrafficLightMarkerPublisher>
106 conventional_traffic_light_marker_publisher_ptr_;
107 const std::shared_ptr<TrafficLightPublisherBase>
108 conventional_backward_compatible_traffic_light_publisher_ptr_;
109 const std::shared_ptr<TrafficLightManager> v2i_traffic_light_manager_ptr_;
110 const std::shared_ptr<TrafficLightMarkerPublisher> v2i_traffic_light_marker_publisher_ptr_;
111 const std::shared_ptr<TrafficLightPublisherBase> v2i_traffic_light_legacy_topic_publisher_ptr_;
112 const std::shared_ptr<TrafficLightPublisherBase> v2i_traffic_light_publisher_ptr_;
116 template <
typename Node>
119 geographic_msgs::msg::GeoPoint origin;
121 if (!node.has_parameter(
"origin_latitude")) {
122 node.declare_parameter(
"origin_latitude", 0.0);
124 if (!node.has_parameter(
"origin_longitude")) {
125 node.declare_parameter(
"origin_longitude", 0.0);
127 node.get_parameter(
"origin_latitude", origin.latitude);
128 node.get_parameter(
"origin_longitude", origin.longitude);
134 template <
typename... Ts>
137 if (
const auto architecture_type =
138 getParameter<std::string>(node_parameters_,
"architecture_type",
"awf/universe");
139 architecture_type.find(
"awf/universe") != std::string::npos) {
140 return std::make_shared<
142 std::forward<decltype(xs)>(
xs)...);
145 "Unexpected architecture_type ", std::quoted(architecture_type),
146 " given for V2I traffic lights simulation.");
150 template <
class NodeT,
class AllocatorT = std::allocator<
void>>
153 const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr & node_parameters)
154 : configuration(configuration),
155 node_topics_interface(rclcpp::node_interfaces::get_node_topics_interface(node)),
156 node_parameters_(node_parameters),
158 base_link_broadcaster_(node),
159 clock_ptr_(node->get_clock()),
160 current_time_(
std::numeric_limits<double>::quiet_NaN()),
161 npc_logic_started_(false),
162 entity_status_array_pub_ptr_(rclcpp::create_publisher<EntityStatusWithTrajectoryArray>(
164 rclcpp::PublisherOptionsWithAllocator<AllocatorT>())),
165 lanelet_marker_pub_ptr_(rclcpp::create_publisher<MarkerArray>(
167 rclcpp::PublisherOptionsWithAllocator<AllocatorT>())),
169 configuration.lanelet2_map_path(),
getOrigin(*node))),
170 markers_raw_(hdmap_utils_ptr_->generateMarker()),
171 conventional_traffic_light_manager_ptr_(
173 conventional_traffic_light_marker_publisher_ptr_(
175 conventional_backward_compatible_traffic_light_publisher_ptr_(
177 "/simulation/traffic_lights", node, hdmap_utils_ptr_)),
179 v2i_traffic_light_marker_publisher_ptr_(
181 v2i_traffic_light_legacy_topic_publisher_ptr_(
184 "/perception/traffic_light_recognition/external/traffic_signals", node, hdmap_utils_ptr_)),
185 v2i_traffic_light_updater_(
188 v2i_traffic_light_marker_publisher_ptr_->publish();
189 v2i_traffic_light_publisher_ptr_->publish(
190 clock_ptr_->now(), v2i_traffic_light_manager_ptr_->generateUpdateTrafficLightsRequest());
191 v2i_traffic_light_legacy_topic_publisher_ptr_->publish(
192 clock_ptr_->now(), v2i_traffic_light_manager_ptr_->generateUpdateTrafficLightsRequest());
194 conventional_traffic_light_updater_(node, [
this]() {
195 conventional_traffic_light_marker_publisher_ptr_->publish();
196 conventional_backward_compatible_traffic_light_publisher_ptr_->publish(
198 conventional_traffic_light_manager_ptr_->generateUpdateTrafficLightsRequest());
207 #define FORWARD_GETTER_TO_TRAFFIC_LIGHT_MANAGER(NAME) \
208 template <typename... Ts> \
209 decltype(auto) getConventional##NAME(Ts &&... xs) const \
211 return conventional_traffic_light_manager_ptr_->get##NAME(xs...); \
213 static_assert(true, ""); \
214 template <typename... Ts> \
215 decltype(auto) getV2I##NAME(Ts &&... xs) const \
217 return v2i_traffic_light_manager_ptr_->get##NAME(xs...); \
219 static_assert(true, "")
224 #undef FORWARD_GETTER_TO_TRAFFIC_LIGHT_MANAGER
228 return conventional_traffic_light_manager_ptr_->generateUpdateTrafficLightsRequest();
243 for (
auto & traffic_light : conventional_traffic_light_manager_ptr_->getTrafficLights(
id)) {
244 traffic_light.get().confidence = confidence;
249 #define FORWARD_TO_HDMAP_UTILS(NAME) \
255 template <typename... Ts> \
256 decltype(auto) NAME(Ts &&... xs) const \
258 return hdmap_utils_ptr_->NAME(std::forward<decltype(xs)>(xs)...); \
260 static_assert(true, "")
267 #undef FORWARD_TO_HDMAP_UTILS
270 #define FORWARD_TO_ENTITY(IDENTIFIER, ...) \
276 template <typename... Ts> \
277 decltype(auto) IDENTIFIER(const std::string & name, Ts &&... xs) __VA_ARGS__ \
279 return entities_.at(name)->IDENTIFIER(std::forward<decltype(xs)>(xs)...); \
280 } catch (const std::out_of_range &) { \
281 THROW_SEMANTIC_ERROR("entity : ", name, "does not exist"); \
283 static_assert(true, "")
330 #undef FORWARD_TO_ENTITY
349 const bool continuous);
356 const geometry_msgs::msg::PoseStamped & pose,
const bool static_transform =
true);
378 ->
std::optional<traffic_simulator_msgs::msg::Obstacle>;
381 -> const traffic_simulator_msgs::msg::PedestrianParameters &;
386 -> const traffic_simulator_msgs::msg::VehicleParameters &;
388 auto
getWaypoints(const
std::
string & name) -> traffic_simulator_msgs::msg::WaypointsArray;
390 template <typename T>
394 if (not npc_logic_started_) {
397 return entities_.at(name)->getGoalPoses();
400 if (not npc_logic_started_) {
403 std::vector<geometry_msgs::msg::Pose> poses;
404 for (
const auto & lanelet_pose : getGoalPoses<CanonicalizedLaneletPose>(name)) {
412 template <
typename EntityType>
415 return dynamic_cast<EntityType
const *
>(entities_.at(name).get()) !=
nullptr;
443 template <
typename Entity,
typename Pose,
typename Parameters,
typename... Ts>
445 const std::string & name,
const Pose & pose,
const Parameters & parameters, Ts &&...
xs)
450 if constexpr (std::is_same_v<std::decay_t<Entity>, EgoEntity>) {
451 if (
auto iter = std::find_if(
452 std::begin(entities_), std::end(entities_),
453 [
this](
auto && each) {
return is<EgoEntity>(each.first); });
454 iter != std::end(entities_)) {
457 entity_status.type.type = traffic_simulator_msgs::msg::EntityType::EGO;
459 }
else if constexpr (std::is_same_v<std::decay_t<Entity>, VehicleEntity>) {
460 entity_status.type.type = traffic_simulator_msgs::msg::EntityType::VEHICLE;
461 }
else if constexpr (std::is_same_v<std::decay_t<Entity>, PedestrianEntity>) {
462 entity_status.type.type = traffic_simulator_msgs::msg::EntityType::PEDESTRIAN;
464 entity_status.type.type = traffic_simulator_msgs::msg::EntityType::MISC_OBJECT;
467 entity_status.subtype = parameters.subtype;
471 entity_status.name = name;
473 entity_status.bounding_box = parameters.bounding_box;
475 entity_status.action_status = traffic_simulator_msgs::msg::ActionStatus();
476 entity_status.action_status.current_action =
"waiting for initialize";
478 if constexpr (std::is_same_v<std::decay_t<Pose>, CanonicalizedLaneletPose>) {
480 entity_status.lanelet_pose =
static_cast<LaneletPose>(pose);
481 entity_status.lanelet_pose_valid =
true;
485 pose, parameters.bounding_box,
486 entity_status.type.type == traffic_simulator_msgs::msg::EntityType::PEDESTRIAN ||
487 entity_status.type.type == traffic_simulator_msgs::msg::EntityType::MISC_OBJECT,
488 [](
const auto & parameters) {
489 if constexpr (std::is_same_v<
490 std::decay_t<Parameters>,
491 traffic_simulator_msgs::msg::VehicleParameters>) {
493 parameters.axles.front_axle.track_width,
494 parameters.axles.rear_axle.track_width) *
498 return parameters.bounding_box.dimensions.y * 0.5 + 1.0;
502 entity_status.lanelet_pose = *lanelet_pose;
503 entity_status.lanelet_pose_valid =
true;
505 if (getParameter<bool>(node_parameters_,
"consider_pose_by_road_slope",
false)) {
506 entity_status.pose = hdmap_utils_ptr_->toMapPose(*lanelet_pose).pose;
508 entity_status.pose = pose;
511 entity_status.lanelet_pose_valid =
false;
512 entity_status.pose = pose;
516 return CanonicalizedEntityStatus(entity_status, hdmap_utils_ptr_);
519 if (
const auto [iter, success] = entities_.emplace(
520 name, std::make_unique<Entity>(
522 std::forward<decltype(
xs)>(
xs)...));
525 iter->second->setTrafficLightManager(conventional_traffic_light_manager_ptr_);
526 if (npc_logic_started_ && not is<EgoEntity>(name)) {
535 auto toMapPose(
const CanonicalizedLaneletPose &)
const ->
const geometry_msgs::msg::Pose;
537 template <
typename MessageT,
typename... Args>
538 auto createPublisher(Args &&... args)
540 return rclcpp::create_publisher<MessageT>(node_topics_interface, std::forward<Args>(args)...);
543 template <
typename MessageT,
typename... Args>
544 auto createSubscription(Args &&... args)
546 return rclcpp::create_subscription<MessageT>(
547 node_topics_interface, std::forward<Args>(args)...);
550 void update(
const double current_time,
const double step_time);
552 void updateHdmapMarker();
554 void startNpcLogic(
const double current_time);
556 auto isNpcLogicStarted()
const {
return npc_logic_started_; }
Definition: configurable_rate_updater.hpp:24
auto resetUpdateRate(double update_rate) -> void
Definition: configurable_rate_updater.cpp:30
Definition: traffic_light_manager.hpp:34
Definition: traffic_light_marker_publisher.hpp:23
Definition: traffic_light_publisher.hpp:36
Definition: entity_base.hpp:51
Definition: entity_manager.hpp:74
auto getGoalPoses(const std::string &name) -> std::vector< T >
Definition: entity_manager.hpp:383
void resetBehaviorPlugin(const std::string &name, const std::string &behavior_plugin_name)
Reset behavior plugin of the target entity. The internal behavior is to take over the various paramet...
Definition: entity_manager.cpp:302
bool is(const std::string &name) const
Definition: entity_manager.hpp:405
decltype(auto) requestLaneChange(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestLaneChange function.
Definition: entity_manager.hpp:305
auto generateUpdateRequestForConventionalTrafficLights()
Definition: entity_manager.hpp:226
decltype(auto) getLaneletLength(Ts &&... xs) const
Forward to arguments to the HDMapUtils:: getLaneletLength function.
Definition: entity_manager.hpp:259
void updateHdmapMarker()
Definition: entity_manager.cpp:464
decltype(auto) getEntityTypename(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getEntityTypename function.
Definition: entity_manager.hpp:290
void broadcastEntityTransform()
Definition: entity_manager.cpp:40
decltype(auto) reachPosition(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: reachPosition function.
Definition: entity_manager.hpp:289
auto getStepTime() const noexcept -> double
Definition: entity_manager.cpp:228
decltype(auto) getBoundingBox(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getBoundingBox function.
Definition: entity_manager.hpp:282
auto resetV2ITrafficLightPublishRate(double rate) -> void
Definition: entity_manager.hpp:236
decltype(auto) requestAssignRoute(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestAssignRoute function.
Definition: entity_manager.hpp:303
decltype(auto) getCurrentAction(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getCurrentAction function.
Definition: entity_manager.hpp:284
decltype(auto) getDefaultMatchingDistanceForLaneletPoseCalculation(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getDefaultMatchingDistanceForLaneletPoseCalculation function...
Definition: entity_manager.hpp:286
decltype(auto) getEntityType(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getEntityType function.
Definition: entity_manager.hpp:288
decltype(auto) getTraveledDistance(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getTraveledDistance function.
Definition: entity_manager.hpp:297
decltype(auto) setLinearVelocity(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setLinearVelocity function.
Definition: entity_manager.hpp:317
bool despawnEntity(const std::string &name)
Definition: entity_manager.cpp:132
decltype(auto) getStandStillDuration(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getStandStillDuration function.
Definition: entity_manager.hpp:296
decltype(auto) getMapPoseFromRelativePose(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getMapPoseFromRelativePose function.
Definition: entity_manager.hpp:294
auto getEntityNames() const -> const std::vector< std::string >
Definition: entity_manager.cpp:144
auto toMapPose(const CanonicalizedLaneletPose &) const -> const geometry_msgs::msg::Pose
Definition: entity_manager.cpp:397
const std::string getEgoName() const
Definition: entity_manager.cpp:195
decltype(auto) setDecelerationLimit(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setDecelerationLimit function.
Definition: entity_manager.hpp:314
decltype(auto) setAccelerationRateLimit(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setAccelerationRateLimit function.
Definition: entity_manager.hpp:311
decltype(auto) requestFollowTrajectory(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestFollowTrajectory function.
Definition: entity_manager.hpp:304
decltype(auto) fillLaneletPose(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: fillLaneletPose function.
Definition: entity_manager.hpp:279
auto updateNpcLogic(const std::string &name) -> const CanonicalizedEntityStatus &
Definition: entity_manager.cpp:403
decltype(auto) getCurrentAccel(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getCurrentAccel function.
Definition: entity_manager.hpp:283
decltype(auto) requestAcquirePosition(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestAcquirePosition function.
Definition: entity_manager.hpp:302
void setVerbose(const bool verbose)
Definition: entity_manager.cpp:389
auto spawnEntity(const std::string &name, const Pose &pose, const Parameters ¶meters, Ts &&... xs)
Definition: entity_manager.hpp:436
decltype(auto) activateOutOfRangeJob(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: activateOutOfRangeJob function.
Definition: entity_manager.hpp:299
decltype(auto) setDecelerationRateLimit(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setDecelerationRateLimit function.
Definition: entity_manager.hpp:315
bool checkCollision(const std::string &name0, const std::string &name1)
Definition: entity_manager.cpp:116
bool isEgoSpawned() const
Definition: entity_manager.cpp:250
decltype(auto) toLaneletPose(Ts &&... xs) const
Forward to arguments to the HDMapUtils:: toLaneletPose function.
Definition: entity_manager.hpp:260
auto getCurrentTime() const noexcept -> double
Definition: entity_manager.cpp:142
decltype(auto) getEntityStatusBeforeUpdate(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getEntityStatusBeforeUpdate function.
Definition: entity_manager.hpp:287
decltype(auto) isControlledBySimulator(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: isControlledBySimulator function.
Definition: entity_manager.hpp:301
decltype(auto) getLaneletPose(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getLaneletPose function.
Definition: entity_manager.hpp:291
decltype(auto) getLinearJerk(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getLinearJerk function.
Definition: entity_manager.hpp:292
decltype(auto) setAcceleration(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setAcceleration function.
Definition: entity_manager.hpp:309
decltype(auto) requestClearRoute(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestClearRoute function.
Definition: entity_manager.hpp:308
bool entityExists(const std::string &name)
Definition: entity_manager.cpp:137
auto getWaypoints(const std::string &name) -> traffic_simulator_msgs::msg::WaypointsArray
Definition: entity_manager.cpp:241
decltype(auto) getBehaviorParameter(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getBehaviorParameter function.
Definition: entity_manager.hpp:281
auto getEntityStatus(const std::string &name) const -> CanonicalizedEntityStatus
Definition: entity_manager.cpp:170
bool trafficLightsChanged()
Definition: entity_manager.cpp:332
decltype(auto) getRouteLanelets(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getRouteLanelets function.
Definition: entity_manager.hpp:295
decltype(auto) setMapPose(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setMapPose function.
Definition: entity_manager.hpp:318
decltype(auto) get2DPolygon(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: get2DPolygon function.
Definition: entity_manager.hpp:280
decltype(auto) requestWalkStraight(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestWalkStraight function.
Definition: entity_manager.hpp:307
decltype(auto) setLinearJerk(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setLinearJerk function.
Definition: entity_manager.hpp:316
decltype(auto) getMapPose(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getMapPose function.
Definition: entity_manager.hpp:293
auto setEntityStatus(const std::string &name, const CanonicalizedEntityStatus &) -> void
Definition: entity_manager.cpp:377
decltype(auto) requestSynchronize(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: requestSynchronize function.
Definition: entity_manager.hpp:306
decltype(auto) setAccelerationLimit(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setAccelerationLimit function.
Definition: entity_manager.hpp:310
EntityManager(NodeT &&node, const Configuration &configuration, const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &node_parameters)
Definition: entity_manager.hpp:151
auto getHdmapUtils() -> const std::shared_ptr< hdmap_utils::HdMapUtils > &
Definition: entity_manager.cpp:183
auto getPedestrianParameters(const std::string &name) const -> const traffic_simulator_msgs::msg::PedestrianParameters &
Definition: entity_manager.cpp:217
auto getOrigin(Node &node) const
Definition: entity_manager.hpp:117
bool isInLanelet(const std::string &name, const lanelet::Id lanelet_id, const double tolerance)
Definition: entity_manager.cpp:260
decltype(auto) setBehaviorParameter(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setBehaviorParameter function.
Definition: entity_manager.hpp:312
void broadcastTransform(const geometry_msgs::msg::PoseStamped &pose, const bool static_transform=true)
Definition: entity_manager.cpp:95
auto getEntity(const std::string &name) const -> std::shared_ptr< traffic_simulator::entity::EntityBase >
Definition: entity_manager.cpp:153
visualization_msgs::msg::MarkerArray makeDebugMarker() const
Definition: entity_manager.cpp:123
auto getVehicleParameters(const std::string &name) const -> const traffic_simulator_msgs::msg::VehicleParameters &
Definition: entity_manager.cpp:230
auto setConventionalTrafficLightConfidence(lanelet::Id id, double confidence) -> void
Definition: entity_manager.hpp:241
auto resetConventionalTrafficLightPublishRate(double rate) -> void
Definition: entity_manager.hpp:231
decltype(auto) laneMatchingSucceed(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: laneMatchingSucceed function.
Definition: entity_manager.hpp:298
void requestSpeedChange(const std::string &name, double target_speed, bool continuous)
Definition: entity_manager.cpp:338
decltype(auto) getCurrentTwist(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: getCurrentTwist function.
Definition: entity_manager.hpp:285
decltype(auto) setVelocityLimit(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setVelocityLimit function.
Definition: entity_manager.hpp:320
auto getObstacle(const std::string &name) -> std::optional< traffic_simulator_msgs::msg::Obstacle >
Definition: entity_manager.cpp:208
decltype(auto) setControlledBySimulator(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setControlledBySimulator function.
Definition: entity_manager.hpp:313
auto makeV2ITrafficLightPublisher(Ts &&... xs) -> std::shared_ptr< TrafficLightPublisherBase >
Definition: entity_manager.hpp:135
decltype(auto) asFieldOperatorApplication(const std::string &name, Ts &&... xs) const
Forward to arguments to the EntityBase:: asFieldOperatorApplication function.
Definition: entity_manager.hpp:278
auto getNumberOfEgo() const -> std::size_t
Definition: entity_manager.cpp:188
decltype(auto) setTwist(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: setTwist function.
Definition: entity_manager.hpp:319
decltype(auto) cancelRequest(const std::string &name, Ts &&... xs)
Forward to arguments to the EntityBase:: cancelRequest function.
Definition: entity_manager.hpp:300
bool isStopping(const std::string &name) const
Definition: entity_manager.cpp:285
Definition: entity_manager.hpp:68
EntityMarkerQoS(std::size_t depth=100)
Definition: entity_manager.hpp:70
Definition: entity_manager.hpp:62
LaneletMarkerQoS(std::size_t depth=1)
Definition: entity_manager.hpp:64
Definition: entity_status.hpp:29
Definition: lanelet_pose.hpp:27
#define THROW_SEMANTIC_ERROR(...)
Definition: exception.hpp:59
#define FORWARD_TO_ENTITY(IDENTIFIER,...)
Definition: entity_manager.hpp:266
#define FORWARD_GETTER_TO_TRAFFIC_LIGHT_MANAGER(NAME)
Definition: entity_manager.hpp:207
#define FORWARD_TO_HDMAP_UTILS(NAME)
Definition: entity_manager.hpp:249
auto makeEntityStatus(std::shared_ptr< hdmap_utils::HdMapUtils > hdmap_utils, traffic_simulator::lanelet_pose::CanonicalizedLaneletPose pose, traffic_simulator_msgs::msg::BoundingBox bbox, const double speed=0.0, const std::string name="default_entity_name", const uint8_t type=traffic_simulator_msgs::msg::EntityType::VEHICLE) -> traffic_simulator::EntityStatus
Definition: helper_functions.hpp:82
Direction
Definition: lane_change.hpp:29
auto toMapPose(const CanonicalizedLaneletPose &lanelet_pose) -> const geometry_msgs::msg::Pose
Definition: pose.cpp:53
Transition
Definition: speed_change.hpp:26
traffic_simulator_msgs::msg::LaneletPose LaneletPose
Definition: lanelet_pose.hpp:22
traffic_simulator_msgs::msg::EntityStatus EntityStatus
Definition: entity_status.hpp:24
Definition: junit5.hpp:25
std::string string
Definition: junit5.hpp:26
Although there were no syntactic errors in the description of the scenario, differences in meaning an...
Definition: exception.hpp:44
Definition: configuration.hpp:30
Definition: traffic_light.hpp:40
Definition: speed_change.hpp:35
Definition: speed_change.hpp:51
class definition of the traffic sink