Running Meili Agent
Before you start
Make sure that:
- Meili Agent is installed. If it is not, follow Installing Meili Agent.
- A valid area map is uploaded to Meili FMS. If it is not, follow Maps to upload and edit one.
- The robot is connected to the internet and its navigation nodes are running, so that it is providing its location.
Launch Meili Agent
Source your ROS environment and your workspace, then launch the agent:
source /opt/ros/melodic/setup.bash
cd ~/catkin_ws_meili
source devel/setup.bash
roslaunch meili_agent meili_agent.launchsource /opt/ros/noetic/setup.bash
cd ~/catkin_ws_meili
source devel/setup.bash
roslaunch meili_agent meili_agent.launchsource /opt/ros/foxy/setup.bash
cd ~/ros2_ws_meili
source install/setup.bash
ros2 launch meili_agent meili_agent.launch.pysource /opt/ros/humble/setup.bash
cd ~/ros2_ws_meili
source install/setup.bash
ros2 launch meili_agent meili_agent.launch.pysource /opt/ros/jazzy/setup.bash
cd ~/ros2_ws_meili
source install/setup.bash
ros2 launch meili_agent meili_agent.launch.pyIf the agent cannot find its Python packages, activate the virtual environment created by the installation script before launching it:
source <installation script folder>/venv_meili/bin/activate
~/catkin_ws_meili(ROS 1) and~/ros2_ws_meili(ROS 2) are the workspaces created by the installation script. The name of the workspace may vary if you installed the agent in a different workspace.
To change how the agent behaves (publishing frequency, traffic control, battery streaming…), pass parameters to the launch command.
Check the output
The agent first reads its parameters and configuration file. In ROS 2, it also prints the list of parameters it uses. The connection to Meili FMS is established once you see Meili Agent is ready for receiving tasks followed by WS open (ROS 1) or Connection to MEili FMS open (ROS 2):
[INFO] [1711030155.485727, 13.316000]: [DockingServer] Docking Server Initialized
[INFO] [1711030156.108107, 0.000000]: [SetUp] Reading initialization parameters
[INFO] [1711030156.118629, 13.829000]: [SetUp] Ros distro is : noetic
[INFO] [1711030156.121706, 13.833000]: [SetUp] Ros version is :1
[INFO] [1711030156.123930, 13.835000]: [SetUp] COMPLETED Initial ROS Parameter configuration
[INFO] [1711030156.149244, 13.858000]: [SetUp] The Battery is present
[INFO] [1711030156.151109, 13.860000]: [ROSAgent] The configuration is started...
[INFO] [1711030156.167217, 13.865000]: [Config] Fleet mode is : Fleet
[INFO] [1711030156.171595, 13.874000]: [ROSAgent] Server instance:https://xxxxxxxxxxxxxxx.com
[INFO] [1711030156.175289, 13.878000]: [ROSAgent] Vehicle xxxxxxxxxxxxxxxxxx is on the fleet
[INFO] [1711030156.177126, 13.882000]: [ROSAgent] Vehicle yyyyyyyyyyyyyyyyyy is on the fleet
[INFO] [1711030156.178532, 13.883000]: [ROSAgent] Agent has been configured
[INFO] [1711030156.367540, 14.048000]: [ROSAgentNode] Meili Agent is ready for receiving tasks
[INFO] [1711030156.373013, 14.054000]: [ROSAgent] Mode for topic streaming is FILTERING
[INFO] [1711030156.501258, 14.178000]: [OfflineAgent] Internet Connected
[INFO] [1711030156.877119, 14.536000]: [ROSHandler] WS open[docking_server-2] [INFO] [1792509383.203142482] [docking_server]: [DockingServer] Docking Server Initialized
[agent_node-1] [INFO] [1792509383.226381135] [agent_node]: [SetUp] Reading initialization parameters
[agent_node-1] [INFO] [1792509383.228050682] [agent_node]: [SetUp] Ros distro is : humble
[agent_node-1] [INFO] [1792509383.228925869] [agent_node]: [SetUp] Ros version is :2
[agent_node-1] [INFO] [1792509383.229785937] [agent_node]: [SetUp] COMPLETED Initial ROS Parameter configuration
...
[agent_node-1] [INFO] [1792509389.807871522] [agent_node]: [ROSAgentNode] Meili Agent is ready for receiving tasks
[agent_node-1] [INFO] [1792509390.811494685] [agent_node]: [Connection] Opening WS
[agent_node-1] [INFO] [1792509390.959250611] [agent_node]: [OfflineAgent] Internet Connected
[agent_node-1] [INFO] [1792509391.248296171] [agent_node]: [ROSHandler] Connection to MEili FMS openYou should now see the robot’s location and battery on the Vehicles page.
Nodes launched
| ROS 1 | ROS 2 |
|---|---|
meili_agent_task |
agent_node |
docking |
docking_server |
Troubleshooting (ROS 2)
- The connection is closed right after it is opened. If the agent keeps logging
Connection closedright afterConnection to MEili FMS open, the installed meili-sdk is probably not compatible with Meili FMS. Upgrade the agent as described in Upgrading an existing installation. Robot pose is not available. The agent has not received the robot’s location yet. Check that localization (for example amcl) is publishing the robot’s pose topic. Until then, the robot is shown at the origin of the map.- The robot is not shown in a fleet with several levels. In fleets with more than one level, Meili FMS requires the vehicle’s map look up table (map ids of the vehicle) to be configured. Otherwise the robot’s state is rejected and the connection is closed after one minute. See the
multifloorparameter. - The connection is refused after several reconnections. Meili FMS accepts 6 connection attempts per minute for each fleet token. The token is accepted again one minute after the last accepted attempt.
- The agent does not connect after
Name of client created. The agent waits until the nav2 actions of every robot in the fleet are available. Check that nav2 is running for all the robots configured in the fleet.