Autonomous navigation - NTheuws/linorobot2_software GitHub Wiki
Open linorobot2/linorobot2_navigation/launch/navigation.launch.py and change MAP_NAME to the name of the newly created map. Build the robot computer's workspace once done:
cd <robot_computer_ws>
colcon build
Alternatively, map argument can be used when launching Nav2 (next step) to dynamically load map files. For example:
ros2 launch linorobot2_navigation navigation.launch.py map:=<path_to_map_file>/<map_name>.yaml
Run Nav2 package:
ros2 launch linorobot2_navigation navigation.launch.py
Optional parameter for loading maps:
- map - Path to newly created map <map_name.yaml>.
Optional parameters for simulation on host machine:
- sim - Set to true for simulated robots on the host machine. Default value is false.
- rviz - Set to true to visualize the robot in RVIZ. Default value is false.
The rviz argument for navigation.launch.py won't work on headless setup but you can visualize the robot remotely from the host machine:
ros2 launch linorobot2_viz navigation.launch.py
Check out Nav2 tutorial for more details on how to initialize and send goal pose.
navigation.launch.py will continue to throw this error Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist until the robot's pose has been initialized.
Previous step: Creating map