Fixes from review
This commit is contained in:
parent
938ee194d8
commit
b7a1c8ad6a
|
@ -288,7 +288,8 @@ namespace nav {
|
|||
// check traffic lights only
|
||||
if (actor.description.id == "traffic.traffic_light") {
|
||||
// get the TL actor
|
||||
SharedPtr<carla::client::TrafficLight> tl = boost::static_pointer_cast<carla::client::TrafficLight>(world.GetActor(actor.id));
|
||||
SharedPtr<carla::client::TrafficLight> tl =
|
||||
boost::static_pointer_cast<carla::client::TrafficLight>(world.GetActor(actor.id));
|
||||
// get the waypoints where the TL affects
|
||||
std::vector<SharedPtr<carla::client::Waypoint>> list = tl->GetStopWaypoints();
|
||||
for (auto &way : list) {
|
||||
|
@ -302,7 +303,9 @@ namespace nav {
|
|||
|
||||
|
||||
// return the trafficlight affecting that position
|
||||
SharedPtr<carla::client::TrafficLight> WalkerManager::GetTrafficLightAffecting(carla::geom::Location UnrealPos, float max_distance) {
|
||||
SharedPtr<carla::client::TrafficLight> WalkerManager::GetTrafficLightAffecting(
|
||||
carla::geom::Location UnrealPos,
|
||||
float max_distance) {
|
||||
float min_dist = std::numeric_limits<float>::infinity();
|
||||
SharedPtr<carla::client::TrafficLight> actor;
|
||||
for (auto &&item : _traffic_lights) {
|
||||
|
|
Loading…
Reference in New Issue