Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sensor-interface#200' into Optim…
Browse files Browse the repository at this point in the history
…izations

Walkers now detect vehicles properly
New sensors sends pixel buffers in render queue
  • Loading branch information
juaxix committed Feb 26, 2018
2 parents fa436b1 + bb3b869 commit a2a6105
Show file tree
Hide file tree
Showing 149 changed files with 4,010 additions and 1,450 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Util/Build
__pycache__
_benchmarks_results
_images*
_out
core
8 changes: 4 additions & 4 deletions CARLA.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{
"name": "CARLA - make CarlaUE4",
"working_dir": "${project_path}/Unreal/CarlaUE4",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"file_regex": "Unreal\\/CarlaUE4\\/([^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"linux":
{
Expand All @@ -86,7 +86,7 @@
{
"name": "CARLA - make CarlaUE4 ARGS=-clean",
"working_dir": "${project_path}/Unreal/CarlaUE4",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"file_regex": "Unreal\\/CarlaUE4\\/([^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"linux":
{
Expand All @@ -96,7 +96,7 @@
{
"name": "CARLA - make CarlaUE4Editor",
"working_dir": "${project_path}/Unreal/CarlaUE4",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"file_regex": "Unreal\\/CarlaUE4\\/([^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"linux":
{
Expand All @@ -106,7 +106,7 @@
{
"name": "CARLA - make CarlaUE4Editor ARGS=-clean",
"working_dir": "${project_path}/Unreal/CarlaUE4",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"file_regex": "Unreal\\/CarlaUE4\\/([^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"syntax": "Packages/Makefile/Make Output.sublime-syntax",
"linux":
{
Expand Down
105 changes: 58 additions & 47 deletions Docs/Example.CarlaSettings.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
; Example of settings file for CARLA.
;
; Use it with `./CarlaUE4.sh -carla-settings=Path/To/This/File`.
; This file can be loaded with the Python client to be sent to the server. It
; defines the parameters to be used when requesting a new episode.
;
; Note that server specific variables are loaded in server only. Use it with
; `./CarlaUE4.sh -carla-settings=Path/To/This/File`.

[CARLA/Server]
; If set to false, a mock controller will be used instead of waiting for a real
; client to connect.
; client to connect. (Server only)
UseNetworking=true
; Ports to use for the server-client communication. This can be overridden by
; the command-line switch `-world-port=N`, write and read ports will be set to
; N+1 and N+2 respectively.
; N+1 and N+2 respectively. (Server only)
WorldPort=2000
; Time-out in milliseconds for the networking operations.
; Time-out in milliseconds for the networking operations. (Server only)
ServerTimeOut=10000
; In synchronous mode, CARLA waits every frame until the control from the client
; is received.
Expand All @@ -36,16 +40,26 @@ WeatherId=1
SeedVehicles=123456789
SeedPedestrians=123456789

[CARLA/SceneCapture]
; Names of the cameras to be attached to the player, comma-separated, each of
; them should be defined in its own subsection. E.g., Uncomment next line to add
; a camera called MyCamera to the vehicle
[CARLA/Sensor]
; Names of the sensors to be attached to the player, comma-separated, each of
; them should be defined in its own subsection.

; Uncomment next line to add a camera called MyCamera to the vehicle
; Sensors=MyCamera

; or uncomment next line to add a camera and a LiDAR
; Sensors=MyCamera,MyLidar

; Cameras=MyCamera
; or uncomment next line to add a regular camera and a depth camera
; Sensors=MyCamera,MyCamera/Depth

; Now, every camera we added needs to be defined it in its own subsection.
[CARLA/SceneCapture/MyCamera]
; Post-processing effect to be applied. Valid values:
[CARLA/Sensor/MyCamera]
; Type of the sensor. The available types are:
; * CAMERA A scene capture camera.
; * LIDAR_RAY_TRACE A LiDAR implementation based on ray-tracing.
SensorType=CAMERA
; Post-processing effect to be applied to this camera. Valid values:
; * None No effects applied.
; * SceneFinal Post-processing present at scene (bloom, fog, etc).
; * Depth Depth map ground-truth only.
Expand All @@ -55,42 +69,39 @@ PostProcessing=SceneFinal
ImageSizeX=800
ImageSizeY=600
; Camera (horizontal) field of view in degrees.
CameraFOV=90
FOV=90
; Position of the camera relative to the car in centimeters.
CameraPositionX=15
CameraPositionY=0
CameraPositionZ=123
PositionX=15
PositionY=0
PositionZ=123
; Rotation of the camera relative to the car in degrees.
CameraRotationPitch=8
CameraRotationRoll=0
CameraRotationYaw=0
RotationPitch=8
RotationRoll=0
RotationYaw=0

; Stereo setup example:
;
; [CARLA/SceneCapture]
; Cameras=CameraStereoLeft/RGB,CameraStereoLeft/Depth,CameraStereoRight/RGB,CameraStereoRight/Depth
; ImageSizeX=720
; ImageSizeY=512
; CameraFOV=90
; [CARLA/SceneCapture/CameraStereoLeft]
; CameraPositionX=170
; CameraPositionY=-30
; CameraPositionZ=150
; CameraRotationPitch=0
; CameraRotationRoll=0
; CameraRotationYaw=0
; [CARLA/SceneCapture/CameraStereoLeft/RGB]
; PostProcessing=SceneFinal
; [CARLA/SceneCapture/CameraStereoLeft/Depth]
; PostProcessing=Depth
; [CARLA/SceneCapture/CameraStereoRight]
; CameraPositionX=170
; CameraPositionY=30
; CameraPositionZ=150
; CameraRotationPitch=0
; CameraRotationRoll=0
; CameraRotationYaw=0
; [CARLA/SceneCapture/CameraStereoRight/RGB]
; PostProcessing=SceneFinal
; [CARLA/SceneCapture/CameraStereoRight/Depth]
; PostProcessing=Depth
[CARLA/Sensor/MyCamera/Depth]
; The sensor can be defined in a subsection of MyCamera so it inherits the
; values in MyCamera. This adds a camera similar to MyCamera but generating
; depth map images instead.
PostProcessing=Depth

[CARLA/Sensor/MyLidar]
SensorType=LIDAR_RAY_TRACE
; Number of lasers.
Channels=32
; Measure distance in centimeters.
Range=5000
; Points generated by all lasers per second.
PointsPerSecond=100000
; Lidar rotation frequency.
RotationFrequency=10
; Upper and lower laser angles, positive values means above horizontal line.
UpperFOVLimit=10
LowerFOVLimit=-30
; Position and rotation relative to the vehicle.
PositionX=0
PositionY=0
PositionZ=140
RotationPitch=0
RotationYaw=0
RotationRoll=0
7 changes: 4 additions & 3 deletions Docs/carla_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ Server only writes, first measurements message then the bulk of raw images.

Every image is an array of uint32's

[width, height, type, color[0], color[1],...]
[width, height, type, FOV, color[0], color[1],...]

where each color is an [FColor][fcolorlink] (BGRA) as stored in Unreal Engine,
and the possible types of images are
where FOV is the horizontal field of view of the camera as float, each color is
an [FColor][fcolorlink] (BGRA) as stored in Unreal Engine, and the possible
types of images are

type = 0 None (RGB without any post-processing)
type = 1 SceneFinal (RGB with post-processing present at the scene)
Expand Down
2 changes: 1 addition & 1 deletion PythonClient/.pylintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[TYPECHECK]
ignore=carla_server_pb2.py
ignored-modules=ConfigParser,numpy,numpy.random,pygame,shutil
ignored-classes=_socketobject,EpisodeReady
ignored-classes=_socketobject,EpisodeReady,SceneDescription,Sensor
2 changes: 1 addition & 1 deletion PythonClient/carla/benchmarks/corl_2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _build_experiments(self):
# This single RGB camera is used on every experiment

camera = Camera('CameraRGB')
camera.set(CameraFOV=100)
camera.set(FOV=100)

camera.set_image_size(800, 600)

Expand Down
Loading

0 comments on commit a2a6105

Please sign in to comment.