
Download RoboCupRescue Simulation scenarios
download_scenarios.Rddownload_scenarios downloads scenario archives for the RoboCupRescue
Simulation from the RCRS Scenario Hub. It allows filtering by scenario name.
Arguments
- names
A character vector of scenario names to download (e.g., "kobe").
- download_dir
A string specifying the directory where files will be downloaded. If the directory does not exist, it will be created.
- extract
A logical value. If
TRUE, downloaded archives will be extracted into thedownload_dir, and the original archive file will be removed upon successful extraction. Supported formats:.zip(extracted usingutils::unzip()),.7z(requires 7-zip command-line tool (7z) to be installed and available in the system's PATH). Defaults toFALSE.
Value
Invisibly returns a character vector of the local paths corresponding to the results of the process. If extraction is successful, the path to the newly created data directory is returned; otherwise, the path to the downloaded archive file is returned. Returns an empty character vector if no files were downloaded.
Examples
# \donttest{
# Download the kobe scenario
download_scenarios(names = "kobe", download_dir = tempdir())
#> Fetching scenario list from RCRS Scenario Hub...
#> Found 1 scenario(s) to process.
#> [1/1] Processing kobe.zip ...
#> -> Download complete.
# Download and extract the kobe scenario
download_scenarios(names = "kobe", download_dir = tempdir(), extract = TRUE)
#> Found 1 scenario(s) to process.
#> [1/1] Processing kobe.zip ...
#> -> Download complete.
#> -> Attempting to extract...
#> -> Extraction complete.
#> -> Removing archive file...
#> -> Archive file removed.
# }