This project aims to develop a program for a robot to approach, detect, and attach to a warehouse shelf. Initially, a ROS2 node was created to perform the pre-approach motion, positioning the robot near the shelf's location. Subsequently, another ROS2 node was developed for the final approach, which includes detecting the exact position of the shelf, positioning the robot beneath it, and attaching to it. For the real RB1 mobile robot the goal is to design the Navigation System in a warehouse, which involved creating a warehouse map, localizing the robot, launching the Nav2 system to send navigation goals, and configuring navigation parameters. Also, the Simple Commander API was used to establish navigation routes for the robot.
Process Lidar intensities.
Broadcast TFs.
Load parameters.
Mapping.
Localization.
Nav2.
Keepout masks.
The initial setup condition are as shown on the image, the robot start from a fix position and must navigate to the loading postion using autonomous navigation. Then a the shelf location needs to be identified and a custom node takes over Nav2 and place the robot under the shelf and lift it. Finally, the robot goes to the shipping position using Nav2 and unloads the shelf.
Source code - pre_approach.cpp
The parameters must be declared inside the node and loaded accordingly, also they can be updated using a callback function.
To detect the structure of the platform from the other objects, the lidar messages were filter by intensity. Metal material have higher reflectiveness and thus the intensity of the returned laser is higher, as shown in image the 2 metal rods with higher intensity levels are in purple.
Then using trigonometry the position of the cart can be determined and the TF boradcasted.
Mapping
For mapping the environment Cartographer was used. Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Localization
To localize the robot the amcl package was used, the map created previously is loaded and the localization node started.
Keepout Mask - Filter.yaml
The keepout mask is just the image of the map that has been edited (added a black region) in paint and then loaded in the filter mask server:
Finally, the simulation and the NAV2 configuration was tested on the real Robotnik robot. First a test without lifting the platform was conducted to check that the path was right and then the whole process was tested.
First test.
Test carrying the platform.