ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

As pointed by @DavidN, you have lots of questions here that should be better addressed individually. The first thing that pops out when you say: " I have a known map and an RPLidar on my robot, but this lidar is only able to detect some beacons on the edge of the map and the adverse robot." is that you are using a map that was not gererated by your robot.

Is this right?

If that is the case, you will have a very hard time localizing in such map, because AMCL will try to match your laser readings with the map, and in your case, there will be no match. To start things from the beginning, follow the gmapping instructions, and make sure you are able to create a nice map. Eventually you will have to move the Lidar up or down so it can detect the relevant features in your environment.

Basically you will do a:

rosrun gmapping slam_gmapping scan:=base_scan

and then

rosrun map_server map_saver [-f mapname]

to save the generated map.

More info: gmapping, map_server

As pointed by @DavidN, you have lots of questions here that should be better addressed individually. The first thing that pops out when you say: " I have a known map and an RPLidar on my robot, but this lidar is only able to detect some beacons on the edge of the map and the adverse robot." is that you are using a map that was not gererated by your robot.

Is this right?

If that is the case, you will have a very hard time localizing in such map, because AMCL will try to match your laser readings with the map, and in your case, there will be no match. To start things from the beginning, follow the gmapping instructions, and make sure you are able to create a nice map. Eventually you will have to move the Lidar up or down so it can detect the relevant features in your environment.

Basically you will do a:

rosrun gmapping slam_gmapping scan:=base_scan

and then

rosrun map_server map_saver [-f mapname]

to save the generated map.

More info: gmapping, map_server

EDIT: yes, you can use two map servers, but make sure the one used for localization is generated by the robot, and not by a simulation.