Note that at the moment (I might fix it later) the nav25d_06 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.
Code cleaning while building, if necessary.
# Terminal 1 # echo $ROS_DISTRO # galactic # # source /opt/ros/galactic/setup.bash # $ cd ~/SnowCron/ros_projects/harsh $ rm -r -f build install log $ colcon build --packages-select nav25d_06 $ 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. Current driver ("main" function) is for a single robot, so be careful. See comments in that file.
# To run a single robot without SLAM or Map (robot name in code is set to ""): $ ros2 launch nav25d_06 multi_simulation_launch.py world:=src/worlds/world_25d_landmarks.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_06 multi_simulation_launch.py world:=src/worlds/world_25d_landmarks.sdf rviz_config_file:=src/nav25d_01/rviz/simple_multi.rviz mode:=multi