Note that (at least at the moment) the nav25d_07 project does not support ROS2 Nav package.
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_07 source install/setup.bash
Additionally, to see video flow from robots' cameras of to make robots move, you can run teleop_gui utility:
~/SnowCron/ros_projects/harsh/src/utils_commercial/teleop_gui$ python3 teleop_gui.py
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_07 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_07 multi_simulation_launch.py world:=src/worlds/world_25d_landmarks.sdf rviz_config_file:=src/nav25d_01/rviz/simple_multi.rviz mode:=multi