Fix simulator docker: CPU only for now (#20227)

* initial commit

* CPU working in dokcer

* Update selfdrive/manager.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/manager.py

* fixes

* fixing env var

* fixes

* building and running in docker

* camerad fix

* camerad fix

* this ACTUALLY works

* removing unused libraries

* updating to CARLA 0.9.11

* removing useless flags

* small changes

* forgot this

* sudo not needed for xhost

* final changes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 968ed10200913d81833e87a738cd780089eb0eaa
This commit is contained in:
iejMac
2021-03-07 23:02:57 -08:00
committed by GitHub
parent 3ed4ffbc30
commit afc0597686
6 changed files with 41 additions and 54 deletions
+6 -7
View File
@@ -19,7 +19,7 @@ parser.add_argument('--joystick', action='store_true')
parser.add_argument('--town', type=str, default='Town04')
parser.add_argument('--spawn_point', dest='num_selected_spawn_point',
type=int, default=16)
parser.add_argument('--cloudyness', default=0.1, type=float)
parser.add_argument('--cloudiness', default=0.1, type=float)
parser.add_argument('--precipitation', default=0.0, type=float)
parser.add_argument('--precipitation_deposits', default=0.0, type=float)
parser.add_argument('--wind_intensity', default=0.0, type=float)
@@ -62,7 +62,7 @@ def cam_callback(image):
dat = messaging.new_message('roadCameraState')
dat.roadCameraState = {
"frameId": image.frame,
"image": img.tostring(),
"image": img.tobytes(),
"transform": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
}
pm.send('roadCameraState', dat)
@@ -118,7 +118,6 @@ def fake_driver_monitoring():
"faceDetected": True,
"isDistracted": False,
"awarenessStatus": 1.,
"isRHD": False,
}
pm.send('driverMonitoringState', dat)
@@ -143,7 +142,7 @@ def go(q):
world_map = world.get_map()
vehicle_bp = blueprint_library.filter('vehicle.tesla.*')[0]
vehicle_bp = blueprint_library.filter('vehicle.tesla.*')[1]
spawn_points = world_map.get_spawn_points()
assert len(spawn_points) > args.num_selected_spawn_point, \
f'''No spawn point {args.num_selected_spawn_point}, try a value between 0 and
@@ -167,12 +166,12 @@ def go(q):
blueprint.set_attribute('image_size_y', str(H))
blueprint.set_attribute('fov', '70')
blueprint.set_attribute('sensor_tick', '0.05')
transform = carla.Transform(carla.Location(x=0.8, z=1.45))
transform = carla.Transform(carla.Location(x=0.8, z=1.13))
camera = world.spawn_actor(blueprint, transform, attach_to=vehicle)
camera.listen(cam_callback)
world.set_weather(carla.WeatherParameters(
cloudyness=args.cloudyness,
cloudiness=args.cloudiness,
precipitation=args.precipitation,
precipitation_deposits=args.precipitation_deposits,
wind_intensity=args.wind_intensity,
@@ -278,7 +277,7 @@ def go(q):
sm.update(0)
throttle_op = sm['carControl'].actuators.gas #[0,1]
brake_op = sm['carControl'].actuators.brake #[0,1]
steer_op = sm['controlsState'].angleSteersDes # degrees [-180,180]
steer_op = sm['controlsState'].steeringAngleDesiredDeg # degrees [-180,180]
throttle_out = throttle_op
steer_out = steer_op