Merge branch 'master' into feature/integrate_rss_3.0.0
This commit is contained in:
commit
38c59e714f
|
@ -18,7 +18,7 @@ namespace client {
|
||||||
const std::vector<rpc::ActorDefinition> &blueprints) {
|
const std::vector<rpc::ActorDefinition> &blueprints) {
|
||||||
_blueprints.reserve(blueprints.size());
|
_blueprints.reserve(blueprints.size());
|
||||||
for (auto &definition : blueprints) {
|
for (auto &definition : blueprints) {
|
||||||
_blueprints.emplace(definition.id, definition);
|
_blueprints.emplace(definition.id, ActorBlueprint{definition});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "carla/client/detail/WalkerNavigation.h"
|
#include "carla/client/detail/WalkerNavigation.h"
|
||||||
#include "carla/geom/Vector3D.h"
|
#include "carla/geom/Vector3D.h"
|
||||||
|
|
||||||
#include <optional>
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
namespace carla {
|
namespace carla {
|
||||||
namespace client {
|
namespace client {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "carla/rpc/VehiclePhysicsControl.h"
|
#include "carla/rpc/VehiclePhysicsControl.h"
|
||||||
#include "carla/rpc/WeatherParameters.h"
|
#include "carla/rpc/WeatherParameters.h"
|
||||||
|
|
||||||
#include <optional>
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
namespace carla {
|
namespace carla {
|
||||||
namespace client {
|
namespace client {
|
||||||
|
|
|
@ -197,23 +197,23 @@ namespace detail {
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc::VehiclePhysicsControl Client::GetVehiclePhysicsControl(
|
rpc::VehiclePhysicsControl Client::GetVehiclePhysicsControl(
|
||||||
const rpc::ActorId &vehicle) const {
|
rpc::ActorId vehicle) const {
|
||||||
return _pimpl->CallAndWait<carla::rpc::VehiclePhysicsControl>("get_physics_control", vehicle);
|
return _pimpl->CallAndWait<carla::rpc::VehiclePhysicsControl>("get_physics_control", vehicle);
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc::VehicleLightState Client::GetVehicleLightState(
|
rpc::VehicleLightState Client::GetVehicleLightState(
|
||||||
const rpc::ActorId &vehicle) const {
|
rpc::ActorId vehicle) const {
|
||||||
return _pimpl->CallAndWait<carla::rpc::VehicleLightState>("get_vehicle_light_state", vehicle);
|
return _pimpl->CallAndWait<carla::rpc::VehicleLightState>("get_vehicle_light_state", vehicle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::ApplyPhysicsControlToVehicle(
|
void Client::ApplyPhysicsControlToVehicle(
|
||||||
const rpc::ActorId &vehicle,
|
rpc::ActorId vehicle,
|
||||||
const rpc::VehiclePhysicsControl &physics_control) {
|
const rpc::VehiclePhysicsControl &physics_control) {
|
||||||
return _pimpl->AsyncCall("apply_physics_control", vehicle, physics_control);
|
return _pimpl->AsyncCall("apply_physics_control", vehicle, physics_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::SetLightStateToVehicle(
|
void Client::SetLightStateToVehicle(
|
||||||
const rpc::ActorId &vehicle,
|
rpc::ActorId vehicle,
|
||||||
const rpc::VehicleLightState &light_state) {
|
const rpc::VehicleLightState &light_state) {
|
||||||
return _pimpl->AsyncCall("apply_vehicle_light_state", vehicle, light_state);
|
return _pimpl->AsyncCall("apply_vehicle_light_state", vehicle, light_state);
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ namespace detail {
|
||||||
_pimpl->AsyncCall("freeze_traffic_light", traffic_light, freeze);
|
_pimpl->AsyncCall("freeze_traffic_light", traffic_light, freeze);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ActorId> Client::GetGroupTrafficLights(const rpc::ActorId &traffic_light) {
|
std::vector<ActorId> Client::GetGroupTrafficLights(rpc::ActorId traffic_light) {
|
||||||
using return_t = std::vector<ActorId>;
|
using return_t = std::vector<ActorId>;
|
||||||
return _pimpl->CallAndWait<return_t>("get_group_traffic_lights", traffic_light);
|
return _pimpl->CallAndWait<return_t>("get_group_traffic_lights", traffic_light);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,18 +110,16 @@ namespace detail {
|
||||||
|
|
||||||
std::vector<rpc::Actor> GetActorsById(const std::vector<ActorId> &ids);
|
std::vector<rpc::Actor> GetActorsById(const std::vector<ActorId> &ids);
|
||||||
|
|
||||||
rpc::VehiclePhysicsControl GetVehiclePhysicsControl(
|
rpc::VehiclePhysicsControl GetVehiclePhysicsControl(rpc::ActorId vehicle) const;
|
||||||
const rpc::ActorId &vehicle) const;
|
|
||||||
|
|
||||||
rpc::VehicleLightState GetVehicleLightState(
|
rpc::VehicleLightState GetVehicleLightState(rpc::ActorId vehicle) const;
|
||||||
const rpc::ActorId &vehicle) const;
|
|
||||||
|
|
||||||
void ApplyPhysicsControlToVehicle(
|
void ApplyPhysicsControlToVehicle(
|
||||||
const rpc::ActorId &vehicle,
|
rpc::ActorId vehicle,
|
||||||
const rpc::VehiclePhysicsControl &physics_control);
|
const rpc::VehiclePhysicsControl &physics_control);
|
||||||
|
|
||||||
void SetLightStateToVehicle(
|
void SetLightStateToVehicle(
|
||||||
const rpc::ActorId &vehicle,
|
rpc::ActorId vehicle,
|
||||||
const rpc::VehicleLightState &light_state);
|
const rpc::VehicleLightState &light_state);
|
||||||
|
|
||||||
rpc::Actor SpawnActor(
|
rpc::Actor SpawnActor(
|
||||||
|
@ -197,7 +195,7 @@ namespace detail {
|
||||||
bool freeze);
|
bool freeze);
|
||||||
|
|
||||||
std::vector<ActorId> GetGroupTrafficLights(
|
std::vector<ActorId> GetGroupTrafficLights(
|
||||||
const rpc::ActorId &traffic_light);
|
rpc::ActorId traffic_light);
|
||||||
|
|
||||||
std::string StartRecorder(std::string name);
|
std::string StartRecorder(std::string name);
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace detail {
|
||||||
|
|
||||||
/// Represents the state of all the actors of an episode at a given frame.
|
/// Represents the state of all the actors of an episode at a given frame.
|
||||||
class EpisodeState
|
class EpisodeState
|
||||||
: std::enable_shared_from_this<EpisodeState>,
|
: public std::enable_shared_from_this<EpisodeState>,
|
||||||
private NonCopyable {
|
private NonCopyable {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,9 @@
|
||||||
#include "carla/profiler/LifetimeProfiled.h"
|
#include "carla/profiler/LifetimeProfiled.h"
|
||||||
#include "carla/rpc/TrafficLightState.h"
|
#include "carla/rpc/TrafficLightState.h"
|
||||||
|
|
||||||
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
namespace carla {
|
namespace carla {
|
||||||
namespace client {
|
namespace client {
|
||||||
|
|
|
@ -765,15 +765,15 @@ namespace road {
|
||||||
}
|
}
|
||||||
auto lane_offsets = lane.GetInfos<element::RoadInfoLaneOffset>();
|
auto lane_offsets = lane.GetInfos<element::RoadInfoLaneOffset>();
|
||||||
for (auto *lane_offset : lane_offsets) {
|
for (auto *lane_offset : lane_offsets) {
|
||||||
if (abs(lane_offset->GetPolynomial().GetC()) > 0 ||
|
if (std::abs(lane_offset->GetPolynomial().GetC()) > 0 ||
|
||||||
abs(lane_offset->GetPolynomial().GetD()) > 0) {
|
std::abs(lane_offset->GetPolynomial().GetD()) > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto elevations = road->GetInfos<element::RoadInfoElevation>();
|
auto elevations = road->GetInfos<element::RoadInfoElevation>();
|
||||||
for (auto *elevation : elevations) {
|
for (auto *elevation : elevations) {
|
||||||
if (abs(elevation->GetPolynomial().GetC()) > 0 ||
|
if (std::abs(elevation->GetPolynomial().GetC()) > 0 ||
|
||||||
abs(elevation->GetPolynomial().GetD()) > 0) {
|
std::abs(elevation->GetPolynomial().GetD()) > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -916,7 +916,7 @@ namespace road {
|
||||||
double angle = geom::Math::GetVectorAngle(
|
double angle = geom::Math::GetVectorAngle(
|
||||||
current_transform.GetForwardVector(), next_transform.GetForwardVector());
|
current_transform.GetForwardVector(), next_transform.GetForwardVector());
|
||||||
|
|
||||||
if (abs(angle) > angle_threshold) {
|
if (std::abs(angle) > angle_threshold) {
|
||||||
AddElementToRtree(
|
AddElementToRtree(
|
||||||
rtree_elements,
|
rtree_elements,
|
||||||
current_transform,
|
current_transform,
|
||||||
|
|
Loading…
Reference in New Issue