Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed May 23, 2024
1 parent 3333587 commit a9cfcb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion simulator/carla_autoware/config/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
}
}
]
}
}
10 changes: 7 additions & 3 deletions simulator/carla_autoware/src/carla_autoware/carla_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,15 @@ def imu(self, carla_imu_measurement):
def control_callback(self, in_cmd):
"""Convert and publish CARLA Ego Vehicle Control to AUTOWARE."""
out_cmd = carla.VehicleAckermannControl(
steer=numpy.clip(-math.degrees(in_cmd.lateral.steering_tire_angle)/self.max_steering_angle, -1.0, 1.0),
steer=numpy.clip(
-math.degrees(in_cmd.lateral.steering_tire_angle) / self.max_steering_angle,
-1.0,
1.0,
),
steer_speed=in_cmd.lateral.steering_tire_rotation_rate,
speed=in_cmd.longitudinal.speed,
acceleration=in_cmd.longitudinal.acceleration,
jerk=in_cmd.longitudinal.jerk
jerk=in_cmd.longitudinal.jerk,
)
self.current_control = out_cmd

Expand Down Expand Up @@ -414,7 +418,7 @@ def ego_status(self):
out_steering_state.steering_tire_angle = -math.radians(
ego_vehicle.get_wheel_steer_angle(carla.VehicleWheelLocation.FL_Wheel)
)

out_gear_state.stamp = out_vel_state.header.stamp
out_gear_state.report = GearReport.DRIVE

Expand Down

0 comments on commit a9cfcb9

Please sign in to comment.