diff --git a/code/acting/src/acting/velocity_controller.py b/code/acting/src/acting/velocity_controller.py index bd0f258f..08346a00 100755 --- a/code/acting/src/acting/velocity_controller.py +++ b/code/acting/src/acting/velocity_controller.py @@ -6,6 +6,8 @@ from simple_pid import PID from std_msgs.msg import Float32 +SPEED_LIMIT_DEFAULT: float = 36.0 + class VelocityController(CompatibleNode): """ @@ -83,7 +85,10 @@ def loop(timer_event=None): "publish a throttle value") return if self.__speed_limit is None or self.__speed_limit < 0: - self.__speed_limit = float("inf") + self.logdebug("VelocityController hasn't received a acceptable" + " speed_limit yet. speed_limit has been set to" + f"default value {SPEED_LIMIT_DEFAULT}") + self.__speed_limit = SPEED_LIMIT_DEFAULT if self.__max_velocity < 0: self.logerr("Velocity controller doesn't support backward " "driving yet.") diff --git a/code/acting/src/acting/velocity_publisher_dummy.py b/code/acting/src/acting/velocity_publisher_dummy.py index cb16d741..e165d02e 100755 --- a/code/acting/src/acting/velocity_publisher_dummy.py +++ b/code/acting/src/acting/velocity_publisher_dummy.py @@ -23,9 +23,9 @@ def __init__(self): Float32, f"/carla/{self.role_name}/max_velocity", qos_profile=1) - self.velocity = 4 + self.velocity = 4.0 self.delta_velocity = 0.125 - self.max_velocity = 5 + self.max_velocity = 5.5 self.min_velocity = 4 self.__dv = self.delta_velocity