diff --git a/rb_ws/src/buggy/buggy/simulator/velocity_ui.py b/rb_ws/src/buggy/buggy/simulator/velocity_ui.py index 3070439..4bc845e 100644 --- a/rb_ws/src/buggy/buggy/simulator/velocity_ui.py +++ b/rb_ws/src/buggy/buggy/simulator/velocity_ui.py @@ -30,7 +30,7 @@ def __init__(self, init_vel: float, buggy_name: str): # ROS2 timer for stepping # 0.01 is equivalent to 100Hz (100 times per second) - self.create_timer(0.01, self.step) + self.create_timer(0.01, self.step) def step(self): # Sets the velocity of the buggy to the current scale value diff --git a/rb_ws/src/buggy/buggy/simulator/velocity_updater.py b/rb_ws/src/buggy/buggy/simulator/velocity_updater.py index 4bc628b..6cc90f3 100644 --- a/rb_ws/src/buggy/buggy/simulator/velocity_updater.py +++ b/rb_ws/src/buggy/buggy/simulator/velocity_updater.py @@ -1,17 +1,18 @@ #! /usr/bin/env python3 import sys import math +import threading import rclpy from rclpy.node import Node from controller_2d import Controller from geometry_msgs.msg import Pose from geometry_msgs.msg import Point -import threading class VelocityUpdater(Node): RATE = 100 # Bubbles for updating acceleration based on position # represented as 4-tuples: (x-pos, y-pos, radius, acceleration) + # 'list[tuple[float,float,float,float]]' # need further update such as more data or import data from certain files CHECKPOINTS = [ (589701, 4477160, 20, 0.5)