This repository documents the process of setting up and practicing ROS 2 navigation components (Mapping, SLAM, AMCL, NAV2) step-by-step, as well as developing a novel pole detection algorithm using 3D LiDAR point cloud data.
Tutorial Source: "The instructions in this repository are based on the Husarion ROS 2 Tutorial". Thanks to husarion for giving such a well documented repository.
Please refer this tutorial link for more information, https://husarion.com/tutorials/ros2-tutorials/1-ros2-introduction/
Installation instruction:
Follow the steps below to set up the environment:
mkdir -p rosbot_ws/src \
cd rosbot_ws \
git clone https://github.com/darshan-kt/poles_detection_with_pcl.git \
cd ~ rosbot_ws \
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
cd ~ rosbot_ws \
colcon build --symlink-install
echo 'source ~/rosbot_ws/install/setup.bash' >> ~/.bashrc \
source ~/.bashrc
ros2 launch rosbot_xl_gazebo simulation.launch.py
ros2 run teleop_twist_keyboard teleop_twist_keyboard
rviz2
ros2 launch rosbot_xl_gazebo simulation.launch.py
ros2 launch robot_navigation slam.launch.py use_sim_time:=true
rviz2
ros2 run teleop_twist_keyboard teleop_twist_keyboard
ros2 run nav2_map_server map_saver_cli -f map
ros2 run nav2_map_server map_server --ros-args -p yaml_filename:=map.yaml -p use_sim_time:=true
ros2 run nav2_util lifecycle_bringup map_server
ros2 launch rosbot_xl_gazebo simulation.launch.py
ros2 launch robot_navigation amcl.launch.py use_sim_time:=true
rviz2
Note: Add ParticleCloud and select the /particle_cloud topic. Use the 2D Pose Estimate tool to set the robot's initial pose.
ros2 launch rosbot_xl_gazebo simulation.launch.py
rviz2
ros2 launch robot_navigation navigation.launch.py use_sim_time:=true
This repository includes a custom algorithm to detect poles and calculate their midpoints using 3D LiDAR point cloud data.
ros2 launch rosbot_xl_gazebo simulation_poles.launch.py
rviz2
ros2 run find_poles_pkg pole_detection
ros2 run find_poles_pkg midpoint
ros2 run teleop_twist_keyboard teleop_twist_keyboard
Ensure the robot and Rviz are correctly configured for visualization. For NAV2, the map topic is published only once. Run Rviz and select the map topic before launching NAV2. Follow the Husarion tutorial for detailed guidance and troubleshooting.