Commit Graph

5935 Commits

Author SHA1 Message Date
LuisPoveda de74c1b1ce Perfomance improvements.
- SkeletalMesh now is being disabled while the pooled actor is not in use.
- Distances are calculated with squared distance.
- Added a new state for pooled actors to activate them when the vehicle is too close.
2022-11-02 10:39:36 +01:00
LuisPoveda c6a83cb27c Added timer to update pool position every 30 seconds 2022-11-02 10:39:36 +01:00
LuisPoveda 43b4a1e179 restore old values 2022-11-02 10:39:36 +01:00
Axel1092 597bfbc27d
Axel/change colliders (#5896)
* Added local frame option. Fixed inputs for NN

* Add Textures

* Changed texture to grayscale RGB and added check for 'air' particles

* Updated 2k and 4k textures enable parameter for select res texture for deformation

* Fix issue where trying to access TMap when loading

* Use contains functions instead of checking num of elemnts on tmap to make a secure access

* Used ParticlesHeightmap optimization and clear some log

* Fixed number of particles inputs. Removed debug output. Fixed mutex creating cpu stalls

* Decoupling visualization with gamethread

* Make work optimisations

* Disable deformation visualization

* Updated collisions parameters, collisions itself are not updated

* Disable Collisions vehicle with landscape

* Add in pytorch output wheel normal and put them into UE4 and apply to wheels

* Moved collider removal logic

Co-authored-by: Aaron <samaniegoaaron112@gmail.com>
2022-10-31 16:33:27 +01:00
bernatx e117bf9b91 Adding radius parameter for the capsules 2022-10-27 12:09:37 +02:00
LuisPoveda c9df090311 update detection values 2022-10-27 09:58:08 +02:00
LuisPoveda dc69873710 pool now enables the actors also based on distance 2022-10-27 09:58:08 +02:00
Blyron 7a64bae1b5
Aaron/localheightmapopt (#5877)
* Added local frame option. Fixed inputs for NN

* Add Textures

* Changed texture to grayscale RGB and added check for 'air' particles

* Updated 2k and 4k textures enable parameter for select res texture for deformation

* Fix issue where trying to access TMap when loading

* Use contains functions instead of checking num of elemnts on tmap to make a secure access

* Used ParticlesHeightmap optimization and clear some log

Co-authored-by: Axel <axellopez92@outlook.com>
Co-authored-by: bernat <bernatx@gmail.com>
2022-10-26 18:21:51 +02:00
LuisPoveda 2925c33ce0 Vehicle detection box now is not affected by scale
Exposed hide material distance to bp.
2022-10-26 10:28:03 +02:00
Blyron d001e1b78c
Aaron/particlesheightmapfix (#5873)
* Added local frame option. Fixed inputs for NN

* Add Textures

* Changed texture to grayscale RGB and added check for 'air' particles

* Updated 2k and 4k textures enable parameter for select res texture for deformation

* Fix issue where trying to access TMap when loading

* Use contains functions instead of checking num of elemnts on tmap to make a secure access

Co-authored-by: Axel <axellopez92@outlook.com>
2022-10-26 10:08:33 +02:00
adrian-ollero 5bf409765c
Aollero/terramechanics actors and rois preview (#5867)
* Show and hide detailed noise

* Heightmap material updated for previous commit

* Addition of soil type query code to terramechanics component

* Bug creating vegetation and teramechanics actors fixed

* Terrain Rois Presets

Co-authored-by: bernat <bernatx@gmail.com>
2022-10-25 17:37:26 +02:00
Blyron 7682d2e7f6
Aaron/particlesheightmapfix (#5864)
* Added local frame option. Fixed inputs for NN

* Add Textures

* Changed texture to grayscale RGB and added check for 'air' particles

* Updated 2k and 4k textures enable parameter for select res texture for deformation

Co-authored-by: Axel <axellopez92@outlook.com>
2022-10-25 16:13:30 +02:00
LuisPoveda 9830bca05b changed value of material hiding distance 2022-10-25 11:56:43 +02:00
LuisPoveda 810c65399e fixed bug where only one tile was processed. 2022-10-25 11:56:43 +02:00
aollero 9718e233b4 Terramechanics and Vegetation manager actors 2022-10-25 09:50:13 +02:00
aollero 0ec4cbded9 Invert range warpped from [0,1] range to [-1,1] 2022-10-25 09:50:13 +02:00
Axel bb679c5319 Removed unnecessary ; 2022-10-24 16:58:24 +02:00
Axel 090257292f Added local frame option. Fixed inputs for NN 2022-10-24 16:58:24 +02:00
LuisPoveda bc23f261e5
Luis/vegetation videos (#5861)
* fixed pool increasing size fast.

* Fixed pools

* get the vehicle each frame

* Fixed bug when starting a new manual control script.

* Fixed xerces-c dependency

* fixed xerces-c dependencies

* Adding backup for xerces-c library

* Fix the duplication of collision capsules, and remove the impulse with static bones

* enable impulse force again, for static bones

* nullptr tile bug fixed

Co-authored-by: Axel <axellopez92@outlook.com>
Co-authored-by: bernatx <bernatx@gmail.com>
2022-10-24 10:35:29 +02:00
bernatx bcf3471586 Ignore large maps for testing spawn points 2022-10-21 00:29:49 +02:00
Joel Moriana c5abee5e79 anticipation algorithm updated 2022-10-20 16:25:31 +02:00
bernatx f628f204b4 Adding backup for xerces-c library 2022-10-20 10:31:16 +02:00
Axel 2f739238e4 fixed xerces-c dependencies 2022-10-20 10:31:16 +02:00
Axel 4e4d59fad9 Fixed xerces-c dependency 2022-10-19 10:37:10 +02:00
Blyron 416ef2b79c
Aaron/deformation (#5837)
* Added deformation effect multiplayer as parameter

* Removal Particles from container multithreaded

* Paralelize particle update, get less particles just taking texture radius, changing how we get intersecting tiles

* Added min max displacement parameters

* Fixed tiles not being searched correctly, fixed probable race condition

Co-authored-by: Axel <axellopez92@outlook.com>
2022-10-18 09:58:51 +02:00
Axel 16ec77d5e4 Added terramechanics flag to manual_control.py 2022-10-18 09:58:10 +02:00
Axel 9765e39d63 Added terramechanics atribute 2022-10-18 09:58:10 +02:00
Bernd Gassmann 6c4d676569 Prevent from segfault OnTriggerEndOverlap
In case the OtherActor is not a Vehicle just return
2022-10-17 16:21:58 +02:00
MattRowe18 39a827e061 spelling 2022-10-17 16:18:24 +02:00
MattRowe18 43029d449b updated linux build docs 2022-10-17 16:18:24 +02:00
MattRowe18 a4f5c26efa added extra traffic manager functions 2022-10-17 16:18:24 +02:00
MattRowe18 e753be908b corrected image paths in content authoring vehicles 2022-10-17 16:18:24 +02:00
MattRowe18 3482f6ffa6 first steps code typos 2022-10-17 16:18:24 +02:00
adrian-ollero 6117e548ae
Aollero/terrain rois (#5834)
* Terrain rois defined within the user widget

* Improvementes in ROIs blending with original heightmap

* Rois Tiling fixed

* Support for multiple ROIs (overlapping bug)

* Minor improvementes in river placement

* Support for Spreaded and specific actors ROIs

* Soil type Rois supported in widget

* Soil type assignment to main map container actor

* Soil type queried from soil type actor soil list and tag

* Cleaning code

* Basic Spreaded Actors feature

* Single selection for specific actors placement

* Misc Persistent state for specific location actors implemented

* Spreaded Actors feature completed

* Spreaded Actors Tagged, offset and delete option code

* Specific Location Actor basic implementation

* Specific actor placement feauture completed

* Terrain Editor Bugs Fixed

* Missing icon

* Smoothing terrain boundaries

* Sewing between terrain tiles

* Terrain overlapping ROIs not allowed

* Overlapping message bug fixed

* Preset c++ funtions

* Improvements in the terrain generation

* Presets creation

* Terrain preset feature finished

* Missing references fixed

* Format errors fixed

* Last format fixes

* Error in static member

* Changing tabs for spaces

* Identation to spaces

* Duplicated include deleted

Co-authored-by: bernat <bernatx@gmail.com>
2022-10-17 16:17:22 +02:00
bernatx 5e4e82ab2e upgrade zlib to 1.2.13 and add backup 2022-10-17 09:37:49 +02:00
bernatx f6348a2d84 Fix smoke test 2022-10-13 14:30:58 +02:00
Axel 9c751a7033 Fixed bone rotation for vegetation 2022-10-13 13:35:49 +02:00
Axel f3065f2541 Fixed terrain_type = 0 not processing the input 2022-10-13 13:35:49 +02:00
bernatx f0b4e6af99 Fixing unsigned variable 2022-10-13 13:17:58 +02:00
Aaron 7a39d4f23d Add variable and check if not zero to avoid divide by zero 2022-10-13 13:17:58 +02:00
anrp 4e949228d4 Fix shared_ptr cycles in C++ carla::Client
carla::client::detail::Simulator had a strong reference from
carla::client::LightManager, which meant that deleting the client-facing
carla::Client did not actually delete the Simulator object, meaning that
it remained connected. Fix that.
2022-10-13 12:50:04 +02:00
bernatx 38b020910a content version 2022-10-11 22:29:17 +02:00
Guillermo dec92e690c Fixed collision detection 2022-10-11 16:03:32 +02:00
Axel1092 aeac45b09c
Terramechanics and Vegetation fixes (#5820)
* Added sparse map reprsentation

* Added pytorch for terramechanics modules

* Added saving loading particles in independent thread

* Added blank space at the EOF

* Added texture creation lambda

* Moving function to component

* Added input/output architecture for neural network

* Filling heightmap with particles data. Adding Logging to debug

* Updating Texture data at realtime

* Connected 3 stages, using MPC Position to Update and Texture

* Added square particle sampling. Added second model input/output scheme. Fixed start up crash.

* Added new flags and fixes

* Position to update not updating in material but yes in MPC

* Fixed coordinate frame issues and crashes

* Prepared to follow position in the 1st vehicle in map

* Fixed height map alignment

* Fixed large map and terrain tiles alignment

* Fixed inputs for new model

* Added scale factor

* Fixed slow read write operations

* Bug fixes

* Removed debug output

* Removed nvidia profinling marks

* Preparing merge debug code removed, runtime working by rounding the loading data properly

* Made pytorch optional module

* Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture

* Added optional pytorch conditions and macros

* Removed static Path

* fixed not finding skeletal blueprints in shipping builds

* Fixed #ifdef clause. Added missing include.

* Deformation on vehicle working. Ready to start optimisation

* First optimsation done. Heightmap per Tile

* Updated tiles'heightmap to make their size relative to texture and tilesize

* Physics fixed.
- Removed re-aplying forces all the time.
- Removed collisions with the static meshes.

* Fixed slow frames. Added functionality

* Removed unecessary library links

* Fixed pytorch link

* Limited search to relevant tiles

* Added parameter to modify torque and forces for nested bones.

* Forgot to add file.

* Added multithreaded particle search. Fixed cuda architectures compilation

* removed old unused code

* fix windows compilation

* collisions now are applied from the closest point.
added debug bools to enable more collisions and draw collision points.

* Removed old code.

* Fixed bug with distance less than zero.

* Try to stabilize a bit

* CHanged repulsion forces so that contacts end with equilibrium

* Deformation plane added

* Added missing resources

* Updated particle movement update methods

* Spawn on runtime deformation plane

* Added cachemap lock when initializing a region

* Added UHeightMapDataAsset to hold heightmap data

* Changes to tile location computation and threaded structure

* Added lock to prevent parallel intialization of tiles

* Adding support for large texture

* Fixed infinite loop

* Removed unnecessary function, changed particle ordering

* Disable Enable plane and Change path to create folder

* Added debug options for particles, added fraction based displacement

* Tried to round to have deterministic rounds in Coords calculations

* Revert files

* Fixes to enable UCustomTerrainPhysicsComponent to interact with ALargeMapManager

* Now all foliages are spawned correctly.
- SpringBasedVegetationComponent: Added the posibility to set bones as static. This static bones will use the OnCollisionEvent instead overlap events.
- VegetationManager: Removed unnecessary variables.
- VegetationManager: Now the FTileData supports multiple level loads for the same tile.
- VegetationManager: Refactor the code.

* Remove unnecessary logs

* Resolve Conflict

* Added Local tile displacement field

* Removed Freeing CacheData

* Fixes to enable UCustomTerrainPhysicsComponent to interact with ALargeMapManager

* Added Local tile displacement field

* Update Heightmaps

* Mark for initial update generated tiles

* Added soil component field and code clean up

* Fix with the path for debug foliages.

* Added flag to atenuate particle forces

* Fix compilation in windows

* Removing 'can rest' feature

* Removed Tile being recreated losing tree references.

* Fixing sleep

* Check index is valid before accesing it preventing crash when loading  tiles from files

* Add debug position, add logging when removing and adding particles to zordered map, now only remove one element from multisets

* Initialize tile's heightmap on the fly not read it from file

* Fixed link errors

* Added debug to location when not vehicle loaded. Taking Height from ZOrdered particles instead from tile local heightmap

* Mitigation of vibration

* Remove unused code

* fixed white textures

* Fixed Z spin in some situations

* Multithread savemap and added more logging for debug purpouses

* Removing non used code. Updating texture based on tiles position instead of cars position

* Fixed terrain type flag not working

* add checks for tile removing only with valid pointers.

* Fixed map loading crash

Co-authored-by: Aaron <samaniegoaaron112@gmail.com>
Co-authored-by: LuisPoveda <lpoveda@cvc.uab.cat>
Co-authored-by: bernatx <bernatx@gmail.com>
2022-10-10 12:32:25 +02:00
bernatx 67d7da7e88 changelog 2022-09-28 13:54:04 +02:00
bernatx e9a7c321cd Adding new attachment type 'SpringArmGhost' 2022-09-28 13:54:04 +02:00
LuisPoveda 89ba3f0397
Luis/fix package (#5794)
* fixed not finding skeletal blueprints in shipping builds

* Physics fixed.
- Removed re-aplying forces all the time.
- Removed collisions with the static meshes.

* Added parameter to modify torque and forces for nested bones.

* Forgot to add file.

* removed old unused code

* fix windows compilation

* collisions now are applied from the closest point.
added debug bools to enable more collisions and draw collision points.

* Removed old code.

* Fixed bug with distance less than zero.

* Try to stabilize a bit

* CHanged repulsion forces so that contacts end with equilibrium

* Now all foliages are spawned correctly.
- SpringBasedVegetationComponent: Added the posibility to set bones as static. This static bones will use the OnCollisionEvent instead overlap events.
- VegetationManager: Removed unnecessary variables.
- VegetationManager: Now the FTileData supports multiple level loads for the same tile.
- VegetationManager: Refactor the code.

* Remove unnecessary logs

* Resolve Conflict

* Removed Freeing CacheData

* Removing 'can rest' feature

Co-authored-by: bernatx <bernatx@gmail.com>
Co-authored-by: Axel <axellopez92@outlook.com>
2022-09-28 13:53:43 +02:00
Blyron 0d9b05b73b
Aaron/particlesheightmap (#5783)
* Added sparse map reprsentation

* Added pytorch for terramechanics modules

* Added saving loading particles in independent thread

* Added blank space at the EOF

* Added texture creation lambda

* Moving function to component

* Added input/output architecture for neural network

* Filling heightmap with particles data. Adding Logging to debug

* Updating Texture data at realtime

* Connected 3 stages, using MPC Position to Update and Texture

* Added square particle sampling. Added second model input/output scheme. Fixed start up crash.

* Added new flags and fixes

* Position to update not updating in material but yes in MPC

* Fixed coordinate frame issues and crashes

* Prepared to follow position in the 1st vehicle in map

* Fixed height map alignment

* Fixed large map and terrain tiles alignment

* Fixed inputs for new model

* Added scale factor

* Fixed slow read write operations

* Bug fixes

* Removed debug output

* Removed nvidia profinling marks

* Preparing merge debug code removed, runtime working by rounding the loading data properly

* Made pytorch optional module

* Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture

* Added optional pytorch conditions and macros

* Removed static Path

* Fixed #ifdef clause. Added missing include.

* Deformation on vehicle working. Ready to start optimisation

* First optimsation done. Heightmap per Tile

* Updated tiles'heightmap to make their size relative to texture and tilesize

* Fixed slow frames. Added functionality

* Removed unecessary library links

* Fixed pytorch link

* Limited search to relevant tiles

* Added multithreaded particle search. Fixed cuda architectures compilation

* Deformation plane added

* Added missing resources

* Updated particle movement update methods

* Spawn on runtime deformation plane

* Added cachemap lock when initializing a region

* Added UHeightMapDataAsset to hold heightmap data

* Changes to tile location computation and threaded structure

* Added lock to prevent parallel intialization of tiles

* Adding support for large texture

* Fixed infinite loop

* Removed unnecessary function, changed particle ordering

* Disable Enable plane and Change path to create folder

* Added debug options for particles, added fraction based displacement

* Tried to round to have deterministic rounds in Coords calculations

* Revert files

Co-authored-by: Axel <axellopez92@outlook.com>
2022-09-23 16:37:52 +02:00
Axel1092 a6be1a67f3
Pytorch integration with terramechanics (#5684)
* Added sparse map reprsentation

* Added pytorch for terramechanics modules

* Added saving loading particles in independent thread

* Added blank space at the EOF

* Added texture creation lambda

* Moving function to component

* Added input/output architecture for neural network

* Filling heightmap with particles data. Adding Logging to debug

* Updating Texture data at realtime

* Connected 3 stages, using MPC Position to Update and Texture

* Added square particle sampling. Added second model input/output scheme. Fixed start up crash.

* Added new flags and fixes

* Position to update not updating in material but yes in MPC

* Fixed coordinate frame issues and crashes

* Prepared to follow position in the 1st vehicle in map

* Fixed height map alignment

* Fixed large map and terrain tiles alignment

* Fixed inputs for new model

* Added scale factor

* Fixed slow read write operations

* Bug fixes

* Removed debug output

* Removed nvidia profinling marks

* Preparing merge debug code removed, runtime working by rounding the loading data properly

* Made pytorch optional module

* Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture

* Added optional pytorch conditions and macros

* Removed static Path

* Fixed #ifdef clause. Added missing include.

* Deformation on vehicle working. Ready to start optimisation

* First optimsation done. Heightmap per Tile

* Updated tiles'heightmap to make their size relative to texture and tilesize

* Fixed slow frames. Added functionality

* Removed unecessary library links

* Fixed pytorch link

* Limited search to relevant tiles

* Added multithreaded particle search. Fixed cuda architectures compilation

* Deformation plane added

* Added missing resources

* Updated particle movement update methods

* Spawn on runtime deformation plane

* Added cachemap lock when initializing a region

* Added UHeightMapDataAsset to hold heightmap data

* Fixing some settings

Co-authored-by: Aaron <samaniegoaaron112@gmail.com>
Co-authored-by: bernatx <bernatx@gmail.com>
2022-09-23 15:39:09 +02:00
bernatx 634066c19c content version and avoid large map test 2022-09-16 16:45:40 +02:00