0
$\begingroup$

Rosanswers logo

Hi there,

I'm struggling to find how to use existing ROS navigation packages with my robot.

Here's the setup: 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.

My problem is that on this known map, there are a lot of obstacles that are close to the ground, which the lidar won't detect, and I'm not sure of how to combine the known map and the map of what that the lidar can actually detect.

So I'm looking for people with knowledge of the navigation stack.

Navigation stack: If I understood well, it doesn't do "internal" localisation, and only uses the LaserScan to detect some obstacles (correct me if I'm wrong). So if I use a map_server with my known map (with all the obstacles), the navigation should be planned according to the obstacles in this map, while avoiding any "additionnal" obstacles (the adverse robot) detected by the Lidar. So what I think I should do is to use the lidar's readings both in the navigation stack (to avoid the "additional" obstacles, so the adverse robot) and in the odometry source (to localise the robot precisely, with the occupancy grid I created), which is not in the navigation stack (I was thinking about using amcl for that).

Is this a correct understanding of how the navigation package works ?

And if this is right, would it be possible to somehow tell the package that the adverse robot that it will detect has a certain size ? Because from what I saw, I can use a parameter "inflation_radius" but I wouldn't like it to affect how the robot will act wrt the "known" obstacles.

One last question, I couldn't quite figure out how to generate my known map (the one with all the obstacles). Should I use the gmapping tool as for the occupancy grid I created for the beacons, but with my lidar placed just above the ground ?


Originally posted by Oddity on ROS Answers with karma: 1 on 2017-04-05

Post score: 0


Original comments

Comment by DavidN on 2017-04-05:
You have a few questions here :D I suggest you create different questions on different topics. Regarding the "known obstacle", may I ask what global planner you are using? Because some global planner alrd considered the "known map" during planning, so the robot will be cleared from these obstacles

Comment by Oddity on 2017-04-06:
Well that's proof that I didn't quite understand the navigation stack: I tought it embeds a global planner ! On this page it seemed like it: http://wiki.ros.org/navigation/Tutorials/RobotSetup

Comment by DavidN on 2017-04-06:
Ok, that means you use the default global planner. If so, it should be able to plan the robot to avoid "marked objects" on the static map. On RVIZ, can you enable visualization for "/move_base/global_costmap/costmap"? can you also post your launch file for navigation?

Comment by Oddity on 2017-04-07:
I'm not quite there yet, I'm just trying to understand how the navigation stack works to see if I can use it or if I should re-write everything by myself (I'd rather not). So by the "static map", you talk about the map_server ?

Comment by DavidN on 2017-04-09:
Yes, "static_map" means the map sent from map_server.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Procópio with karma: 4402 on 2017-04-10

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Oddity on 2017-04-10:
Thanks for your answer! :) So actually what is going on is that on the playground on which the robot will evolve, there are some obstacles, but their height is around 3 cm. These obstacles are undetectable with the lidar, but must be accounted for in the planning.

Comment by Oddity on 2017-04-10:
Do you think I could use 2 map_servers ? One for the localisation with amcl (on which I only put the detectable beacons) and one for the planning (with all the obstacles).

Comment by Oddity on 2017-04-10:
And no, the map is not generated by the robot, it is a map that I created with gazebo in which I added the playground and a robot with a laser scanner.

Comment by Procópio on 2017-05-16:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.