RapyutaSimulationPlugins
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
AOccupancyMapGenerator Class Reference

Actor to Generate 2D occupancy map for navigation/localization with LineTraceSingleByChannel. More...

#include <OccupancyMapGenerator.h>

Inheritance diagram for AOccupancyMapGenerator:
Inheritance graph
[legend]
Collaboration diagram for AOccupancyMapGenerator:
Collaboration graph
[legend]

Public Member Functions

 AOccupancyMapGenerator ()
 Construct a new AOccupancyMapGenerator object. More...
 
bool WriteToFile (int width, int height, float originx, float originy)
 Save .pgm and .yaml files. More...
 

Public Attributes

AStaticMeshActor * Map
 Generate map to cover bounding box of this actor. Please select actor such as ground plane. More...
 
float GridRes = 0.05
 [m/pixel] More...
 
float MaxVerticalHeight = 10
 [m] More...
 
FString Filename = "ue4_map"
 
TArray< uint8 > OccupancyGrid
 

Protected Member Functions

virtual void BeginPlay () override
 Generate occupancy map with given paramters and save to files. More...
 

Detailed Description

Actor to Generate 2D occupancy map for navigation/localization with LineTraceSingleByChannel.

Generate 2D occupancy map with given parameter and save to file with beginplay.

How to use: Place this actor to the level, set parameters(select Map and max vertical height), and play simulation, then map file will be saved.

See also
LineTraceSingleByChannel

UCLASS()

Constructor & Destructor Documentation

◆ AOccupancyMapGenerator()

AOccupancyMapGenerator::AOccupancyMapGenerator ( )

Construct a new AOccupancyMapGenerator object.

Member Function Documentation

◆ BeginPlay()

virtual void AOccupancyMapGenerator::BeginPlay ( )
overrideprotectedvirtual

Generate occupancy map with given paramters and save to files.

Called when the game starts or when spawned.

◆ WriteToFile()

bool AOccupancyMapGenerator::WriteToFile ( int  width,
int  height,
float  originx,
float  originy 
)

Save .pgm and .yaml files.

UFUNCTION()

Parameters
width
height
originx
originy
Returns
true
false

Member Data Documentation

◆ Filename

FString AOccupancyMapGenerator::Filename = "ue4_map"

◆ GridRes

float AOccupancyMapGenerator::GridRes = 0.05

◆ Map

AStaticMeshActor* AOccupancyMapGenerator::Map

Generate map to cover bounding box of this actor. Please select actor such as ground plane.

UPROPERTY(EditAnywhere)

◆ MaxVerticalHeight

float AOccupancyMapGenerator::MaxVerticalHeight = 10

◆ OccupancyGrid

TArray<uint8> AOccupancyMapGenerator::OccupancyGrid

The documentation for this class was generated from the following file: