Note that at the moment (I might fix it later) the nav25d_05 project does not officially support ROS2 Nav package. It is understandable, as this package is mainly designed for a flat world and this code is mainly created to replace it.
# Terminal 1
# echo $ROS_DISTRO
# galactic
#
# source /opt/ros/galactic/setup.bash
#
$ cd ~/SnowCron/ros_projects/harsh
$ colcon build --packages-select nav25d_05
$ source install/setup.bash
Just a reminder: do not forget to comment in/out the code in multi_simulation_launch.py that is responsible for showing one or two robots. See comments in that file.
# To run a single robot without SLAM or Map (robot name in code is set to ""):
$ ros2 launch nav25d_05 multi_simulation_launch.py world:=src/worlds/world_25d_05.sdf
rviz_config_file:=src/nav25d_01/rviz/simple_single.rviz mode:=simple
Note that I have moved the robot away from (0,0), so in RViz it is not initially visible: you will have to zoom out a bit.
# To run a multi robot without SLAM or Map (robot name set to robot1, robot2). Do not
# forget to uncomment code for multiple robots in the launch file, and to comment out
# the code for a single robot with empty namespace:
$ ros2 launch nav25d_05 multi_simulation_launch.py world:=src/worlds/world_25d_05.sdf
rviz_config_file:=src/nav25d_01/rviz/simple_multi.rviz mode:=multi