This repository contains the Free Fleet server and client for the Magni robot. It enables integration of the Magni robot with the Free Fleet framework and Open-RMF, providing seamless fleet management and navigation capabilities.
Welcome to free_fleet
, an open-source robot fleet management system.
Sometimes it is called the "Fun Free Fleet For Friends" (F5).
Note, this repository is under active development. Things will be quite unstable for a while. Please open an issue ticket on this repo if you have problems. Cheers.
Install all non-ROS prerequisite packages,
sudo apt update && sudo apt install \
git wget qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools \
python3-rosdep \
python3-vcstool \
python3-colcon-common-extensions \
# maven default-jdk # Uncomment to install dependencies for message generation
Important
In order to ensure messages using cyclonedds
are sent, received, serialized and deserialized properly between the ROS 1 and ROS 2 systems, the version of cyclonedds
used/built should be the same, this can be checked with dpkg -l | grep cyclonedds
on ROS 2 systems, while ROS 1 systems will need to build cyclonedds
from source. For ROS 2 versions above galactic
, users will need to manage the versions of cyclonedds
themselves.
Message generation via FleetMessages.idl
is done using dds_idlc
from CycloneDDS
. For convenience, the generated mesasges and files has been done offline and committed into the code base. They can be found here.
./dds_idlc -allstructs FleetMessages.idl
Start a new ROS 1 workspace, and pull in the necessary repositories,
mkdir -p ~/ff_ros1_ws/src
cd ~/ff_ros1_ws/src
git clone https://github.com/UbiquityRobotics/Free_Fleet_Magni.git -b main
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.7.x
Install all the dependencies through rosdep
,
cd ~/ff_ros1_ws
rosdep install --from-paths src --ignore-src --rosdistro noetic -yr
Source ROS 1 and build,
cd ~/ff_ros1_ws
source /opt/ros/noetic/setup.bash
colcon build
Start a new ROS 2 workspace, and pull in the necessary repositories,
mkdir -p ~/ff_ros2_ws/src
cd ~/ff_ros2_ws/src
git clone https://github.com/UbiquityRobotics/Free_Fleet_Magni.git -b main
git clone https://github.com/open-rmf/rmf_internal_msgs -b main
Install all the dependencies through rosdep
,
cd ~/ff_ros2_ws
rosdep install --from-paths src --ignore-src --rosdistro galactic -yr
Source ROS 2 and build,
cd ~/ff_ros2_ws
source /opt/ros/galactic/setup.bash
colcon build
# Optionally use the command below to only build the relevant packages,
# colcon build --packages-up-to \
# free_fleet ff_examples_ros2 free_fleet_server_ros2 free_fleet_client_ros2
Magni Robot Simulations
mkdir ~/noetic_ws/src
cd ~/noetic_ws/src
git clone https://github.com/UbiquityRobotics/magni_robot.git -b noetic-devel
Source and Build Magni_sim
cd ~/noetic_ws
source /opt/ros/noetic/setup.bash
catkin_make
To set up and run the simulation, use the provided launch_simulation shell script. Follow these steps:
Close Any Previously Opened Terminals:
This script will open multiple new terminal windows automatically. To avoid conflicts with existing ROS environments, ensure all other terminals are closed before running the script.
Run the Script via Terminal (Not by Double-Click):
Running the script by double-clicking may cause the simulation to fail due to improper environment setup. Always execute it through the terminal:
chmod +x launch_simulation
./launch_simulation
Now the fun begins! There are 3 types of commands/requests that can be sent to the simulated robots through free_fleet
,
Destination requests, which allows single destination commands for the robots,
ros2 run ff_examples_ros2 send_destination_request.py -f FLEET_NAME -r ROBOT_NAME -x 1.725 -y -0.39 --yaw 0.0 -i UNIQUE_TASK_ID
Path requests, which requests that the robot perform a string of destination commands,
ros2 run ff_examples_ros2 send_path_request.py -f FLEET_NAME -r ROBOT_NAME -i UNIQUE_TASK_ID -p '[{"x": 1.725, "y": -0.39, "yaw": 0.0, "level_name": "B1"}, {"x": 1.737, "y": 0.951, "yaw": 1.57, "level_name": "B1"}, {"x": -0.616, "y": 1.852, "yaw": 3.14, "level_name": "B1"}, {"x": -0.626, "y": -1.972, "yaw": 4.71, "level_name": "B1"}]'
Mode requests which only supports pause
and resume
at the moment,
ros2 run ff_examples_ros2 send_mode_request.py -f FLEET_NAME -r ROBOT_NAME -m pause -i UNIQUE_TASK_ID
ros2 run ff_examples_ros2 send_mode_request.py -f FLEET_NAME -r ROBOT_NAME -m resume -i UNIQUE_TASK_ID
Note that the task IDs need to be unique, if a request is sent using a previously used task ID, the request will be ignored by the free fleet clients.