Commit Graph

37 Commits

Author SHA1 Message Date
doterop 85b192530d
Doterop/traffic manager (#2468)
* Initial implementation of t.m. performance script

* Remove redundant getLocation() calls

* Demo for inter-client communication via Carla server

* WIP: To do: For client usage needed to be changed.

* Instead or client instance episodeProxy is passed to TM

* Instead or client instance episodeProxy is passed to TM

* parmeter improvements (walkers,cars,signs,lights)

* adding section id to map setup

* fix manual_control to reload car with autopilot on

* Instead of client instance episodeProxy is passed to TM.

* WIP: Only added vehicle register via RPC server / client call in TM to
local instance from remote instance. Similarly other APIs we need to
added.

* Added all TM APIs

* carla client now can provide TM instance if required.

* While getting TM instance if server given data is not valid new TM
instace is created. Need to decide what to do with earlier registed
vehicle with previous TM.

* Updated with HealthCheckRemoteTM() function to check TM server status
instead of ResetAllTrafficLights() for any new user client.

* Dynamic port selection added to TM server instace (in case of multiple
TM serve run, it required).

* Fixed change map error

* If registered TM at carla server is not present then remote TM should be
freed and new local TM instance is created.

* Created Process for Local TM.
It cheaks with total registered vehicles in it, if no register vehicles
for 5 sec, it closes it self.

In python spawn_npc.py Client Timeout set to 10 sec. as creating Process
is system dependent call and takes time.

User has to unregister vehicle before destroying it (if activated with
TM). Also neet to check TM unregister function to remove vehicles from
register list.

* Fix for collision ignore bug

* Update TM exit function check to compare registered vehicles with world
actors that if any valid vehicle present cointinue to run the TM else
stop.

* Print removal

* Splited work of main for loop in ApplyBatchCommandsSync

* WIP! Trying to get client directly

* WIP! Trying to access episode properly without getting it from TM ctr

* Changes to BatchControlStage for Sync Mode
Changes to Parameters for Synch Mode

* Added port support for TM. Multiclient MultiTM

* Added additions for RPC Synchronous Tick to TM.
Error handeling and code organization.

* Exposed API for Sync Mode

* TMServer notifies Server that it is gonna be destroyed

* Exposed Python API for Sync Mode

* Add TM as separate process and synchronous tick calls

* SetSynchronousModeTimeOutInMiliSecond method added

* TM shutsdown and informs to the connected clients

* WIP! Map change issues again

* Updated Traffic Manager for:
1) Multi-client, Multi-TM (as required) can be reistered to server.
2) TM is not a PROCESS separated from the user-client.
3) TM will exit if user-client exit.
4) If server closed, TM also get closed by catching runtime err.

* Server side changes ...

* Fixed possible stall on TM destruction

* fixing collision stage + cybertruck not safe

* Merge branch 'master' into 'soumyadeep/traffic_manager'

* WIP! Disconnection of server has to be properly handled by clients

* format update

* Fix bug unsignalized junctions

* # WARNING: head commit changed in the meantime

Merge branch 'doterop/traffic_manager' into soumyadeep/traffic_manager
Updates for Syncronized Tick.

* Updated runtime exception in Episode for smooth exit if TN server closed
for any other user client.

* Better Exception handeling

* Merged with jackbart94/tm_reduce_getloc_calls

* Merged soumyadeep/traffic_manager.
Removed World getter and recovered Episode as a parameter of TM ctr.
Fixed syntax errors.

* Initial implementation of t.m. performance script

* Remove redundant getLocation() calls

* Demo for inter-client communication via Carla server

* WIP: To do: For client usage needed to be changed.

* Instead or client instance episodeProxy is passed to TM

* Instead or client instance episodeProxy is passed to TM

* parmeter improvements (walkers,cars,signs,lights)

* fix manual_control to reload car with autopilot on

* Instead of client instance episodeProxy is passed to TM.

