Namespace jalansim::map
Namespace List > jalansim > map
Namespaces
| Type | Name |
|---|---|
| namespace | collection |
Classes
| Type | Name |
|---|---|
| struct | Map <typename T> 2D occupancy grid map with distance field. |
| struct | MapCell <typename T> Individual cell in the occupancy grid map. |
| class | MapCollection <typename T> Collection of maps for random sampling in batch simulations. |
Public Types
| Type | Name |
|---|---|
| enum | Mode Image processing modes for occupancy grid conversion. |
Public Functions
| Type | Name |
|---|---|
| Map< T > * | load_image (const std::string & path, T resolution, T origin_x, T origin_y, T yaw, bool negate=false, T occ_th=0.65, T free_th=0.196, int padding=0, int padding_val=0, Mode mode=Mode::Trinary) Load an occupancy grid map from an image file. |
Public Types Documentation
enum Mode
Image processing modes for occupancy grid conversion.
enum jalansim::map::Mode {
Trinary,
Scale,
Raw
};
Public Functions Documentation
function load_image
Load an occupancy grid map from an image file.
template<typename T>
inline Map < T > * jalansim::map::load_image (
const std::string & path,
T resolution,
T origin_x,
T origin_y,
T yaw,
bool negate=false,
T occ_th=0.65,
T free_th=0.196,
int padding=0,
int padding_val=0,
Mode mode=Mode::Trinary
)
Converts an image file (PNG, JPG, etc.) into an occupancy grid map. Supports various processing modes for converting pixel intensities to occupancy values. Handles coordinate transformation from image space to world coordinates with configurable origin and resolution.
Template parameters:
TNumeric type for map coordinates and resolution (float, double)
Parameters:
pathPath to image file to loadresolutionSize of each grid cell in world units (meters/pixel)origin_xWorld X coordinate of map origin (grid cell 0,0)origin_yWorld Y coordinate of map origin (grid cell 0,0)yawRotation angle of the map (currently unused)negateInvert pixel intensities (dark=occupied becomes light=occupied)occ_thOccupancy threshold for classifying cells as occupied (0.0-1.0)free_thFree space threshold for classifying cells as free (0.0-1.0)paddingNumber of border cells to add around the imagepadding_valOccupancy value for padding cellsmodeProcessing mode for converting pixels to occupancy values
Returns:
Pointer to newly created Map with loaded occupancy data
Exception:
std::runtime_errorif image loading fails
The documentation for this class was generated from the following file include/jalansim/map/map.hpp