Getting started

This section describes how to do a quick start on using this mock library from small ajustments in an already defined configuration. Adapting to a specific context, especially to a new robot design will require to deep down into the detailed configuration section.

Environment

To get an environment in which you can easily perform your first test on the spike mock library, download the docker image we use for testing. If you need more information on the docker image content, check our github repository fll-test-docker

docker pull nadegelemperiere/fll-test-docker:latest

Configuration

Example of configuration files can be found in the repository configuration folder, including :

  • A robot ldraw design file and the associated Studio2.0 file that enables its exported.

  • A scenario file configured to :

    • compute robot movements according to the command we give it

    • let time pass according to the endpoint clock

To parse ldraw files, a ldraw parts database shall be available locally, which includes the lego spike parts we use in our robot model. Such a database can be found in the installation folder of Studio2.0, merging C:Program FilesStudio 2.0ldraw and C:Program FilesStudio 2.0ldrawUnOfficial. Ldraw provides a tool to generate a global parts.lst file from the parts folders here. Arrange the database as shown below :

database
├── parts.lst
├── parts
│   ├── 1.dat
│   └── 2.dat
│   └── ...
├── p
│   ├── 1-4ccyli.dat
│   └── 1-4cchrd.dat
│   └── ...

Run

To run the mock library on a spike code,


docker run -it –rm

–volume $scriptpath/../:/package:rw –volume $scriptpath/../../ldraw-parts:/parts:ro –workdir /package nadegelemperiere/fll-test-docker:latest ./scripts/robot.sh $@

Analysis