Running in ROS Melodic or Noetic

Running in ROS Melodic or Noetic #

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

For ROS Melodic:

source /opt/ros/melodic/setup.bash
cd ~/ros_melodic_ws
source devel/setup.bash
roslaunch meili_agent meili_agent.launch

For ROS Noetic:

source /opt/ros/noetic/setup.bash
cd ~/ros_noetic_ws
source devel/setup.bash
roslaunch meili_agent meili_agent.launch
Note The name of the workspace may vary depending on your previously configured workspace.

You will see a similar output:

[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

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.

[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

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

  • docking

  • meili_agent_task

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.
  8. vel_mux_flag: Decide whether to use twist multiplexer ROS package (twist_mux) to stop vehicles by Meili traffic control:
    • True: The twist_mux ROS package will multiplex velocity commands coming from the ROS navigation stack and from Meili traffic control published in different topics. Meili traffic control messages have higher priority.
    • False: The ROS navigation stack and Meili traffic control publish velocity commands in the same topic. In order to prioritise Meili, these messages are published at a higher rate, while the ROS Navigation stack keeps publishing.
      Note: If the vel_mux_flag parameter want to be set to True, be sure to follow the installation described here to install the ROS multiplexor package. Remember to add the true flag after the PIN when running the meili_agent_noetic.sh script.

The following parameters are used when the robot uses the ROS Navigation Stack for navigation:

  1. xy_intermediate_wayp_tol: Tolerance in the x and y directions to reach an intermediate waypoint in a trajectory in meters.
  2. xy_final_wayp_tol: Tolerance in the x and y directions to reach the final waypoint in meters.
  3. yaw_intermediate_wayp_tol: Yaw tolerance to reach an intermediate waypoint in a trajectory in radians.
  4. yaw_final_wayp_tol: Yaw tolerance to reach the final waypoint in radians.

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) roslaunch meili_agent meili_agent.launch publish_frequency:=1
topic_streaming_node FILTERING roslaunch meili_agent meili_agent.launch topic_streaming_node:=FILTERING
battery_present False roslaunch meili_agent meili_agent.launch battery_present:=False
path_planning False roslaunch meili_agent meili_agent.launch bath_planning:=False
traffic_control False roslaunch meili_agent meili_agent.launch traffic_control:=False
offline False roslaunch meili_agent meili_agent.launch offline:=False
lipo_cells 0 roslaunch meili_agent meili_agent.launch lipo_cells:=4
xy_intermediate_wayp_tol 0.5 (m) roslaunch meili_agent meili_agent.launch xy_intermediate_wayp_tol:=0.5
xy_final_wayp_tol 0.15 (m) roslaunch meili_agent meili_agent.launch xy_final_wayp_tol:=0.15
yaw_intermediate_wayp_tol 6.2 (rad) roslaunch meili_agent meili_agent.launch yaw_intermediate_wayp_tol:=6.2
yaw_final_wayp_tol 0.1 (rad) roslaunch meili_agent meili_agent.launch yaw_final_wayp_tol:=0.1
vel_mux_flag False roslaunch meili_agent meili_agent.launch vel_mux_flag:=False