Remove transform of bounding box from protocol
This commit is contained in:
parent
26d42b6dc2
commit
f5c54d2ca1
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue