Remove switch to different default rss parameter, add new members
This commit is contained in:
parent
d8005283be
commit
251d2bbbb7
|
@ -102,7 +102,6 @@ try:
|
|||
from pygame.locals import K_q
|
||||
from pygame.locals import K_r
|
||||
from pygame.locals import K_s
|
||||
from pygame.locals import K_t
|
||||
from pygame.locals import K_w
|
||||
from pygame.locals import K_l
|
||||
from pygame.locals import K_i
|
||||
|
@ -420,12 +419,6 @@ class VehicleControl(object):
|
|||
elif event.key == K_g:
|
||||
if self._world and self._world.rss_sensor:
|
||||
self._world.rss_sensor.drop_route()
|
||||
elif event.key == K_t:
|
||||
if self._world and self._world.rss_sensor:
|
||||
if self._world.rss_sensor.assertive_parameters:
|
||||
self._world.rss_sensor.set_default_parameters()
|
||||
else:
|
||||
self._world.rss_sensor.set_assertive_parameters()
|
||||
if isinstance(self._control, carla.VehicleControl):
|
||||
if event.key == K_q:
|
||||
self._control.gear = 1 if self._control.reverse else -1
|
||||
|
|
|
@ -298,29 +298,6 @@ class RssSensor(object):
|
|||
def toggle_debug_visualization_mode(self):
|
||||
self.debug_visualizer.toggleMode()
|
||||
|
||||
@staticmethod
|
||||
def get_assertive_parameters():
|
||||
ego_dynamics = rss.RssDynamics()
|
||||
ego_dynamics.alphaLon.accelMax = 4.1
|
||||
ego_dynamics.alphaLon.brakeMax = -8.03
|
||||
ego_dynamics.alphaLon.brakeMin = -4.64
|
||||
ego_dynamics.alphaLon.brakeMinCorrect = -1.76
|
||||
ego_dynamics.alphaLat.accelMax = 0.43
|
||||
ego_dynamics.alphaLat.brakeMin = -0.96
|
||||
ego_dynamics.lateralFluctuationMargin = 0.07
|
||||
ego_dynamics.responseTime = 0.25 # paper: 0.53
|
||||
ego_dynamics.maxSpeedOnAcceleration = 100
|
||||
ego_dynamics.unstructuredSettings.pedestrianTurningRadius = 2.0
|
||||
ego_dynamics.unstructuredSettings.driveAwayMaxAngle = 2.4
|
||||
ego_dynamics.unstructuredSettings.vehicleYawRateChange = 0.3
|
||||
ego_dynamics.unstructuredSettings.vehicleMinRadius = 3.5
|
||||
ego_dynamics.unstructuredSettings.vehicleTrajectoryCalculationStep = 0.2
|
||||
return ego_dynamics
|
||||
|
||||
def set_assertive_parameters(self):
|
||||
print("Use 'assertive' RSS Parameters")
|
||||
self.current_vehicle_parameters = self.get_assertive_parameters()
|
||||
|
||||
@staticmethod
|
||||
def get_default_parameters():
|
||||
ego_dynamics = rss.RssDynamics()
|
||||
|
@ -331,13 +308,18 @@ class RssSensor(object):
|
|||
ego_dynamics.alphaLat.accelMax = 0.2
|
||||
ego_dynamics.alphaLat.brakeMin = -0.8
|
||||
ego_dynamics.lateralFluctuationMargin = 0.1
|
||||
ego_dynamics.responseTime = 1.0
|
||||
ego_dynamics.responseTime = 0.5
|
||||
ego_dynamics.maxSpeedOnAcceleration = 100
|
||||
ego_dynamics.unstructuredSettings.pedestrianTurningRadius = 2.0
|
||||
ego_dynamics.unstructuredSettings.driveAwayMaxAngle = 2.4
|
||||
ego_dynamics.unstructuredSettings.vehicleYawRateChange = 0.3
|
||||
ego_dynamics.unstructuredSettings.vehicleMinRadius = 3.5
|
||||
ego_dynamics.unstructuredSettings.vehicleTrajectoryCalculationStep = 0.2
|
||||
ego_dynamics.unstructuredSettings.vehicleFrontIntermediateRatioSteps = 4
|
||||
ego_dynamics.unstructuredSettings.vehicleBackIntermediateRatioSteps = 0
|
||||
ego_dynamics.unstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps = 0
|
||||
ego_dynamics.unstructuredSettings.vehicleBrakeIntermediateAccelerationSteps = 0
|
||||
ego_dynamics.unstructuredSettings.vehicleResponseTimeIntermediateAccelerationSteps = 4
|
||||
return ego_dynamics
|
||||
|
||||
def set_default_parameters(self):
|
||||
|
@ -358,9 +340,17 @@ class RssSensor(object):
|
|||
pedestrian_dynamics.maxSpeedOnAcceleration = 10
|
||||
pedestrian_dynamics.unstructuredSettings.pedestrianTurningRadius = 2.0
|
||||
pedestrian_dynamics.unstructuredSettings.driveAwayMaxAngle = 2.4
|
||||
|
||||
#not used:
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleYawRateChange = 0.3
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleMinRadius = 3.5
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleTrajectoryCalculationStep = 0.2
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleTrajectoryCalculationStep = 0.2
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleFrontIntermediateRatioSteps = 4
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleBackIntermediateRatioSteps = 0
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps = 0
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleBrakeIntermediateAccelerationSteps = 0
|
||||
pedestrian_dynamics.unstructuredSettings.vehicleResponseTimeIntermediateAccelerationSteps = 4
|
||||
return pedestrian_dynamics
|
||||
|
||||
def get_steering_ranges(self):
|
||||
|
|
Loading…
Reference in New Issue