Skip to content

Commit

Permalink
fix: joy translation vehicle messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danielv012 committed Apr 27, 2024
1 parent faa3b0c commit 39da438
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/safety/guardian/guardian/guardian_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class StatusEntry:
class guardian_node(Node):
joy_sub = 0.0
command_pub = None
current_mode = Mode.DISABLED
current_mode = Mode.DISABLED #TEMPORARY SET TO MANUAL FOR TESTING

def __init__(self):
super().__init__('guardian_node')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import time

from navigator_msgs.msg import VehicleControl
from navigator_msgs.msg import CarlaSpeedometer
from navigator_msgs.msg import VehicleSpeed
from diagnostic_msgs.msg import DiagnosticStatus, KeyValue
from navigator_msgs.msg import Mode
import rclpy
Expand All @@ -56,7 +56,6 @@


class joy_translation_node(Node):
current_mode = Mode.DISABLED

def __init__(self):
super().__init__('joy_translation_node')
Expand All @@ -77,17 +76,17 @@ def __init__(self):
Mode, '/requested_mode', 1)

speed_sub = self.create_subscription(
CarlaSpeedometer, '/speed', self.speedCb, 1)
VehicleSpeed, '/speed', self.speedCb, 1)

self.status = DiagnosticStatus()
self.status_pub = self.create_publisher(
DiagnosticStatus, '/node_statuses', 1)

self.current_mode = Mode.DISABLED
self.current_mode = Mode.MANUAL
self.current_mode_sub = self.create_subscription(
Mode, '/guardian/mode', self.currentModeCb, 1)

def speedCb(self, msg: CarlaSpeedometer):
def speedCb(self, msg: VehicleSpeed):
self.current_speed = msg.speed

def currentModeCb(self, msg: Mode):
Expand Down

0 comments on commit 39da438

Please sign in to comment.