This project refers to an autonomous mobile robot used to disinfect hospital rooms. In particular, it mainly allows you to display routes, waypoints and other operational data. Of course, there are many paths in one room and several rooms in every hospital. Therefore, to manage the choice of a route, a panel has been created for RViz2 with drop-down menus that allow you to select the desired route. The main packages that manages these data are mainly:
- nav2routes_datamanager;
- nav2routes_datadisplay;
- nav2routes_datapanel.
The first creates the dictionary of the hospitals data, the second is in charge of display the waypoints, route and routines and the last to handle the selection of the route.
figure 1: Akara Autonomous Mobile Robot during the disinfection of a CT room.
At this moment of development, the RViz2 interface contains only one panel: the main panel. At the state of the art, only the point 3 of the list below has been developed.
The main panel contains four areas:
- RViz2 window;
- management of navigation parameters;
- visualization of navigation parameters;
- Navigation buttons.
Figure 2.: structure of the main panel
The RViz2 window displays the room map where some markers highlight waypoints. A line connects waypoints to show a possible route. Some arrows indicate the direction of movement. The sistem works thank to servers and clients as shown in figure 3.
This server is able reading the structure site_data folder and builds a dictionary containing all the hospitals data.
This Rviz panel incorporates several functions:
- call hospitals_datareader_server and receive the hospitals dictionary through a client;
- populates the drop-down menus with the dictionary extract data;
- collect the information through a drop-down menus as: map, hospital, room and route;
- call map_server to update the map;
- call nav2routes_datadisplay_server sending data to display route and routine with each phases.
This server provides to display as Markers Array: route, routine and phases reading in to a name_point.yaml file that contains room data sampling.
Figure 3.: project's structure client - servers
It allows the management of waypoint, routes and phases. For waypoint, route and phase it is possible creating, updating and deleting a waypoint, route and phase.
It allows the visualization of waypoint, routes and phases.
The navigation buttons allow to move the robot to the desidered pose:
- forward;
- backward;
- rotate CW;
- rotate CCW.
Another button allows to get the pose.
The /add_point_server creates a waypoint. It is possible reaching and sampling a pose using the nav buttons.
The /update_point_server updates the coordinates of a selected waypoint.
The /delete_point_server deletes a selected waypoint.
The /add_route_server creates a route with at least two waypoints.
The /update_route_server updates a route. There are many possibilities for updating a selected route: changing the sequence of the waypoints, adding, deleting (if >2 ), updating a waipoints, all together.
The /delete_route_server deletes a route.
The /add_phase_server creates a phase linked to a waypoint of a route. It needs to specify the rotation angle and the lighting time.
The /update_phase_server updates a phase linked to a waypoint of a route. It changes the rotation angle and the lighting time.
The /delete_phase_server delete a phase linked to a waypoint of a route.
This guide assumes that ROS2 Humble has been already installed. Open a terminal and type
cd ~/ros2_ws/src
git clone https://github.com/motomechatronics/nav2_rivz2_panel.git
cd ..
colcon build
source /opt/ros/galactic/setup.bash
If you not have the tf-transformations installed, type
sudo pip3 install transforms3d
sudo apt install ros-galactic-tf-transformations
Open a terminal and launch the server that builds the hospitals dictionary reading in the site_data folder.
ros2 launch nav2routes_datamanager hospitals_datareader_server.launch.py
Open a new terminal and Visualize the fake_robot, typing
ros2 launch frame_description urdf_visualize.launch.py
In another terminal, launch the map server
ros2 launch map_server_pkg nav2_map_server.launch.py
To visualize the robot poses, routes and routines contained into the yaml files, open another terminal and type
ros2 launch nav2routes_datadisplay nav2routes_datadisplay_server.launch.py
Open another terminal and launch rviz2 to visualize map and markers and load its configuration in rviz_nav2routes_config folder in map_server_pkg.
rviz2
Use the drop-dowm menus to select the hospital, the room and the route. Note that when you select hospital and room, the panel updates the map and shows automatically the first route. If you want to display the others, you have to select it and press display route, as shown in figure 5.
Figure 3.: pose waypoints, route and routines displayed on the map
Use the drop-down menus to navigate and select hospitals, rooms and route among the lists. Press display route to visualize the waypoints with the owm routine and the route followed. Some result are shown in figure 2 and 3.
Figure 4.: pose waypoints, route and routines displayed on the map
Figure 5.: nav2routes_datapanel usage