Namespaces fix
This commit is contained in:
parent
09b9821fdc
commit
6f3c4e261c
|
@ -13,6 +13,7 @@
|
||||||
#include "carla/client/Actor.h"
|
#include "carla/client/Actor.h"
|
||||||
#include "carla/Memory.h"
|
#include "carla/Memory.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -80,3 +81,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
template <typename Key, typename Value>
|
template <typename Key, typename Value>
|
||||||
|
@ -50,3 +51,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "BatchControlStage.h"
|
#include "BatchControlStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
BatchControlStage::BatchControlStage(
|
BatchControlStage::BatchControlStage(
|
||||||
|
@ -69,3 +70,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "carla/trafficmanager/MessengerAndDataTypes.h"
|
#include "carla/trafficmanager/MessengerAndDataTypes.h"
|
||||||
#include "carla/trafficmanager/PipelineStage.h"
|
#include "carla/trafficmanager/PipelineStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -59,3 +60,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "CarlaDataAccessLayer.h"
|
#include "CarlaDataAccessLayer.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
CarlaDataAccessLayer::CarlaDataAccessLayer(carla::SharedPtr<cc::Map> _world_map) {
|
CarlaDataAccessLayer::CarlaDataAccessLayer(carla::SharedPtr<cc::Map> _world_map) {
|
||||||
|
@ -17,3 +18,4 @@ namespace traffic_manager {
|
||||||
return world_map->GetTopology();
|
return world_map->GetTopology();
|
||||||
}
|
}
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "carla/client/Waypoint.h"
|
#include "carla/client/Waypoint.h"
|
||||||
#include "carla/Memory.h"
|
#include "carla/Memory.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -35,3 +36,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "CollisionStage.h"
|
#include "CollisionStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace CollisionStageConstants {
|
namespace CollisionStageConstants {
|
||||||
|
@ -441,3 +442,4 @@ namespace CollisionStageConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
|
@ -34,6 +34,7 @@
|
||||||
#include "carla/trafficmanager/PipelineStage.h"
|
#include "carla/trafficmanager/PipelineStage.h"
|
||||||
#include "carla/trafficmanager/VicinityGrid.h"
|
#include "carla/trafficmanager/VicinityGrid.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -131,3 +132,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "InMemoryMap.h"
|
#include "InMemoryMap.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace MapConstants {
|
namespace MapConstants {
|
||||||
|
@ -255,3 +256,4 @@ namespace MapConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "carla/trafficmanager/SimpleWaypoint.h"
|
#include "carla/trafficmanager/SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cg = carla::geom;
|
namespace cg = carla::geom;
|
||||||
|
@ -78,3 +79,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "LocalizationStage.h"
|
#include "LocalizationStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace LocalizationConstants {
|
namespace LocalizationConstants {
|
||||||
|
@ -519,3 +520,4 @@ namespace LocalizationConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "carla/trafficmanager/PipelineStage.h"
|
#include "carla/trafficmanager/PipelineStage.h"
|
||||||
#include "carla/trafficmanager/SimpleWaypoint.h"
|
#include "carla/trafficmanager/SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
|
@ -133,3 +134,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "carla/trafficmanager/LocalizationUtils.h"
|
#include "carla/trafficmanager/LocalizationUtils.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
float DeviationCrossProduct(Actor actor, const cg::Location &target_location) {
|
float DeviationCrossProduct(Actor actor, const cg::Location &target_location) {
|
||||||
|
@ -124,3 +125,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "carla/trafficmanager/SimpleWaypoint.h"
|
#include "carla/trafficmanager/SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -58,3 +59,4 @@ namespace traffic_manager {
|
||||||
float DeviationDotProduct(Actor actor, const cg::Location &target_location, bool rear_offset=false);
|
float DeviationDotProduct(Actor actor, const cg::Location &target_location, bool rear_offset=false);
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
|
@ -104,3 +105,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "carla/trafficmanager/Messenger.h"
|
#include "carla/trafficmanager/Messenger.h"
|
||||||
#include "carla/trafficmanager/SimpleWaypoint.h"
|
#include "carla/trafficmanager/SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -90,3 +91,4 @@ namespace traffic_manager {
|
||||||
using TrafficLightToPlannerMessenger = Messenger<std::shared_ptr<TrafficLightToPlannerFrame>>;
|
using TrafficLightToPlannerMessenger = Messenger<std::shared_ptr<TrafficLightToPlannerFrame>>;
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "MotionPlannerStage.h"
|
#include "MotionPlannerStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace PlannerConstants {
|
namespace PlannerConstants {
|
||||||
|
@ -190,3 +191,4 @@ namespace PlannerConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "carla/trafficmanager/PIDController.h"
|
#include "carla/trafficmanager/PIDController.h"
|
||||||
#include "carla/trafficmanager/PipelineStage.h"
|
#include "carla/trafficmanager/PipelineStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace chr = std::chrono;
|
namespace chr = std::chrono;
|
||||||
|
@ -102,3 +103,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "PIDController.h"
|
#include "PIDController.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace PIDControllerConstants {
|
namespace PIDControllerConstants {
|
||||||
|
@ -91,3 +92,4 @@ namespace PIDControllerConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace chr = std::chrono;
|
namespace chr = std::chrono;
|
||||||
|
@ -64,3 +65,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "Parameters.h"
|
#include "Parameters.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
Parameters::Parameters() {}
|
Parameters::Parameters() {}
|
||||||
|
@ -179,3 +180,4 @@ float Parameters::GetPercentageIgnoreActors(const ActorPtr &actor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "carla/trafficmanager/AtomicActorSet.h"
|
#include "carla/trafficmanager/AtomicActorSet.h"
|
||||||
#include "carla/trafficmanager/AtomicMap.h"
|
#include "carla/trafficmanager/AtomicMap.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -104,3 +105,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "carla/trafficmanager/PerformanceDiagnostics.h"
|
#include "carla/trafficmanager/PerformanceDiagnostics.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
PerformanceDiagnostics::PerformanceDiagnostics(std::string stage_name)
|
PerformanceDiagnostics::PerformanceDiagnostics(std::string stage_name)
|
||||||
|
@ -37,3 +38,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "carla/Logging.h"
|
#include "carla/Logging.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace chr = std::chrono;
|
namespace chr = std::chrono;
|
||||||
|
@ -36,3 +37,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "PipelineStage.h"
|
#include "PipelineStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
PipelineStage::PipelineStage(std::string stage_name)
|
PipelineStage::PipelineStage(std::string stage_name)
|
||||||
|
@ -106,3 +107,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "carla/trafficmanager/Messenger.h"
|
#include "carla/trafficmanager/Messenger.h"
|
||||||
#include "carla/trafficmanager/PerformanceDiagnostics.h"
|
#include "carla/trafficmanager/PerformanceDiagnostics.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace chr = std::chrono;
|
namespace chr = std::chrono;
|
||||||
|
@ -91,3 +92,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "SimpleWaypoint.h"
|
#include "SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
using SimpleWaypointPtr = std::shared_ptr<SimpleWaypoint>;
|
using SimpleWaypointPtr = std::shared_ptr<SimpleWaypoint>;
|
||||||
|
@ -99,3 +100,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "carla/geom/Vector3D.h"
|
#include "carla/geom/Vector3D.h"
|
||||||
#include "carla/Memory.h"
|
#include "carla/Memory.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -95,3 +96,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "TrafficLightStage.h"
|
#include "TrafficLightStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
static const uint64_t NO_SIGNAL_PASSTHROUGH_INTERVAL = 5u;
|
static const uint64_t NO_SIGNAL_PASSTHROUGH_INTERVAL = 5u;
|
||||||
|
@ -206,3 +207,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "carla/trafficmanager/PipelineStage.h"
|
#include "carla/trafficmanager/PipelineStage.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace chr = std::chrono;
|
namespace chr = std::chrono;
|
||||||
|
@ -93,3 +94,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "carla/client/TrafficLight.h"
|
#include "carla/client/TrafficLight.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
TrafficManager::TrafficManager(
|
TrafficManager::TrafficManager(
|
||||||
|
@ -248,3 +249,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "carla/trafficmanager/Parameters.h"
|
#include "carla/trafficmanager/Parameters.h"
|
||||||
#include "carla/trafficmanager/TrafficLightStage.h"
|
#include "carla/trafficmanager/TrafficLightStage.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -153,3 +154,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "VicinityGrid.h"
|
#include "VicinityGrid.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
static const float GRID_SIZE = 10.0f;
|
static const float GRID_SIZE = 10.0f;
|
||||||
|
@ -93,3 +94,4 @@ namespace traffic_manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include "carla/trafficmanager/SimpleWaypoint.h"
|
#include "carla/trafficmanager/SimpleWaypoint.h"
|
||||||
|
|
||||||
|
namespace carla {
|
||||||
namespace traffic_manager {
|
namespace traffic_manager {
|
||||||
|
|
||||||
namespace cc = carla::client;
|
namespace cc = carla::client;
|
||||||
|
@ -63,3 +64,4 @@ namespace traffic_manager {
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traffic_manager
|
} // namespace traffic_manager
|
||||||
|
} // namespace carla
|
|
@ -22,20 +22,20 @@ void export_trafficmanager() {
|
||||||
|
|
||||||
class_<Parameters>("TM_Parameters").def(vector_indexing_suite<Parameters>());
|
class_<Parameters>("TM_Parameters").def(vector_indexing_suite<Parameters>());
|
||||||
|
|
||||||
class_<traffic_manager::TrafficManager, boost::noncopyable>("TrafficManager", no_init)
|
class_<carla::traffic_manager::TrafficManager, boost::noncopyable>("TrafficManager", no_init)
|
||||||
.def("register_vehicles", &traffic_manager::TrafficManager::RegisterVehicles)
|
.def("register_vehicles", &carla::traffic_manager::TrafficManager::RegisterVehicles)
|
||||||
.def("unregister_vehicles", &traffic_manager::TrafficManager::UnregisterVehicles)
|
.def("unregister_vehicles", &carla::traffic_manager::TrafficManager::UnregisterVehicles)
|
||||||
.def("set_vehicle_max_speed_difference", &traffic_manager::TrafficManager::SetPercentageSpeedDifference)
|
.def("set_vehicle_max_speed_difference", &carla::traffic_manager::TrafficManager::SetPercentageSpeedDifference)
|
||||||
.def("set_global_max_speed_difference", &traffic_manager::TrafficManager::SetGlobalPercentageSpeedDifference)
|
.def("set_global_max_speed_difference", &carla::traffic_manager::TrafficManager::SetGlobalPercentageSpeedDifference)
|
||||||
.def("set_collision_detection", &traffic_manager::TrafficManager::SetCollisionDetection)
|
.def("set_collision_detection", &carla::traffic_manager::TrafficManager::SetCollisionDetection)
|
||||||
.def("force_lane_change", &traffic_manager::TrafficManager::SetForceLaneChange)
|
.def("force_lane_change", &carla::traffic_manager::TrafficManager::SetForceLaneChange)
|
||||||
.def("set_auto_lane_change", &traffic_manager::TrafficManager::SetAutoLaneChange)
|
.def("set_auto_lane_change", &carla::traffic_manager::TrafficManager::SetAutoLaneChange)
|
||||||
.def("set_distance_to_leading_vehicle", &traffic_manager::TrafficManager::SetDistanceToLeadingVehicle)
|
.def("set_distance_to_leading_vehicle", &carla::traffic_manager::TrafficManager::SetDistanceToLeadingVehicle)
|
||||||
.def("reset_traffic_lights", &traffic_manager::TrafficManager::ResetAllTrafficLights)
|
.def("reset_traffic_lights", &carla::traffic_manager::TrafficManager::ResetAllTrafficLights)
|
||||||
.def("destroy_vehicle", &traffic_manager::TrafficManager::DestroyVehicle)
|
.def("destroy_vehicle", &carla::traffic_manager::TrafficManager::DestroyVehicle)
|
||||||
.def("ignore_actors_percentage", &traffic_manager::TrafficManager::SetPercentageIgnoreActors)
|
.def("ignore_actors_percentage", &carla::traffic_manager::TrafficManager::SetPercentageIgnoreActors)
|
||||||
.def("ignore_lights_percentage", &traffic_manager::TrafficManager::SetPercentageRunningLight);
|
.def("ignore_lights_percentage", &carla::traffic_manager::TrafficManager::SetPercentageRunningLight);
|
||||||
|
|
||||||
def("GetTrafficManager", &traffic_manager::TrafficManager::GetInstance, return_value_policy<reference_existing_object>());
|
def("GetTrafficManager", &carla::traffic_manager::TrafficManager::GetInstance, return_value_policy<reference_existing_object>());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,10 +176,8 @@ def main():
|
||||||
traffic_manager = carla.GetTrafficManager(client)
|
traffic_manager = carla.GetTrafficManager(client)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
vehicle_vec = carla.TM_ActorList()
|
for v in vehicles_list:
|
||||||
vehicle_vec.extend(vehicles_list)
|
v.set_autopilot(True)
|
||||||
|
|
||||||
traffic_manager.register_vehicles(vehicle_vec)
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
Loading…
Reference in New Issue