diff --git a/src/bindings.cpp b/src/bindings.cpp index e8516ca7..a815afa2 100644 --- a/src/bindings.cpp +++ b/src/bindings.cpp @@ -56,7 +56,7 @@ namespace gpudrive .def_rw("useWayMaxModel", &Parameters::useWayMaxModel) .def_rw("enableLidar", &Parameters::enableLidar) .def_rw("disableClassicalObs", &Parameters::disableClassicalObs) - .def_rw("initAgentsAsStatic", &Parameters::initAgentsAsStatic); + .def_rw("isStaticAgentControlled", &Parameters::isStaticAgentControlled); // Define CollisionBehaviour enum nb::enum_(m, "CollisionBehaviour") diff --git a/src/init.hpp b/src/init.hpp index d476d6d3..c8a65c1e 100755 --- a/src/init.hpp +++ b/src/init.hpp @@ -112,7 +112,7 @@ namespace gpudrive FindRoadObservationsWith roadObservationAlgorithm{ FindRoadObservationsWith::KNearestEntitiesWithRadiusFiltering}; bool initOnlyValidAgentsAtFirstStep = true; // Default: true - bool initAgentsAsStatic = false; // Default: false + bool isStaticAgentControlled = false; // Default: false bool enableLidar = false; bool disableClassicalObs = false; bool useWayMaxModel = false; // Default: false diff --git a/src/level_gen.cpp b/src/level_gen.cpp index 95cb5b2f..c0d93f06 100755 --- a/src/level_gen.cpp +++ b/src/level_gen.cpp @@ -94,7 +94,7 @@ static inline Entity createAgent(Engine &ctx, const MapObject &agentInit) { populateExpertTrajectory(ctx, agent, agentInit); - if(ctx.data().params.initAgentsAsStatic && (ctx.get(agent).position - ctx.get(agent).positions[0]).length() < consts::staticThreshold) + if(!ctx.data().params.isStaticAgentControlled && (ctx.get(agent).position - ctx.get(agent).positions[0]).length() < consts::staticThreshold) { ctx.get(agent) = ResponseType::Static; } diff --git a/src/sim.cpp b/src/sim.cpp index 139fb285..46c254c5 100755 --- a/src/sim.cpp +++ b/src/sim.cpp @@ -276,7 +276,7 @@ inline void movementSystem(Engine &e, if(responseType == ResponseType::Static) { // Do nothing. The agent is static. - // Agent can only be static if initAgentsAsStatic is set to true. + // Agent can only be static if isStaticAgentControlled is set to true. return; } diff --git a/tests/test_expert.py b/tests/test_expert.py index 79466583..4409ee8f 100644 --- a/tests/test_expert.py +++ b/tests/test_expert.py @@ -18,7 +18,7 @@ def simulation_results(): params.rewardParams = reward_params # Set the rewardParams attribute to the instance created above params.maxNumControlledVehicles = 0 params.IgnoreNonVehicles = True - params.initAgentsAsStatic = True + params.isStaticAgentControlled = False # Now use the 'params' instance when creating SimManager sim = gpudrive.SimManager(