Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug drawing extension to allow drawing primitives on HUD layer #7168

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

saippua
Copy link

@saippua saippua commented Feb 20, 2024

Description

This PR adds the ability to draw the DebugHelper primitives on the HUD layer as well. This allows drawing debug primitives which do not show up in sensor data. New PythonAPI functions are implemented with the naming DebugHelper.draw_hud_<shape>() alongside existing draw functions DebugHelper.draw_<shape>(). The python function signatures are otherwise equivalent to their existing non-HUD counterparts.

Here is an example. I am drawing the old primitives (red) and new primitives (blue) side by side. The first image shows the server-side window where all the primitives are visible, and the second image shows an sensor.camera.rgb sensor output. The new primitives do not show up in the sensor output, which means they can be used for server-side visualization without polluting sensor data. Old primitives are drawn with default properties, and the HUD primitives are drawn with thickness=10 to match the old primitives. A thickness of 1 equates to 1 pixel wide on the new HUD primitives.
Server-side window screenshot

RGB Sensor output

This PR is a proposed solution to the issue #6705.

Where has this been tested?

  • Platform(s): Ubuntu 20.04
  • Python version(s): 3.7
  • Unreal Engine version(s): 4.26 (Carla fork)

Possible Drawbacks

Very simple feature, so there isn't much that could go wrong.

Copy link

update-docs bot commented Feb 20, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

@saippua saippua marked this pull request as ready for review February 26, 2024 11:09
@saippua saippua requested a review from a team as a code owner February 26, 2024 11:09
@Blyron
Copy link
Contributor

Blyron commented Mar 26, 2024

Hello saipua, could you merge dev branch into yours so I can use our jenkins to test everything works fine?

@saippua
Copy link
Author

saippua commented Mar 27, 2024

Hi, I've updated my branch to dev

@Blyron Blyron merged commit d5d3cf9 into carla-simulator:dev Mar 27, 2024
1 check passed
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this pull request Jul 24, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this pull request Jul 24, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this pull request Jul 29, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this pull request Aug 8, 2024
Blyron pushed a commit that referenced this pull request Aug 28, 2024
Blyron added a commit that referenced this pull request Sep 25, 2024
* added cpp client build docs (#7942)

* fixed IMU units (#7960)

* Update README.md with new TinyURL links (#7988)

* Added inverse transform (#7999)

Co-authored-by: glopezdiest <[email protected]>

* Aaron/fixwheelchair (#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: #7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from #7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (#8090)

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (#8167)

The downloadplugins target is already defined below (line 162).

---------

Co-authored-by: MattRoweEAIF <[email protected]>
Co-authored-by: glopezdiest <[email protected]>
Co-authored-by: glopezdiest <[email protected]>
Co-authored-by: Minokori <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: AreopagX <[email protected]>
Co-authored-by: Jorge Virgos <[email protected]>
Co-authored-by: Sergio Paniego Blanco <[email protected]>
Co-authored-by: Ylmdrin <[email protected]>
Blyron added a commit that referenced this pull request Oct 18, 2024
* added cpp client build docs (#7942)

* fixed IMU units (#7960)

* Update README.md with new TinyURL links (#7988)

* Added inverse transform (#7999)

Co-authored-by: glopezdiest <[email protected]>

* Aaron/fixwheelchair (#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: #7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from #7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (#8090)

* Typing for GlobalRoutePlanner

* 0.9.13+ modernisation of code

* made function static

* Updated changelog

* fixed spelling mistakes

* No unnecessary inheritance from object and empty class brackets & other

Removed empty variables and whitespaces
formatting

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (#8167)

The downloadplugins target is already defined below (line 162).

* fix typo in title (#8225)

* added unreal coord system, fixed v2x (#8251)

---------

Co-authored-by: MattRoweEAIF <[email protected]>
Co-authored-by: Blyron <[email protected]>
Co-authored-by: glopezdiest <[email protected]>
Co-authored-by: glopezdiest <[email protected]>
Co-authored-by: Blyron <[email protected]>
Co-authored-by: Minokori <[email protected]>
Co-authored-by: AreopagX <[email protected]>
Co-authored-by: Jorge Virgos <[email protected]>
Co-authored-by: Sergio Paniego Blanco <[email protected]>
Co-authored-by: Ylmdrin <[email protected]>
Blyron pushed a commit that referenced this pull request Nov 5, 2024
* added cpp client build docs (#7942)

* fixed IMU units (#7960)

* Update README.md with new TinyURL links (#7988)

* Added inverse transform (#7999)

Co-authored-by: glopezdiest <[email protected]>

* Aaron/fixwheelchair (#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: #7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from #7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (#8090)

* use actor ids for instance segmentation

* synchronize bboxes between server and client

* add actor_id attribute to bounding boxes

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (#8167)

The downloadplugins target is already defined below (line 162).

* fix typo in title (#8225)

* added unreal coord system, fixed v2x (#8251)

---------


Co-authored-by: Minokori <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Sergio Paniego Blanco <[email protected]>
Co-authored-by: Ylmdrin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants