diff --git a/Util/CarlaServer/include/carla/carla_server.h b/Util/CarlaServer/include/carla/carla_server.h index 9f68fc539..37d268533 100644 --- a/Util/CarlaServer/include/carla/carla_server.h +++ b/Util/CarlaServer/include/carla/carla_server.h @@ -35,11 +35,6 @@ extern "C" { struct carla_vector3d orientation; }; - struct carla_bounding_box { - struct carla_transform transform; - struct carla_vector3d extent; - }; - #define CARLA_SERVER_AGENT_UNKNOWN 0u #define CARLA_SERVER_AGENT_VEHICLE 1u #define CARLA_SERVER_AGENT_PEDESTRIAN 2u @@ -48,7 +43,7 @@ extern "C" { uint32_t id; uint32_t type; struct carla_transform transform; - struct carla_bounding_box bounding_box; + struct carla_vector3d box_extent; float forward_speed; }; diff --git a/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp b/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp index 8120d087a..f1b27856f 100644 --- a/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp +++ b/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp @@ -36,12 +36,6 @@ namespace server { Set(lhs->mutable_orientation(), rhs.orientation); } - static void Set(cs::BoundingBox *lhs, const carla_bounding_box &rhs) { - DEBUG_ASSERT(lhs != nullptr); - Set(lhs->mutable_transform(), rhs.transform); - Set(lhs->mutable_extent(), rhs.extent); - } - static cs::Agent::Type GetAgentType(const uint32_t type) { switch (type) { case CARLA_SERVER_AGENT_VEHICLE: return cs::Agent::VEHICLE; @@ -55,7 +49,7 @@ namespace server { lhs->set_id(rhs.id); lhs->set_type(GetAgentType(rhs.type)); Set(lhs->mutable_transform(), rhs.transform); - Set(lhs->mutable_bounding_box(), rhs.bounding_box); + Set(lhs->mutable_box_extent(), rhs.box_extent); lhs->set_forward_speed(rhs.forward_speed); } diff --git a/Util/Proto/carla_server.proto b/Util/Proto/carla_server.proto index 27b396dec..aaf182d51 100644 --- a/Util/Proto/carla_server.proto +++ b/Util/Proto/carla_server.proto @@ -22,11 +22,6 @@ message Transform { Vector3D orientation = 2; } -message BoundingBox { - Transform transform = 1; - Vector3D extent = 2; -} - message Agent { enum Type { UNKNOWN = 0; @@ -37,7 +32,7 @@ message Agent { uint32 id = 1; Type type = 2; Transform transform = 3; - BoundingBox bounding_box = 4; + Vector3D box_extent = 4; float forward_speed = 5; }