* WIP: Only added vehicle register via RPC server / client call in TM to
local instance from remote instance. Similarly other APIs we need to
added.

* Added all TM APIs

* carla client now can provide TM instance if required.

* While getting TM instance if server given data is not valid new TM
instace is created. Need to decide what to do with earlier registed
vehicle with previous TM.

* Updated with HealthCheckRemoteTM() function to check TM server status
instead of ResetAllTrafficLights() for any new user client.

* Dynamic port selection added to TM server instace (in case of multiple
TM serve run, it required).

* Fixed change map error

* If registered TM at carla server is not present then remote TM should be
freed and new local TM instance is created.

* Created Process for Local TM.
It cheaks with total registered vehicles in it, if no register vehicles
for 5 sec, it closes it self.

In python spawn_npc.py Client Timeout set to 10 sec. as creating Process
is system dependent call and takes time.

User has to unregister vehicle before destroying it (if activated with
TM). Also neet to check TM unregister function to remove vehicles from
register list.

* Fix for collision ignore bug

* Update TM exit function check to compare registered vehicles with world
actors that if any valid vehicle present cointinue to run the TM else
stop.

* Splited work of main for loop in ApplyBatchCommandsSync

* WIP! Trying to get client directly

* WIP! Trying to access episode properly without getting it from TM ctr

* Changes to BatchControlStage for Sync Mode
Changes to Parameters for Synch Mode

* Added port support for TM. Multiclient MultiTM

* Added additions for RPC Synchronous Tick to TM.
Error handeling and code organization.

* Exposed API for Sync Mode

* TMServer notifies Server that it is gonna be destroyed

* Exposed Python API for Sync Mode

* Add TM as separate process and synchronous tick calls

* SetSynchronousModeTimeOutInMiliSecond method added

* TM shutsdown and informs to the connected clients

* WIP! Map change issues again

* Updated Traffic Manager for:
1) Multi-client, Multi-TM (as required) can be reistered to server.
2) TM is not a PROCESS separated from the user-client.
3) TM will exit if user-client exit.
4) If server closed, TM also get closed by catching runtime err.

* Fixed possible stall on TM destruction

* fixing collision stage + cybertruck not safe

* Merge branch 'master' into 'soumyadeep/traffic_manager'

* WIP! Disconnection of server has to be properly handled by clients

* format update

* Fix bug unsignalized junctions

* # WARNING: head commit changed in the meantime

Merge branch 'doterop/traffic_manager' into soumyadeep/traffic_manager
Updates for Syncronized Tick.

* Updated runtime exception in Episode for smooth exit if TN server closed
for any other user client.

* Better Exception handeling

* Merged with jackbart94/tm_reduce_getloc_calls

* Merged soumyadeep/traffic_manager.
Removed World getter and recovered Episode as a parameter of TM ctr.
Fixed syntax errors.

* Rebased with master

* Changes after rebase

* Solving tab errors

* Updated Changelog

* Removing Destroyed vehicle's from TM Server

* Fixed uint compatibility with Windows

* Merged soumyadeep/traffic_manager. Discarded destroyed actors

* -Removed unnecessary files

* restoring docs from rebase

* Fix windows compilation

* refactoring stage-related code

* more code refactoring

* When map change the simulation doesn't throw exception anymore

* Fixed incorrect episode

* Fixed map change and TM remote detached thread destruction

* Syntax and comments fixes

* Missed change on previous commit

* Fixed compile minor compile issue

* Cleaned and fixed some issues after merge

* fix to sync localization bugs
modified PID parameters
revamping spawn_npc

* deleted tm_spawn_npc

* fixes spawn error in sync mode

* Redoing TM sync logic

* finished performance benchmark for tm

* deprecated wrapped methods:
register_vehicle
unregister_vehicle

* New TM management

* Fixed sync mode on TM

* Cleaned TM of prints and unussed functions

* collision stage checks for (0,0,0) to ignore.
in memory map has an # between keys to avoid possible mixup.
fixed spawn_npc with new sync mode

