diff --git a/CHANGELOG.md b/CHANGELOG.md index 3971470bd..0475512ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * make PythonAPI Windows: Fixed incompatibility issue with Anaconda due `py` command. * Added function to get actor' sockets names * Fixed bug in python agents when vehicle list was empty causing a check on all vehicles (BasicAgent.py) and detected pedestrians as vehicles if no pedestrains are present (BehaviourAgent.py) + * Extended debug drawing functions to allow drawing primitives on HUD layer * Added possibility to change gravity variable in imui sensor for the accelerometer * Fixed ROS2 native extension build error when ROS2 is installed in the system. * ROS2Native: Force fast-dds dependencies download to avoid build crash when boost_asio and tinyxml2 are not installed in Linux. diff --git a/Docs/python_api.md b/Docs/python_api.md index 617d8518e..88c0ae748 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -722,13 +722,45 @@ Draws an arrow from `begin` to `end` pointing in that direction. - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. - **draw_box**(**self**, **box**, **rotation**, **thickness**=0.1, **color**=(255,0,0), **life_time**=-1.0) -Draws a box, ussually to act for object colliders. +Draws a box, usually to act for object colliders. - **Parameters:** - `box` (_[carla.BoundingBox](#carla.BoundingBox)_) - Object containing a location and the length of a box for every axis. - `rotation` (_[carla.Rotation](#carla.Rotation) - degrees (pitch,yaw,roll)_) - Orientation of the box according to Unreal Engine's axis system. - `thickness` (_float - meters_) - Density of the lines that define the box. - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. +- **draw_hud_arrow**(**self**, **begin**, **end**, **thickness**=0.1, **arrow_size**=0.1, **color**=(255,0,0), **life_time**=-1.0) +Draws an arrow on the HUD from `begin` to `end` which can only be seen server-side. + - **Parameters:** + - `begin` (_[carla.Location](#carla.Location) - meters_) - Point in the coordinate system where the arrow starts. + - `end` (_[carla.Location](#carla.Location) - meters_) - Point in the coordinate system where the arrow ends and points towards to. + - `thickness` (_float - meters_) - Density of the line. + - `arrow_size` (_float - meters_) - Size of the tip of the arrow. + - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. + - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. +- **draw_hud_box**(**self**, **box**, **rotation**, **thickness**=0.1, **color**=(255,0,0), **life_time**=-1.0) +Draws a box on the HUD, usually to act for object colliders. The box can only be seen server-side. + - **Parameters:** + - `box` (_[carla.BoundingBox](#carla.BoundingBox)_) - Object containing a location and the length of a box for every axis. + - `rotation` (_[carla.Rotation](#carla.Rotation) - degrees (pitch,yaw,roll)_) - Orientation of the box according to Unreal Engine's axis system. + - `thickness` (_float - meters_) - Density of the lines that define the box. + - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. + - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. +- **draw_hud_line**(**self**, **begin**, **end**, **thickness**=0.1, **color**=(255,0,0), **life_time**=-1.0) +Draws a line on the HUD in between `begin` and `end`. The line can only be seen server-side. + - **Parameters:** + - `begin` (_[carla.Location](#carla.Location) - meters_) - Point in the coordinate system where the line starts. + - `end` (_[carla.Location](#carla.Location) - meters_) - Spot in the coordinate system where the line ends. + - `thickness` (_float - meters_) - Density of the line. + - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. + - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. +- **draw_hud_point**(**self**, **location**, **size**=0.1, **color**=(255,0,0), **life_time**=-1.0) +Draws a point on the HUD at `location`. The point can only be seen server-side. + - **Parameters:** + - `location` (_[carla.Location](#carla.Location) - meters_) - Spot in the coordinate system to center the object. + - `size` (_float - meters_) - Density of the point. + - `color` (_[carla.Color](#carla.Color)_) - RGB code to color the object. Red by default. + - `life_time` (_float - seconds_) - Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes. - **draw_line**(**self**, **begin**, **end**, **thickness**=0.1, **color**=(255,0,0), **life_time**=-1.0) Draws a line in between `begin` and `end`. - **Parameters:** @@ -4194,71 +4226,6 @@ document.getElementById("snipets-container").innerHTML = null; } -