Skip to content

Commit

Permalink
Co-authored-by: aislinny <aislinny@users.noreply.github.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
JoyceZhu2486 committed Nov 13, 2024
1 parent 6f06928 commit ca11c95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rb_ws/src/buggy/buggy/simulator/velocity_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion rb_ws/src/buggy/buggy/simulator/velocity_updater.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit ca11c95

Please sign in to comment.