Running in ROS2 Foxy or Humble

Running in ROS2 Foxy or Humble #

When your robot is successfully operating with the navigation nodes, you can run the following command and start the Meili Agent.

For ROS2 Foxy:

source /opt/ros/foxy/setup.bash
cd ~/ros2_ws
source install/setup.bash
ros2 launch meili_agent meili_agent.launch.py

For ROS2 Humble:

source /opt/ros/humble/setup.bash
cd ~/ros2_ws
source install/setup.bash
ros2 launch meili_agent meili_agent.launch.py
Note The name of the workspace may vary depending on your previously configured workspace.

You will see a similar output:

[docking_server-2] [INFO] [1711034253.663142482] [docking_server]: [DockingServer] Docking Server Initialized
[agent_node-1] [INFO] [1711034254.326381135] [agent_node]: [SetUp] Reading initialization parameters
[agent_node-1] [INFO] [1711034254.328050682] [agent_node]: [SetUp] Ros distro is : humble
[agent_node-1] [INFO] [1711034254.328925869] [agent_node]: [SetUp] Ros version is :2
[agent_node-1] [INFO] [1711034254.329785937] [agent_node]: [SetUp] COMPLETED Initial ROS Parameter configuration

The following output must be seen in the Meili Agent’s terminal. This indicates that the connection between the robot and Meili FMS’s dashboard has been established successfully , using WebSocket.

[agent_node-1] [INFO] [1711034259.807871522] [agent_node]: [ROSAgentNode] Meili Agent is ready for receiving tasks
[agent_node-1] [INFO] [1711034259.811494685] [agent_node]: [ROSAgent] Mode for topic streaming is FILTERING
[agent_node-1] [INFO] [1711034259.959250611] [agent_node]: [OfflineAgent] Internet Connected
[agent_node-1] [INFO] [1711034260.248296171] [agent_node]: [ROSHandler] WS open

When running the Meili Agent, two ROS nodes are launched:

  • agent_node

  • docking_server

Parameters #

When launching the Meili Agent, there are few parameters that you can configure:

  1. publish_frequency. Please modify the publication frequency to suit your needs, with a minimum value of 1 Hz.

  2. topic_streaming_mode. There are two different modes that exist:

    • FILTERING: streams topics in a determined frequency.
    • REAL_TIME: streams topics in real-time.
  3. battery_present. Indicates if battery values are available and if the user wants to stream it to the cloud. Values can be:

    • True: Battery will be streamed
    • False: Default value → Battery will not be streamed
  4. path_planning. When allocating tasks with multiple points, the user can choose to use a route calculated by Meili FMS’s path planner.

    • True: Meili FMS will send a set of waypoints shown in the path on the map editor page.
    • False: Default value →Meili FMS will only send points configured on the map editor page.
  5. traffic_control: Indicates if real-time paths calculated by AMRs are streamed to the cloud, and traffic control algorithms will be applied.

    • True: Traffic control algorithms will be applied when more than one task is on.
    • False: Default value. No path will be streamed and no traffic control algorithms.
  6. offline: Indicates if offline mode is activated in the agent.

    • True: The Meili Agent will periodically check the wifi connectivity.
    • False: Default value. Wifi connection will not be checked periodically.
  7. lipo_cells: Indicates whether the battery is a LiPo battery or not. If >0 the battery is a LiPo battery.

These parameters have the default values that are shown below but can be modified by the user using the corresponding command line( if you want to modify more than one parameter, just add all of them when launching a Meili Agent). It is also possible to open the meili_agent.launch file and modify the values inside the file so that the modified values will be saved for the next time.

Parameter Default Value CLI Command
publish_frequency 1 (Hz) ros2 launch meili_agent meili_agent.launch.py publish_frequency:=1
topic_streaming_mode FILTERING ros2 launch meili_agent meili_agent.launch.py topic_streaming_mode:=FILTERING
battery_present False ros2 launch meili_agent meili_agent.launch.py battery_present:=False
path_planning False ros2 launch meili_agent meili_agent.launch.py path_planning:=False
traffic_control False ros2 launch meili_agent meili_agent.launch.py traffic_control:=False
offline False ros2 launch meili_agent meili_agent.launch.py offline:=False
lipo_cells 0 ros2 launch meili_agent meili_agent.launch.py lipo_cells:=4