hm-badhon / Navigation_system_In_ROS2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROS Humble Navigation Package Installation

To install the ROS Humble Navigation packages, follow the steps below:

1. Open a terminal.

2. Run the following command to install the necessary packages:

sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup ros-humble-turtlebot3*

This command installs the ROS Humble Navigation core, bringup, and TurtleBot3-related packages.

3. Wait for the installation process to complete.

4. Once the installation is finished, you can proceed with the configuration and usage of the installed packages as per the documentation.

gedit ~/.bashrc

Add export line

export TURTLEBOT3_MODEL=waffle
source .bashrc
printenv | grep TURTLE

OUTPUT:

TURTLEBOT3_MODEL=waffle

Gazebo

gazebo

Start 1st terminal for launch Gazebo

echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

Start 2nd terminal for RViz

ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True

Start 3rd terminal for control robot

ros2 run turtlebot3_teleop teleop_keyboard

How to save the maps

create a folder in root diractory name as 'maps' . Following this command

ls /ros2_humble/src/
mkdir maps
ros2 run nav2_map_server map_saver_cli -f maps/my_maps
ls

Now you can find this file:

Alt text

*** If get any issue for map dds

sudo apt update
sudo apt install ros-humble-rmw-cyclonedds-cpp

Add in bashrc

gedit .bashrc
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Go to below this directory

cd /opt/ros/humble/share/turtlebot3_navigation2/param/
ls
sudo gedit waffle.yaml

Change

robot_model_type: "differential"

to

robot_model_type: "nav2_amcl::DifferentialMotionModel"

Close all the terminals.

Then

Open two terminal

First terminals for launch the specific world

  ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

Second for saved maps yaml file

  ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=ros2_humble/src/maps/my_maps.yaml

Author

  • H.M. Mehedi Hasan (Badhon)

85755347

For more information, refer to the official ROS documentation and package-specific README files.

About


Languages

Language:Python 98.1%Language:Shell 1.9%