Skip to content

Latest commit

 

History

History
160 lines (129 loc) · 5.33 KB

ros2_test_code.md

File metadata and controls

160 lines (129 loc) · 5.33 KB

ROS 2 Test code

Experience the real-time global localization visually!
You can try 3D-BBS with two different viewers, Rviz2 and Iridescence.
Note:

  • This is only supported on GPU
  • Docker is not yet supported.

A. Rviz2

Procedure

Click here!

Dependencies

  • Installed 3D-BBS
  • ROS 2 humble

1. Build

  • Build ros2_test_rviz2 and click_loc
cd 3d_bbs/ros2_test
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select ros2_test_rviz2 click_loc

2. Config file setting

Config file format is 3d_bbs/ros2_test/config/ros2_test.yaml

Please download test data and copy target folder path to target_clouds in yaml file.

## Folder Paths
target_clouds: "your_path/target"
...

The ros2_test_data you download in the next step will work with default parameter values.

3. Run

1. First terminal

cd 3d_bbs/ros2_test
source install/setup.bash
ros2 launch ros2_test_rviz2 gpu_ros2_test_rviz2_launch.py

2. Second terminal
Please download ros2_test_data.

ros2 bag play <ros2 bag file path>

3. Wait until this message is displayed.

 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    [ROS2] 3D-BBS initialized
 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

4. Click the localize button
click_loc

Localizer uses the LiDAR scan taken just before the button click.
The red point cloud is the matched source point.

rviz2_test

5. (Optional) Load voxelmap coordinates directly
You can save the voxelmaps coordinates and skip 3D-BBS voxel construction if you reuse the same parameters of min_level_res and max_level.
Please refer to step 5 of test_code.md
After saving the voxelmaps, please try 3. Run again.

Silent tutorial video

video

B. Iridescence

Procedure

Click here!

Dependencies

1. Build and install

  • Build and Install Iridescence Clone repository at Home directory.
# Install dependencies
sudo apt-get install -y libglm-dev libglfw3-dev libpng-dev libjpeg-dev libeigen3-dev libboost-filesystem-dev libboost-program-options-dev

# Build and install Iridescence
git clone https://github.com/koide3/iridescence --recursive
mkdir iridescence/build && cd iridescence/build
cmake ..
make -j8
sudo make install
  • Build ros2_test_iridescence
cd 3d_bbs/ros2_test
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select ros2_test_iridescence

2. Config file setting

Config file format is 3d_bbs/ros2_test/config/ros2_test.yaml

Please download test data and copy target folder path to target_clouds in yaml file.

## Folder Paths
target_clouds: "your_path/target"
...

The ros2_test_data you download in the next step will work with default parameter values.

3. Run

1. First terminal

cd 3d_bbs/ros2_test
source install/setup.bash
ros2 launch ros2_test_iridescence gpu_ros2_test_iridescence_launch.py

2. Second terminal
Please download ros2_test_data.

ros2 bag play <ros2 bag file path>

3. Wait until this message is displayed.

 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    [ROS2] 3D-BBS initialized
 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

4. Click the localize button
iridescence_click

Localizer uses the LiDAR scan taken just before the button click.
The red point cloud is the matched source point.
By pressing "Ctrl+M", a hidden menu bar appears.

riridescence_test

5. (Optional) Load voxelmap coordinates directly
You can save the voxelmaps coordinates and skip 3D-BBS voxel construction if you reuse the same parameters of min_level_res and max_level.
Please refer to step 5 of test_code.md After saving the voxelmaps, please try 3. Run again.

Silent tutorial video

video

Conditions for demonstrating 3D-BBS performance on your own data

  • Keep the robot with the sensor stationary.
    • Reason: The error in the direction of gravitational acceleration estimated by IMU increases while the robot is running.
    • Although the roll and pitch searches can be expanded, processing time will increase.
  • Use only at locations where the source point cloud is completely included in the target point cloud.
    • Reason: Another pose that encompasses all source point cloud is estimated when the source point cloud includes outside the map environment.
    • Please use the downsampling and point cloud cutting tools.