Skip to content

Commit

Permalink
fix: autoware_msgs (#68)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
Signed-off-by: temkei.kem <[email protected]>
  • Loading branch information
kosuke55 authored and xtk8532704 committed Jul 8, 2024
1 parent 214452e commit 59ae7c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ def CallBackScenarioTrajectory(self, msg):

def CallBackControlCmd(self, msg):
# self.get_logger().info('CONTROL_CMD called')
self.data_arr[CONTROL_CMD] = msg.longitudinal.speed
self.data_arr[CONTROL_CMD] = msg.longitudinal.velocity
self.data_arr[CONTROL_CMD_ACC] = msg.longitudinal.acceleration
return

def CallBackVehicleCmd(self, msg):
# self.get_logger().info('VEHICLE_CMD called')
self.data_arr[VEHICLE_CMD] = msg.longitudinal.speed
self.data_arr[VEHICLE_CMD] = msg.longitudinal.velocity
self.data_arr[VEHICLE_CMD_ACC] = msg.longitudinal.acceleration
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def publish_msg(self, control_cmd):
]
longitudinal_cmd.stamp.sec = stamp.sec
longitudinal_cmd.stamp.nanosec = stamp.nanosec
longitudinal_cmd.speed = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.velocity = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.acceleration = control_cmd["longitudinal"]["acceleration"]
longitudinal_cmd.jerk = control_cmd["longitudinal"]["jerk"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate_control_msg(self, control_cmd):
]
longitudinal_cmd.stamp.sec = stamp.sec
longitudinal_cmd.stamp.nanosec = stamp.nanosec
longitudinal_cmd.speed = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.velocity = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.acceleration = control_cmd["longitudinal"]["acceleration"]
longitudinal_cmd.jerk = control_cmd["longitudinal"]["jerk"]

Expand All @@ -101,7 +101,7 @@ def set_speed(self, speed):
if len(self.msgs_rx) > 2:
break
received = self.msgs_rx[-1]
assert received.longitudinal.speed == speed
assert received.longitudinal.velocity == speed
self.msgs_rx.clear()

def set_acceleration(self, acceleration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def generate_control_msg(self, control_cmd):
]
longitudinal_cmd.stamp.sec = stamp.sec
longitudinal_cmd.stamp.nanosec = stamp.nanosec
longitudinal_cmd.speed = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.velocity = control_cmd["longitudinal"]["speed"]
longitudinal_cmd.acceleration = control_cmd["longitudinal"]["acceleration"]
longitudinal_cmd.jerk = control_cmd["longitudinal"]["jerk"]

Expand Down

0 comments on commit 59ae7c5

Please sign in to comment.