Fixing seed as unsigned int

This commit is contained in:
bernatx 2021-10-06 00:05:30 +02:00 committed by bernat
parent 5864183fbc
commit 5695337c5b
7 changed files with 7 additions and 7 deletions

View File

@ -160,7 +160,7 @@ namespace client {
_episode.Lock()->SetPedestriansCrossFactor(percentage);
}
void World::SetPedestriansSeed(int seed) {
void World::SetPedestriansSeed(unsigned int seed) {
_episode.Lock()->SetPedestriansSeed(seed);
}

View File

@ -146,7 +146,7 @@ namespace client {
void SetPedestriansCrossFactor(float percentage);
/// set the seed to use with random numbers in the pedestrians module
void SetPedestriansSeed(int seed);
void SetPedestriansSeed(unsigned int seed);
SharedPtr<Actor> GetTrafficSign(const Landmark& landmark) const;

View File

@ -101,7 +101,7 @@ namespace detail {
nav->SetPedestriansCrossFactor(percentage);
}
void SetPedestriansSeed(int seed) {
void SetPedestriansSeed(unsigned int seed) {
auto nav = _navigation.load();
DEBUG_ASSERT(nav != nullptr);
nav->SetPedestriansSeed(seed);

View File

@ -308,7 +308,7 @@ namespace detail {
navigation->SetPedestriansCrossFactor(percentage);
}
void Simulator::SetPedestriansSeed(int seed) {
void Simulator::SetPedestriansSeed(unsigned int seed) {
DEBUG_ASSERT(_episode != nullptr);
auto navigation = _episode->CreateNavigationIfMissing();
DEBUG_ASSERT(navigation != nullptr);

View File

@ -296,7 +296,7 @@ namespace detail {
void SetPedestriansCrossFactor(float percentage);
void SetPedestriansSeed(int seed);
void SetPedestriansSeed(unsigned int seed);
/// @}
// =========================================================================

View File

@ -85,7 +85,7 @@ namespace detail {
_nav.SetPedestriansCrossFactor(percentage);
}
void SetPedestriansSeed(int seed) {
void SetPedestriansSeed(unsigned int seed) {
_nav.SetSeed(seed);
}

View File

@ -319,7 +319,7 @@ void export_world() {
.def("remove_on_tick", &cc::World::RemoveOnTick, (arg("callback_id")))
.def("tick", &Tick, (arg("seconds")=0.0))
.def("set_pedestrians_cross_factor", CALL_WITHOUT_GIL_1(cc::World, SetPedestriansCrossFactor, float), (arg("percentage")))
.def("set_pedestrians_seed", CALL_WITHOUT_GIL_1(cc::World, SetPedestriansSeed, int), (arg("seed")))
.def("set_pedestrians_seed", CALL_WITHOUT_GIL_1(cc::World, SetPedestriansSeed, unsigned int), (arg("seed")))
.def("get_traffic_sign", CONST_CALL_WITHOUT_GIL_1(cc::World, GetTrafficSign, cc::Landmark), arg("landmark"))
.def("get_traffic_light", CONST_CALL_WITHOUT_GIL_1(cc::World, GetTrafficLight, cc::Landmark), arg("landmark"))
.def("get_traffic_light_from_opendrive_id", CONST_CALL_WITHOUT_GIL_1(cc::World, GetTrafficLightFromOpenDRIVE, const carla::road::SignId&), arg("traffic_light_id"))