-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from HARPLab/gamemode
Improve general functionality and usability
- Loading branch information
Showing
191 changed files
with
2,568 additions
and
2,802 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-72.5 KB
Blueprints/Vehicles/DReyeVR/Mirrors/RearMirror_DReyeVR_Glass_SM.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.6 KB
Blueprints/Vehicles/DReyeVR/Sounds/EngineRev/EngineAttenuation.uasset
Binary file not shown.
Binary file removed
BIN
-97.3 KB
Blueprints/Vehicles/DReyeVR/SteeringWheel/SM_SteeringWheel_DReyeVR.uasset
Binary file not shown.
Binary file removed
BIN
-76.8 KB
Blueprints/Vehicles/DReyeVR/SteeringWheel/SM_SteeringWheel_PhysicsAsset_DReyeVR.uasset
Binary file not shown.
Binary file removed
BIN
-3.24 KB
Blueprints/Vehicles/DReyeVR/SteeringWheel/SM_SteeringWheel_Skeleton_DReyeVR.uasset
Binary file not shown.
Binary file removed
BIN
-156 KB
Blueprints/Vehicles/DReyeVR/SteeringWheel/SM_SteeringWheel_v2_DReyeVR.uasset
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## DReyeVR 0.1.0 (for Carla 0.9.13) | ||
- Replace existing `LevelScript` (`ADReyeVRLevel`) with `GameMode` (`ADReyeVRGameMode`). This allows us to not need to carry the (large) map blueprint files (ue4 binary) and we can use the vanilla Carla maps without modification. By default we spawn the EgoVehicle in the first of the recommended Carla locations, but this default behavior can be changed in the PythonAPI. For instance, you can delay spawning the EgoVehicle until via PythonAPI where you can specify the spawn transform. Existing functionality is preserved using `find_ego_vehicle` and `find_ego_sensor` which spawn the DReyeVR EgoVehicle if it does not exist in the world. | ||
- Added `ADReyeVRFactory` as the Carla-esque spawning and registry functionality so the `EgoVehicle` and `EgoSensor` are spawned with the same "Factory" mechanisms as existing Carla vehicles/sensors/props/etc. | ||
- Renamed DReyeVR-specific actors to be addressible in PythonAPI as `"harplab.dreyevr_$X.$id"` such as `"harplab.dreyevr_vehicle.model3"` and `"harplab.dreyevr_sensor.ego_sensor"`. Avoids conflicts with existing Carla PythonAPI scripts that may filter on `"vehicle.*"`. | ||
- Moved all blueprint (`.uasset`) content out of the Carla content (which is now entirely untouched, no need to re-update) to a separate Content folder that lies in `/Game/Content/DReyeVR/` (renamed to support future DReyeVR blueprint changes without relying on Carla content). | ||
- Adding check that SRanipal is within one of our recommended supported versions: `1.3.1.1`, `1.3.2.0`, & `1.3.3.0`. Also provided links in the documentation to download these versions. Additionally included a workaround for the old `patch-sranipal` which is now no longer needed. | ||
- Added custom `LogDReyeVR` macros (`LOG`, `LOG_WARN`, `LOG_ERROR`) for improved logging with attached file, function, and line number to the message. Done in precompilation to avoid runtime performance overhead. | ||
- Improved `make check` to ensure that a 1:1 file correspondence exists between Carla dest and DReyeVR source, and that all files have equal content. | ||
- Improved vehicle dash with blinking turn signal and fixed bugs with inconsistent gear indicator. | ||
- Fixed bugs and inconsistencies with replayer media control and special actions such as toggling reverse/turn signals in replay. | ||
- Enabled cooking for `Town06` and `Town07` in package/shipping mode. | ||
- Updated documentation and config file |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. | ||
|
||
// This file is included before any other file in every compile unit within the | ||
// plugin. | ||
#pragma once | ||
|
||
|
||
#include "Util/NonCopyable.h" | ||
#include "Logging/LogMacros.h" | ||
#include "Modules/ModuleInterface.h" | ||
|
||
DECLARE_LOG_CATEGORY_EXTERN(LogCarla, Log, All); | ||
DECLARE_LOG_CATEGORY_EXTERN(LogCarlaServer, Log, All); | ||
|
||
// DisplayName, GroupName, Third param is always Advanced. | ||
// DECLARE_STATS_GROUP(TEXT("Carla"), STATGROUP_Carla, STATCAT_Advanced); | ||
DECLARE_STATS_GROUP(TEXT("CarlaSensor"), STATGROUP_CarlaSensor, STATCAT_Advanced); | ||
|
||
//DECLARE_MEMORY_STAT(TEXT("CARLAMEMORY"), STATGROUP_CARLAMEMORY, STATCAT_Advanced) | ||
|
||
DECLARE_CYCLE_STAT(TEXT("Read RT"), STAT_CarlaSensorReadRT, STATGROUP_CarlaSensor); | ||
DECLARE_CYCLE_STAT(TEXT("Copy Text"), STAT_CarlaSensorCopyText, STATGROUP_CarlaSensor); | ||
DECLARE_CYCLE_STAT(TEXT("Buffer Copy"), STAT_CarlaSensorBufferCopy, STATGROUP_CarlaSensor); | ||
DECLARE_CYCLE_STAT(TEXT("Stream Send"), STAT_CarlaSensorStreamSend, STATGROUP_CarlaSensor); | ||
|
||
// Options to compile with extra debug log. | ||
#if WITH_EDITOR | ||
// #define CARLA_AI_VEHICLES_EXTRA_LOG | ||
// #define CARLA_AI_WALKERS_EXTRA_LOG | ||
// #define CARLA_ROAD_GENERATOR_EXTRA_LOG | ||
// #define CARLA_SERVER_EXTRA_LOG | ||
// #define CARLA_TAGGER_EXTRA_LOG | ||
// #define CARLA_WEATHER_EXTRA_LOG | ||
#endif // WITH_EDITOR | ||
|
||
class FCarlaModule : public IModuleInterface | ||
{ | ||
void RegisterSettings(); | ||
void UnregisterSettings(); | ||
bool HandleSettingsSaved(); | ||
void LoadChronoDll(); | ||
|
||
public: | ||
|
||
/** IModuleInterface implementation */ | ||
virtual void StartupModule() override; | ||
virtual void ShutdownModule() override; | ||
|
||
}; | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
//////////////////////DReyeVR logging from CarlaUE4.h////////////////////////// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
// fancy logging that includes [filename::function:line] prefix | ||
#ifndef __DReyeVR_LOG | ||
|
||
/// TODO: remove duplicate code! (Also defined in CarlaUE4.h) | ||
constexpr inline const char *file_name_only(const char *path) | ||
{ | ||
// note since this is a constexpr function, it gets evaluated at compile time rather | ||
// than runtime so there is no runtime performance overhead! | ||
#ifdef _WIN32 | ||
constexpr char os_sep = '\\'; | ||
#else | ||
constexpr char os_sep = '/'; | ||
#endif | ||
const char *filename_start = path; | ||
while (*path) | ||
{ | ||
if (*path++ == os_sep) // keep searching until found last os sep | ||
filename_start = path; | ||
} | ||
return filename_start; // includes extension | ||
} | ||
|
||
|
||
#define __DReyeVR_LOG(msg, verbosity, ...) \ | ||
UE_LOG(LogCarla, verbosity, TEXT("[%s::%s:%d] %s"), UTF8_TO_TCHAR(file_name_only(__FILE__)), \ | ||
UTF8_TO_TCHAR(__func__), __LINE__, *FString::Printf(TEXT(msg), ##__VA_ARGS__)); | ||
#endif | ||
|
||
#define DReyeVR_LOG(msg, ...) __DReyeVR_LOG(msg, Log, ##__VA_ARGS__); | ||
#define DReyeVR_LOG_WARN(msg, ...) __DReyeVR_LOG(msg, Warning, ##__VA_ARGS__); | ||
#define DReyeVR_LOG_ERROR(msg, ...) __DReyeVR_LOG(msg, Error, ##__VA_ARGS__); |
Oops, something went wrong.