Meili CLI #
Meili CLI is a command-line utility tool for secret management, system setups, and map synchronisation with the server.
Meili CLI is divided into 5 separate applications, which need to be passed alongside the command as command-line arguments
Command | Description |
---|---|
init | Run the system initialization script. Creates ~/.meili directory |
verify | /Runs the verification on the existing configuration data inside ~/.meili folder |
maps | Runs map utilities (needs an extra argument up or down passed) |
setup | Runs the Fleet setup initialization script on the machine. Pulls the repo, creates files for vehicles |
pull-schedules | Generate the task.yaml file used for offline execution of tasks |
Download #
The first step is to download Meili CLI with the following command ( in this case you are downloading the Meili CLI tool for i386 platforms):
curl https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli --output meili-cli
chmod +x meili-cli
Or you can use wget:
wget https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli --output meili-cli
chmod +x meili-cli
Note
Depending on the architecture of your operating system, you will need to change the last bit of the above command with:
Linux-386 –> https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli
Linux-AMD64 –> https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli-amd64
Linux-ARM64 (Raspberry) –> https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli-arm64
Windows-386 –> https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli-win386.exe
Windows-AMD64 –> https://meili-fms-production.s3.eu-north-1.amazonaws.com/helpers/meili-cli-win-amd64.exe
If you are using windows, you can download the .exe
file using the following:
wget https://meili-fms-dev.s3.eu-north-1.amazonaws.com/helpers/meili-cli-win386.exe
Initialisation #
For non ROS integration type–> Before initialize it is important to setup these environmental variables:
export ACCESS_TOKEN=<access_token_value_provided_by_meili>
export PACKAGE_PATH=<path_where_integrations_repository_will_be_downloaded>
Once Meili CLI is downloaded, you can run the system initialisation script. When running this, the Fleet setup regenerates tokens and encryption keys and sends unencrypted data back to the CLI.
You need to pass PIN from a newly created Fleet setup using the following -pin flag.
./meili-cli init -pin <FLEET_SETUP_PIN>
FLEET_SETUP_PIN
should be a string bound to 5 characters.
Note You need to create the FLEET SETUP_PIN on the API beforehand. Or, you can create it on the front end following instructions in Create a Fleet Setup.
If the system is set up correctly, you should receive the following message:
System successfully setup
This means that the configuration file — cfg.yaml — has successfully been created in ./meili. For your information, this configuration file is where data regarding your robot fleets, tokens, and public and private keys are stored. An example of this cfg.yaml general structure is shown below:
You are now ready to modify the maps using the Meili FMS web application.
Note If you run the initialisation script again, all the encryption keys and tokens will be regenerated. Therefore, all the data that was encrypted before executing the initialisation script will not be able to be decrypted.
Verification #
This script can only produce valid results after running the initialisation process.
After running it, you can verify the system configuration using verification functionality.
./meili-cli verify
Note If ~/.meili folder does not exist, it will not be able to execute the command.
If everything went successfully, you should receive the following message:
OK
Agent SetUp #
When running the Agent SetUp initialisation script, the repository will be pulled. It will automatically create a file for the previously established vehicles on the Fleet Setup. To add vehicles to your fleet and create a Fleet Setup, find detailed instructions here.
The agent will be installed in the path of ROS_PACKAGE_PATH
. To check which one is set to your computer run the following command:
echo $ROS_PACKAGE_PATH
Note If you want your agent to be installed in your own workspace. Follow these steps:
Agent setup for fleets #
./meili-cli setup
After running this, you should see a meili-agent
directory in the ROS_PACKAGE_PATH
with config
directory inside, and the following output should be produced:
Enumerating objects: 188, done.
Counting objects: 100% (188/188), done.
Compressing objects: 100% (80/80), done.
Total 188 (delta 115), reused 168 (delta 97), pack-reused 0
Repository cloned to /devel/Meili/meilirosinit/meili-agent
commit 695644b50a14ff2e2e806fa4ddb07d702d246416
Author: juan76 <juan@meilirobots.com>
Date: Thu Jul 02 13:20:14 2020 +0200
Fixed battery data sent
The config
folder will include an automatically generated configuration file where information about the fleet and its vehicles can be found. An example of a configuration file with three robots in the fleet is shown below:
Agent setup for individual vehicles #
When running the agent, individually (one agent per robot) in a fleet, you need to add the flag –split when downloading the agent. For example:
./meili-cli setup --split
It is a generated config file, in the config directory of the Meili Agent (ros ws), with the different robot UUID code appended to the ‘config’ word. An example of a file’s name:
config-24cc7ffd39d3494388e1e8a19697015c.yaml
For the agent to work correctly, it is necessary to remove the UUID from the name, and leave only “config.yaml” (You need to leave this name only for the specific robot you are using)
Installing Meili Agent dependencies #
After executing setup command for fleets or for individual vehicles you are ready to finalise the Setting Up of the Agent for ROS Melodic or Noetic. Go to the Meili Agent folder and install the ROS dependencies.
For ROS Melodic:
source /opt/ros/melodic/setup.bash
cd ~/ros_melodic_ws
rosdep install --from-paths src --ignore-src --rosdistro melodic -y -r
cd ~/ros_melodic_ws/src/meili-agent/src
pip3 install -r requirements.txt
For ROS Noetic:
source /opt/ros/noetic/setup.bash
cd ~/ros_noetic_ws
rosdep install --from-paths src --ignore-src --rosdistro noetic -y -r
cd ~/ros_noetic_ws/src/meili-agent/src
pip3 install -r requirements.txt
Finally, let’s build it and source it:
For ROS Melodic:
source /opt/ros/melodic/setup.bash
cd ~/ros_melodic_ws
catkin build # or catkin_make
source devel/setup.bash
For ROS Noetic:
source /opt/ros/noetic/setup.bash
cd ~/ros_noetic_ws
catkin build # or catkin_make
source devel/setup.bash
Note The name of the workspace may vary depending on your previously configured workspace.
You are now ready to start using Meili FMS. Go to Running Meili Agent.
Generating file for Offline use - Pulling schedules #
To use Meili Agent with no internet connection, it is necessary to generate a yaml/json file containing the scheduled task, generated from the Meili FMS when marking a mission as offline. By default, it would generate a yaml file containing all the relevant information. File is created in the folder .meili (in your home directory).
./meili-cli pull-schedules
There is the possibility of generating a file that follows the smach format. To get this file, it is necessary to mark the format as smach. Check the example below:
./meili-cli pull-schedules --format=smach
Hitting different whitelabel #
Use –site to specify the site you want to access. You do not need to enter the full domain, just the prefix for .meilirobots.com
./meili-cli --site=app.development
Using command above will hit app.development.meilirobots.com URL.
Map management #
Go to Uploading a map.