* changelog

* added more connection retries

* fixed changelog + comments (see reviewable)

* Moved socket include's to single header

* Added missing line at the end of the file

* Fixed syntax errors

* final commit

* Minor correction in comment

* update copyright year to 2020 + removed break

* restoring unwanted changes

* patch for smoke test error

* Removed "todo" for pylint

Co-authored-by: Jacopo Bartiromo <32928804+jackbart94@users.noreply.github.com>
Co-authored-by: Praveen Kumar <35625166+pravinblaze@users.noreply.github.com>
Co-authored-by: Soumyadeep <soumyadeep.dhar@kpit.com>
Co-authored-by: joel-mb <joel.moriana@gmail.com>
Co-authored-by: Sekhar Barua <58979936+sekhar2912@users.noreply.github.com>
Co-authored-by: bernat <bernatx@gmail.com>
Co-authored-by: Marc Garcia Puig <marcgpuig@gmail.com>
2020-02-28 19:58:13 +01:00
Marc Garcia Puig b5c32aa8d2 Fixed PR issues 2020-02-28 11:02:45 +01:00
Marc Garcia Puig 13432ef578 Extended util/config.py with custom xodr maps 2020-02-28 11:02:45 +01:00
Madecu 36f6920fee
Changed weather presets and manual_control.py fixed (#2455)
* Added more weather attributes

* Upload client_test.py as weather in utils
Activate mesh distance fields

* weather.py --> Added wetness, changed "cloudyness" , fixed some functions
Weather.cpp --> Skip weather
Weather.h --> Added "SetWeather" Function

* Changed ASCII characters in weather.py

* Finished weather script without dynamic weather

* Added missing end of file line.

* Fixed the initial state of weather.py

* Updated changelog & fix dynamic weather altitude

* New default values for weather presets
Temporal fix in manual_control.py to refresh weather when it opens the pygame windows or it changes the camera (Tab)

* Fixed walkers spawn in manual_control

Co-authored-by: Marc Garcia Puig <marcgpuig@gmail.com>
Co-authored-by: doterop <daniel.oterop@gmail.com>
2020-02-25 12:18:37 +01:00
Marc Garcia Puig aa381d05f9 Removed map_viewer 2020-02-07 17:16:48 +01:00
Axel 8bdf3f54d1 Fixed Python format. Removed unecessary include. 2020-02-07 17:16:48 +01:00
Axel 32756d511b Improved map_viewer performance. 2020-02-07 17:16:48 +01:00
Axel f43da77019 Added paramPoly3. Changed python map variable in map_viewer.py 2020-02-07 17:16:48 +01:00
Axel aa78942489 Added support for nearest neighbour for all geometries. Added geometry poly3. 2020-02-07 17:16:48 +01:00
Axel ae2ae92bf1 Added spirals and splines to opendrive parser. 2020-02-07 17:16:48 +01:00
Axel1092 49a09ff841
Axel1092/extend map api (#2380)
* Added GetPrevious function

* Added functions GetNextUntilLaneEnd and GetPreviousUntilLaneStart. Fixed GetPrevious issue.

* Added junction class.

* Added documentation for the python API. Fixed a bug regarding bounding box computation.

* Fixed formatting.

* Updated CHANGELOG.md.

* Fixed python format.

* Added GetPrevious function

* Added functions GetNextUntilLaneEnd and GetPreviousUntilLaneStart. Fixed GetPrevious issue.

* Added junction class.

* Added documentation for the python API. Fixed a bug regarding bounding box computation.

* Fixed formatting.

* Updated CHANGELOG.md.

* Fixed python format.

* Updated map API documentation

* updated mkdocs

* Prettified code.

* Removed nested carla repository

* Review fixes.

* Fixed small tab issues

* Improved code and comments.

* Small code fixes

* Small fix.

* Fixed until lane end and until lane start.

* Style fix

Co-authored-by: bernat <bernatx@gmail.com>
Co-authored-by: Marc Garcia Puig <marcgpuig@gmail.com>
2020-02-06 16:43:23 +01:00
Marc Garcia Puig 3746fa3a75 Updated weather scripts 2020-02-04 10:39:01 +01:00
Marc Garcia Puig 7bd95e49b6 Updated ContentVersion.txt 2020-01-20 20:53:58 +01:00
Marc Garcia Puig f270aa5949 Updated changelog & fix dynamic weather altitude 2020-01-20 20:53:58 +01:00
Marc Garcia Puig f57aaef687 Fixed the initial state of weather.py 2020-01-20 20:53:58 +01:00
marcos909 f866fa47d9 Finished weather script without dynamic weather 2020-01-20 20:53:58 +01:00
Marcos Delgado Cuevas 86e46f1a63 Changed ASCII characters in weather.py 2020-01-20 20:53:58 +01:00
marcos909 77fbadbf65 weather.py --> Added wetness, changed "cloudyness" , fixed some functions
Weather.cpp --> Skip weather
Weather.h --> Added "SetWeather" Function
2020-01-20 20:53:58 +01:00
marcos909 c3a89b5a57 Upload client_test.py as weather in utils
Activate mesh distance fields
2020-01-20 20:53:58 +01:00
Ferdinand Mütsch 722e258902 Add summary row for performance benchmark. 2019-12-10 18:03:29 +01:00
Marc Garcia Puig 6187bf4916
New sensor: Inertial measurement unit (IMU) (#2220)
* Added IMU sensor to the client-server pipeline

* Fixed lane_explorer.py with the new debug API

* Changed compass output to standard compass degrees

* - Added accelerometer calculation to IMU.

* Added angular velocity to the IMU

* Changed IMU acceleration from world to local

* Updated changelog

* Updated accelerometer. Now uses vehicle movement component information instead of pawn information.

* Added docs regardings new sensors

* Fixed SI units in Lidar

* Fixed core dumped when using other python modules

* Explicitly deleted  Vec3D from FVec constructors

* Removed redundant DeltaTime calculation
2019-11-13 18:50:21 +01:00
nsubiron d66e08c2b5 config.py, print help if no arguments provided 2019-07-09 18:46:09 +02:00
nsubiron 2c6df3b5a2 Move config.py to util 2019-07-09 18:46:09 +02:00
nsubiron 9e2ea00820 Fix missing requirements of PythonAPI util 2019-05-07 11:51:16 +02:00
Marc Garcia Puig 424c32d2d4 Added waypoint's junction_id (#1509)
* Added waypoint's junction_id and is_junction
* Updated changelog
* Removed unnecessary const
2019-04-29 15:34:45 +02:00
nsubiron 30cc42686b Update license year 2019-03-30 14:29:57 +01:00
nsubiron 5727ef6512 Remove unnecessary requirement 2019-03-30 14:29:57 +01:00
nsubiron b10484f5c6 Fix path to egg file 2019-03-30 14:29:57 +01:00
nsubiron abc4789a03 Move generate_map.py to Util folder 2019-03-30 14:29:57 +01:00
nsubiron e683007aeb Reorganize PythonAPI folder 2019-03-30 14:29:57 +01:00
nsubiron 889b998336 Include scene_layout.py in package 2019-03-22 16:04:11 +01:00
nsubiron 236a1fc81f Fix Pylint errors of scene_layout.py 2019-03-19 22:34:49 +01:00
nsubiron 003661cc5b Fix generate_map.py linter errors 2019-03-19 22:34:49 +01:00
Felipe Codevilla 81f781cb5c scene layout, fixing testing functions 2019-03-18 20:31:11 -04:00
Felipe Codevilla 62d0d0e134 scene layout 2019-03-18 20:13:16 -04:00
Daniel 155a03ab5e Improved output 2019-03-01 15:14:52 +01:00
Daniel 9051def0ee Small fixes 2019-02-27 20:01:23 +01:00