15 #ifndef SIMPLE_SENSOR_SIMULATOR__SIMPLE_SENSOR_SIMULATOR_HPP_
16 #define SIMPLE_SENSOR_SIMULATOR__SIMPLE_SENSOR_SIMULATOR_HPP_
18 #include <tf2/LinearMath/Quaternion.h>
19 #include <tf2_ros/transform_broadcaster.h>
21 #include <geographic_msgs/msg/geo_point.hpp>
22 #include <geometry_msgs/msg/pose_stamped.hpp>
23 #include <geometry_msgs/msg/transform_stamped.hpp>
26 #include <rclcpp/rclcpp.hpp>
35 #include <visualization_msgs/msg/marker_array.hpp>
43 #if defined _WIN32 || defined __CYGWIN__
45 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_EXPORT __attribute__((dllexport))
46 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_IMPORT __attribute__((dllimport))
48 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_EXPORT __declspec(dllexport)
49 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_IMPORT __declspec(dllimport)
51 #ifdef SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_BUILDING_DLL
52 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC \
53 SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_EXPORT
55 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC \
56 SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_IMPORT
58 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC_TYPE \
59 SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC
60 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_LOCAL
62 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_EXPORT \
63 __attribute__((visibility("default")))
64 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_IMPORT
66 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC \
67 __attribute__((visibility("default")))
68 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_LOCAL \
69 __attribute__((visibility("hidden")))
71 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC
72 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_LOCAL
74 #define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC_TYPE
92 auto initialize(
const simulation_api_schema::InitializeRequest &)
93 -> simulation_api_schema::InitializeResponse;
95 auto updateFrame(
const simulation_api_schema::UpdateFrameRequest &)
96 -> simulation_api_schema::UpdateFrameResponse;
98 auto updateStepTime(
const simulation_api_schema::UpdateStepTimeRequest &)
99 -> simulation_api_schema::UpdateStepTimeResponse;
101 auto updateEntityStatus(
const simulation_api_schema::UpdateEntityStatusRequest &)
102 -> simulation_api_schema::UpdateEntityStatusResponse;
104 auto spawnVehicleEntity(
const simulation_api_schema::SpawnVehicleEntityRequest &)
105 -> simulation_api_schema::SpawnVehicleEntityResponse;
107 template <
typename SpawnRequestType>
108 auto insertEntitySpawnedStatus(
109 const SpawnRequestType & spawn_request,
const traffic_simulator_msgs::EntityType::Enum & type,
110 const traffic_simulator_msgs::EntitySubtype::Enum & subtype) -> void;
112 auto spawnPedestrianEntity(
const simulation_api_schema::SpawnPedestrianEntityRequest &)
113 -> simulation_api_schema::SpawnPedestrianEntityResponse;
115 auto spawnMiscObjectEntity(
const simulation_api_schema::SpawnMiscObjectEntityRequest &)
116 -> simulation_api_schema::SpawnMiscObjectEntityResponse;
118 auto despawnEntity(
const simulation_api_schema::DespawnEntityRequest &)
119 -> simulation_api_schema::DespawnEntityResponse;
121 auto attachImuSensor(
const simulation_api_schema::AttachImuSensorRequest &)
122 -> simulation_api_schema::AttachImuSensorResponse;
124 auto attachDetectionSensor(
const simulation_api_schema::AttachDetectionSensorRequest &)
125 -> simulation_api_schema::AttachDetectionSensorResponse;
127 auto attachLidarSensor(
const simulation_api_schema::AttachLidarSensorRequest &)
128 -> simulation_api_schema::AttachLidarSensorResponse;
130 auto attachOccupancyGridSensor(
const simulation_api_schema::AttachOccupancyGridSensorRequest &)
131 -> simulation_api_schema::AttachOccupancyGridSensorResponse;
133 auto updateTrafficLights(
const simulation_api_schema::UpdateTrafficLightsRequest &)
134 -> simulation_api_schema::UpdateTrafficLightsResponse;
136 auto attachPseudoTrafficLightDetector(
137 const simulation_api_schema::AttachPseudoTrafficLightDetectorRequest &)
138 -> simulation_api_schema::AttachPseudoTrafficLightDetectorResponse;
142 std::vector<traffic_simulator_msgs::VehicleParameters> ego_vehicles_;
143 std::vector<traffic_simulator_msgs::VehicleParameters> vehicles_;
144 std::vector<traffic_simulator_msgs::PedestrianParameters> pedestrians_;
145 std::vector<traffic_simulator_msgs::MiscObjectParameters> misc_objects_;
146 double realtime_factor_;
148 double current_simulation_time_;
149 double current_scenario_time_;
150 rclcpp::Time current_ros_time_;
152 std::map<std::string, simulation_api_schema::EntityStatus> entity_status_;
153 simulation_api_schema::UpdateTrafficLightsRequest traffic_signals_states_;
156 std::shared_ptr<vehicle_simulation::EgoEntitySimulation> ego_entity_simulation_;
Definition: simple_sensor_simulator.hpp:83
~ScenarioSimulator()
Definition: simple_sensor_simulator.cpp:54
SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC ScenarioSimulator(const rclcpp::NodeOptions &options)
Definition: simple_sensor_simulator.cpp:31
Definition: sensor_simulation.hpp:45
Definition: zmq_multi_server.hpp:32
Definition: constants.hpp:19
traffic_simulator_msgs::msg::BoundingBox BoundingBox
Definition: lanelet_wrapper.hpp:65
std::string string
Definition: junit5.hpp:26
#define SIMPLE_SENSOR_SIMULATOR_SIMPLE_SENSOR_SIMULATOR_COMPONENT_PUBLIC
Definition: simple_sensor_simulator.hpp:71