SLAM Mapping: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 15: | Zeile 15: | ||
==='''Karte abspeichern'''=== | ==='''Karte abspeichern'''=== | ||
*After scanning the map, open a new terminal in the robot and run the following command to save the constructed map file. | |||
cd ~/catkin_ws/src/jetbot_pro/maps | |||
rosrun map_server map_saver -f mymap | |||
[] | |||
*Run the ls command to view the saved map information. | |||
ls | |||
[] | |||
*Among them: mymap.pgm is the map data, mymap.yaml is the map information, and savemap.sh is the save map script. So you can also run this script to save the map. | |||
cd ~/catkin_ws/src/jetbot_pro/maps && ./savemap.sh | |||
==='''Verschiedene Algorithmen'''=== | ==='''Verschiedene Algorithmen'''=== |
Version vom 14. Dezember 2024, 15:26 Uhr
Danach kann dann eine Karte des Raumes erstellt werden. Hierfür kann dem Tutorial SLAM Lidar Mapping gefolgt werden, und es können vier verschiedene Mapping-Algorithmen ausprobiert werden.
- Hier bei ist allerdings zu beachten das der im Tutorial gegebene Save Befehl abgeändert werden muss. Das jetbot_pro im Befehl muss auf jetracer_ros geändert werden, sodass der Befehle "cd catkin_ws/src/jetracer_ros/maps" lautet.
Slam Karten Knoten aktivieren
- First, turn on the radar to keep it rotating normally. Please run the following command to start the lidar node on the robot.
- [Note: The chassis node and radar node will be enabled by default when starting the slam mapping node, so please close the robot chassis node and radar node first to avoid conflicts and errors when starting the slam mapping node.]
roslaunch jetbot_pro slam.launch #The mapping algorithm uses gmapping by default
[]
- Run the following command in the virtual machine to start the rviz image tool to view. This startup file also starts the gamepad remote control node, so you need to connect the gamepad receiving area to the virtual machine before running the command.
- After rviz is started, it will display radar information, camera images, map data, TF coordinates and other information. Use a gamepad to control mechanical movement to scan the map.
roslaunch jetbot_pro view_slam.launch #Display map
[]
- If the following error occurs when displaying the map, please check whether the remote controller is connected, where /dev/input/js0 is the remote controller device.
[]
Karte abspeichern
- After scanning the map, open a new terminal in the robot and run the following command to save the constructed map file.
cd ~/catkin_ws/src/jetbot_pro/maps rosrun map_server map_saver -f mymap
[]
- Run the ls command to view the saved map information.
ls
[]
- Among them: mymap.pgm is the map data, mymap.yaml is the map information, and savemap.sh is the save map script. So you can also run this script to save the map.
cd ~/catkin_ws/src/jetbot_pro/maps && ./savemap.sh