Package 'rrstools'

Title: Tools for Analyzing RoboCupRescue Simulation Data
Description: Provides functions for analyzing RoboCupRescue Simulation data.
Authors: Keisuke ANDO [aut, cre]
Maintainer: Keisuke ANDO <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2025-02-17 06:16:43 UTC
Source: https://github.com/NONONOexe/rrstools

Help Index


Plot a rrs map

Description

This function plots a rrs map

Usage

## S3 method for class 'rrs_map'
plot(
  x,
  building_colour = "#f0e7d8",
  building_border = "#121212",
  road_colour = "#dbdbdb",
  road_border = "#121212",
  background_colour = NA,
  ...
)

Arguments

x

An object class rrs_map.

building_colour

The colour of the buildings.

building_border

The border colour of the buildings.

road_colour

The colour of the roads.

road_border

The border colour of the roads.

background_colour

The background colour of the plot.

...

Additional arguments passed to par.

Examples

gml <- system.file("extdata", "map-test.gml", package = "rrstools")
map_data <- read_rrs_map(gml)
plot(map_data)

Read RoboCupRescue Simulation map data from GML file

Description

This function reads and processes map data for RoboCupRescue Simulation from a GML file. It extracts nodes, edges, buildings and roads, and organizes them into a list.

Usage

read_rrs_map(gml, scale_data = FALSE)

Arguments

gml

Path to the GML file.

scale_data

Logical. If TRUE, coordinates are scaled up by a factor of 1000 to match the simulation environment, and adjusted such that the minimum x and y values are 0. (Default: TRUE)

Value

A list of sf objects: nodes, edges, buildings, and roads.

Examples

gml <- system.file("extdata", "map-test.gml", package = "rrstools")
map_data <- read_rrs_map(gml)
map_data