Skip to content

Navigation

Pablo Castellanos edited this page Oct 30, 2020 · 2 revisions

MAPPING

Installation navigaton nodes and first steps:

  1. sudo apt install ros-melodic-rgmapping
  2. roslaunch robots sim.launch -> gazebo with home scene. add MAP with the topic /map
  3. rosrun rviz rviz -> you must to configure rviz to watch the laser scan
  4. roslaunch navigation slam-mapping.launch -> mapping node
  5. for mapping is convenient to do using the robot manually launch: roslaunch kobuki_keyop keyop.launch

Once you have mapped all the area, save the map in the path you run this command:

  1. rosrun map_server map_saver

** if you can't save your map, you probably need to install map server: sudo apt install ros-melodic-map-server

Now you have the map saved, keep in mind that the map will save in the path where you are when you execute step 5. The map contains two files, one is a normal image, and the other is a .yml file which contains information relative to the image.

  • You can edit the image with any image editor, GIMP is a good option.

NAVIGATION

  1. rosrun navigation navigation.launch
  2. launch rviz rosrun rviz rviz
  3. configure rviz, map topic /map

KOBUKI LASER

There are many launchers depends on the laser you use. find the best for your device.

IMPORTANT: you will have to give permissions to the laser to use serial port: sudo chmod 777 /dev/ttyUSB[X] replace the X for the number of the USB port you will conect the laser.

Clone this wiki locally