From 66756ba71290364783121e04778339e92b942909 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Thu, 1 Feb 2018 12:21:45 +0100 Subject: [PATCH] rename ai_control to autopilot_control, again --- .../Plugins/Carla/Source/Carla/Game/CarlaServer.cpp | 10 +++++----- Util/CarlaServer/include/carla/carla_server.h | 2 +- Util/CarlaServer/source/carla/server/CarlaEncoder.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaServer.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaServer.cpp index a6c32c6e5..f0ff29051 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaServer.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaServer.cpp @@ -372,11 +372,11 @@ CarlaServer::ErrorCode CarlaServer::SendMeasurements( Set(player.collision_other, PlayerState.GetCollisionIntensityOther()); Set(player.intersection_otherlane, PlayerState.GetOtherLaneIntersectionFactor()); Set(player.intersection_offroad, PlayerState.GetOffRoadIntersectionFactor()); - Set(player.ai_control.steer, PlayerState.GetSteer()); - Set(player.ai_control.throttle, PlayerState.GetThrottle()); - Set(player.ai_control.brake, PlayerState.GetBrake()); - Set(player.ai_control.hand_brake, PlayerState.GetHandBrake()); - Set(player.ai_control.reverse, PlayerState.GetCurrentGear() < 0); + Set(player.autopilot_control.steer, PlayerState.GetSteer()); + Set(player.autopilot_control.throttle, PlayerState.GetThrottle()); + Set(player.autopilot_control.brake, PlayerState.GetBrake()); + Set(player.autopilot_control.hand_brake, PlayerState.GetHandBrake()); + Set(player.autopilot_control.reverse, PlayerState.GetCurrentGear() < 0); TArray Agents; if (bSendNonPlayerAgentsInfo) { diff --git a/Util/CarlaServer/include/carla/carla_server.h b/Util/CarlaServer/include/carla/carla_server.h index e962cae9b..57b35ff99 100644 --- a/Util/CarlaServer/include/carla/carla_server.h +++ b/Util/CarlaServer/include/carla/carla_server.h @@ -153,7 +153,7 @@ extern "C" { /** Percentage of the car off-road. */ float intersection_offroad; /** Vehicle's AI control that would apply this frame. */ - struct carla_control ai_control; + struct carla_control autopilot_control; }; /* ======================================================================== */ diff --git a/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp b/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp index 86c5eb377..39cb2e654 100644 --- a/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp +++ b/Util/CarlaServer/source/carla/server/CarlaEncoder.cpp @@ -134,7 +134,7 @@ namespace server { player->set_collision_other(values.player_measurements.collision_other); player->set_intersection_otherlane(values.player_measurements.intersection_otherlane); player->set_intersection_offroad(values.player_measurements.intersection_offroad); - Set(player->mutable_autopilot_control(), values.player_measurements.ai_control); + Set(player->mutable_autopilot_control(), values.player_measurements.autopilot_control); // Non-player agents. message->clear_non_player_agents(); // we need to clear as we cache the message. for (auto &agent : agents(values)) {