23 #pragma warning(disable:4583) 24 #pragma warning(disable:4582) 25 #include <boost/variant2/variant.hpp> 28 #include <boost/variant2/variant.hpp> 33 namespace traffic_manager {
47 return Command{*
static_cast<const T *
>(
this)};
56 : description(
std::move(description)),
57 transform(transform) {}
59 : description(
std::move(description)),
66 MSGPACK_DEFINE_ARRAY(description, transform, parent, do_after);
74 MSGPACK_DEFINE_ARRAY(actor);
84 MSGPACK_DEFINE_ARRAY(actor, control);
94 MSGPACK_DEFINE_ARRAY(actor, control);
104 MSGPACK_DEFINE_ARRAY(actor, control);
111 physics_control(value) {}
114 MSGPACK_DEFINE_ARRAY(actor, physics_control);
124 MSGPACK_DEFINE_ARRAY(actor, transform);
134 MSGPACK_DEFINE_ARRAY(actor, location);
143 MSGPACK_DEFINE_ARRAY(actor, transform, speed);
153 MSGPACK_DEFINE_ARRAY(actor, velocity);
160 angular_velocity(value) {}
163 MSGPACK_DEFINE_ARRAY(actor, angular_velocity);
173 MSGPACK_DEFINE_ARRAY(actor, impulse);
183 MSGPACK_DEFINE_ARRAY(actor, force);
193 MSGPACK_DEFINE_ARRAY(actor, impulse);
203 MSGPACK_DEFINE_ARRAY(actor, torque);
213 MSGPACK_DEFINE_ARRAY(actor, enabled);
223 MSGPACK_DEFINE_ARRAY(actor, enabled);
238 MSGPACK_DEFINE_ARRAY(actor, enabled);
250 MSGPACK_DEFINE_ARRAY(actor, enabled);
259 light_state(value) {}
262 MSGPACK_DEFINE_ARRAY(actor, light_state);
269 MSGPACK_DEFINE_ARRAY(cmd);
278 traffic_light_state(state) {}
281 MSGPACK_DEFINE_ARRAY(actor, traffic_light_state);
310 MSGPACK_DEFINE_ARRAY(command);
VehicleLightState::flag_type light_state
SetSimulatePhysics(ActorId id, bool value)
ShowDebugTelemetry(ActorId id, bool value)
ApplyWalkerControl(ActorId id, const WalkerControl &value)
SetEnableGravity(ActorId id, bool value)
SetAutopilot(ActorId id, bool value, uint16_t tm_port)
ApplyWalkerState(ActorId id, const geom::Transform &value, const float speed)
This file contains definitions of common data structures used in traffic manager. ...
ActorDescription description
ApplyVehicleControl(ActorId id, const VehicleControl &value)
SetTrafficLightState(ActorId id, rpc::TrafficLightState state)
SpawnActor(ActorDescription description, const geom::Transform &transform, ActorId parent)
VehicleAckermannControl control
SpawnActor(ActorDescription description, const geom::Transform &transform)
ApplyImpulse(ActorId id, const geom::Vector3D &value)
ApplyTargetVelocity(ActorId id, const geom::Vector3D &value)
geom::Transform transform
std::vector< Command > do_after
boost::variant2::variant< SpawnActor, DestroyActor, ApplyVehicleControl, ApplyVehicleAckermannControl, ApplyWalkerControl, ApplyVehiclePhysicsControl, ApplyTransform, ApplyWalkerState, ApplyTargetVelocity, ApplyTargetAngularVelocity, ApplyImpulse, ApplyForce, ApplyAngularImpulse, ApplyTorque, SetSimulatePhysics, SetEnableGravity, SetAutopilot, ShowDebugTelemetry, SetVehicleLightState, ApplyLocation, ConsoleCommand, SetTrafficLightState > CommandType
SetVehicleLightState(ActorId id, VehicleLightState::flag_type value)
ApplyTorque(ActorId id, const geom::Vector3D &value)
ConsoleCommand(std::string cmd)
geom::Transform transform
geom::Vector3D angular_velocity
ApplyForce(ActorId id, const geom::Vector3D &value)
boost::optional< ActorId > parent
ApplyVehiclePhysicsControl(ActorId id, const VehiclePhysicsControl &value)
ApplyAngularImpulse(ActorId id, const geom::Vector3D &value)
ApplyLocation(ActorId id, const geom::Location &value)
VehiclePhysicsControl physics_control
ApplyTargetAngularVelocity(ActorId id, const geom::Vector3D &value)
rpc::TrafficLightState traffic_light_state
ApplyVehicleAckermannControl(ActorId id, const VehicleAckermannControl &value)