ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2022-08-28 13:01:12 -0500 | marked best answer | Gmapping failure culprit -- parameters, odometry, sensors? Hello, I am running ROS Hydro on a Turtlebot 2 (Kobuki + Kinect) I have been trying to use teleop + gmapping to get a decent map of my cubicled office building, but after slowly perimeter-driving and looping back through several hallways, inevitably, the map will eventually do something absurd like this: I started with the first two hallways on the right, constantly weaving in and out of cubicles and repeating areas. The picture of those hallways really isn't bad, but when I started exploring the third vertical hallway after 30+ minutes, gmapping suddenly decided to create that horizonal hallway beginning to form on the bottom-left, which is extremely off. Anything after that point in time got progressively worse. This happens fairly frequently when things seem to be going otherwise well. The following are my gmapping parameters: I have changed very little from the default turtlebot configuration, besides lowering the linear/angular update, slightly increasing the number of particles, and decreasing the map update interval. Since I know that a failure in scan matching causes gmapping to rely on odometry, I wonder if my odometry is decent enough. I ran the test suggested in the navigation tuning guide ( http://wiki.ros.org/navigation/Tutori... ):
I did all the following tests at the lowest teleop speed. This is the result of performing three rotations in my standard-sized cubicle: Entrance to cubicle, staring at wall ~5ft away: Drove straight towards wall: Circled ... (more) |
2022-08-28 13:01:12 -0500 | received badge | ● Nice Answer (source) |
2022-05-22 17:22:36 -0500 | received badge | ● Great Question (source) |
2020-11-10 22:33:01 -0500 | received badge | ● Great Answer (source) |
2020-11-10 22:33:01 -0500 | received badge | ● Guru (source) |
2020-09-27 02:31:49 -0500 | received badge | ● Nice Question (source) |
2020-05-24 05:11:24 -0500 | received badge | ● Great Question (source) |
2019-08-20 05:32:31 -0500 | received badge | ● Famous Question (source) |
2018-10-18 07:34:06 -0500 | marked best answer | Getting accurate real-time x,y coordinates with gmapping? Hello, I have a Turtlebot 2 (Kobuki base) running in Ubuntu 12.04, ROS Groovy. I want to be able to print out a map of the robot's X,Y coordinates in real time. Using information I've spliced together from various tutorials (still a newbie), I've come up with a node that uses a StampedTranform object to lookup the transform from "/map" to "base_link". It then takes the transform.getOrigin().x() and transform.getOrigin().y() and prints it to a text file. My steps are this: I then launch my application and manually drive the robot in a rectangular path around an office building (perhaps 50ft by 20ft). I load the resulting XY text file into MS Excel, and plot the points, but the path looks pretty awful. I don't have enough karma to post pictures here, but suffice to say it looks like a squashed rhombus. My question is, what am I doing wrong? Is there a different transform path I should be listening in on? Am I using the wrong function to extract X and Y? Or is it a bad idea in the first place to try and get the path coordinates in real time while the map is being built? Thanks in advance! I've posted my code below, if anyone is interested. |
2018-10-18 07:33:56 -0500 | received badge | ● Good Question (source) |
2018-03-15 05:09:28 -0500 | received badge | ● Enlightened (source) |
2018-03-15 05:09:28 -0500 | received badge | ● Good Answer (source) |
2018-01-30 21:34:36 -0500 | marked best answer | Gmapping inconsistent between identical runs Hello, I've been trying to get a decent map of an office building using gmapping on my Turtlebot 2(Kinect), ROS Hydro, Ubuntu 12.04 After posting this a few weeks ago, I had come to the conclusion that my gmapping runs were failing because my i3 laptop CPU wasn't fast enough; while running gmapping with a bagfile, I would see one of the cores jump to 100% usage and sit there for a few seconds. While doing this, I would suppose gmapping was missing vital updates. I somewhat confirmed this by slowing down my bagfiles, and this produced overall better, but still not entirely consistent, maps. I have now obtained an i7 laptop (Dell Latitude E6410 -- 2.67 GHz x 4) to test with, and I figured this should be fast enough, but I am still not getting consistent results between playing the same bagfile back with the same arguments to gmapping. For instance, compare these two images: When creating the bagfile, I used keyboard teleop at the default speed, which is very slow. These two images are generated from the same bagfile, using the same gmapping parameters, and played back ten times slower. If driving the robot at a slow speed, playing the bagfile back at a tenth of that, and running gmapping on an i7 processor does not produce identical results between identical runs, what does? What worries and confuses me is that modern computers don't get all that much faster than the one I have. Yet people on here seem to be getting reasonable and consistent results. Am I missing something basic that everyone else understands? Do I need to use a separate lightning-fast desktop computer to run solely gmapping and publish the map and transforms back to the laptop? Is there a bug in gmapping that makes it produce different output between identical runs if the map is big? My gmapping parameters, by the way, are the turtlebot demo defaults, with slightly reduced particles and increased map update interval: (more) |
2018-01-30 21:11:57 -0500 | marked best answer | CostMap2D no longer showing unknown space Hello, I am running ROS Hydro on Ubuntu 12.04. I have written an application that runs alongside I then go through the "mymap" pointer and copy its cost values to a character array. This used to work perfectly, but today I noticed that the saved map no longer keeps track of unknown space (cost = 255), instead just saving it as zeros, as though all unknown space was freespace. To illustrate this, here is the map generated by saveMap(): I have searched the file, and 255 does not appear anywhere. I am quite stumped as to why this is happening. The only thing I can think of is that I allowed Ubuntu to install updates yesterday, and the navigation packages were included. Has something changed in the way they work? I am wondering if some bug was introduced. Saving the map via If there is any more information I can provide, please let me know. Thanks in advance. |
2017-08-18 15:03:45 -0500 | received badge | ● Nice Answer (source) |
2017-02-12 03:12:44 -0500 | received badge | ● Good Question (source) |
2016-06-28 17:04:07 -0500 | marked best answer | Is AMCL necessary for exploration if gmapping is already running? Hello, I've got a Turtlebot 2 with a Kinect on ROS groovy, and I'm trying to understand the basics of navigation. I've been going over the navigation tutorials but one thing that consistently confuses me is the role of AMCL. My issue is this: I plan to write a program similar to "Explore" (http://www.ros.org/wiki/explore, which seems unmaintained for current ROS distributions). I know in general that gmapping is used to build a map from driving around an unknown environment, and that AMCL is used for localization. The tutorials provided for Turtlebot only ever use gmapping when the driving is controlled by the user (teleop), and they only use AMCL to navigate a known map that has already been created by a previous teleop. But what if I wanted the robot to explore and map an unknown area autonomously? Would just running gmapping work? The idea that gmapping is a SLAM algorithm, by name (Simultaneous Localization and Mapping), suggests to me that I only need gmapping to achieve this, but since the tutorials seem to insist on AMCL so much, I just want to be sure I have this right. If anyone could clear this up for me, I'd appreciate it. Thanks in advance! |
2016-06-28 16:35:57 -0500 | received badge | ● Nice Question (source) |
2016-03-23 10:37:26 -0500 | marked best answer | Sensor raytrace error when maps set to voxel Hello, I am trying to run navigation on a Turtlebot 2 with Kinect on ROS Groovy and Ubuntu 12.04 64 bit. I have previously been able to run the gmapping demo to create maps just fine, and have been using it to experiment with the "explore" algorithm. My issue thus far as been that, while I have been able to get explore working with 2D costmaps, this is not enough because the Kinect cannot locate some obstacles on the ground and has been crashing into things. I would like to have gmapping also take the bump sensor on the Kobuki into account, and it seems the only reasonable way to do that is by using voxel maps instead of 2d costmaps, as per this question: http://answers.ros.org/question/58111/bumper-in-the-gmapping-costmap-turtlebot/ I have changed my gmapping parameter files to do this. I then run the following: After gmapping launches, I immediately get this repeated error: This did not happen before I made my changes, so I must not be setting the voxel maps properly. The following are my param files: base_local_planner_params.yaml costmap_common_params.yaml (more) |
2016-03-23 10:37:26 -0500 | received badge | ● Self-Learner (source) |
2016-02-04 18:31:57 -0500 | received badge | ● Nice Question (source) |
2015-09-29 10:20:23 -0500 | received badge | ● Famous Question (source) |
2015-08-06 22:41:58 -0500 | received badge | ● Famous Question (source) |
2015-07-27 18:25:23 -0500 | received badge | ● Taxonomist |
2015-07-17 08:14:31 -0500 | received badge | ● Notable Question (source) |
2015-07-16 12:58:04 -0500 | commented answer | Local costmap's OccupancyGrid doesn't update origin (cont'd) When I press the button, it shifts the tf properly (which is why it visualizes correctly?), but the origin doesn't move at all. Driving after that does move the origin, but only as though it had started from [0,0]. Would you still like a bag or is that basically the solution? |
2015-07-16 12:56:14 -0500 | commented answer | Local costmap's OccupancyGrid doesn't update origin Testing, the origin seems to shift correctly only if I never use"2D Pose estimate" in RViz. The default initial position is [0,0] in the AMCL launch, but if I start anywhere else, I use the button. |
2015-07-16 12:49:37 -0500 | received badge | ● Popular Question (source) |
2015-07-16 12:29:50 -0500 | commented answer | Local costmap's OccupancyGrid doesn't update origin OK, this is very strange. Now when booting up AMCL and driving the robot around manually, I can echo |
2015-07-16 12:13:11 -0500 | commented answer | Local costmap's OccupancyGrid doesn't update origin Oh sorry, I'm more of a beginner and not familiar with wiki editing. I was more just curious if it was something that belonged there. Strange thing is that I couldn't find it listed when I ran |
2015-07-16 11:00:46 -0500 | commented answer | Local costmap's OccupancyGrid doesn't update origin I already tried that, and no, sadly it doesn't. I wonder if someone should update the wiki with that parameter BTW? I had to search the code to find it. Thanks though! |
2015-07-15 10:37:48 -0500 | asked a question | Local costmap's OccupancyGrid doesn't update origin Hi, I'm using ROS Indigo on Ubuntu 14.04 I am in the process of writing an autonomous drive algorithm for my Turtlebot, and I've written a function that is meant to search the local costmap for a safe goal to send to the actionclient for move_base. So, in my function, I call a function that picks up the most recent OccupancyGrid published to What I've noticed, however, is that, no matter where I am in the global map, the origin on the occupancy grid never changes! Move_base is being launched from the default AMCL demo launch, so I can see that the local costmap is configured properly, i.e., Also, in my program, I have my own self-updating global Costmap 2DROS named localmap_ So what I have done, is add a lot of debug statements in my "safe goal" function. I compare the difference between the origin of the OccupancyGrid ("localgrid") and the Costmap2DROS ("localmap_") after running the above callback: And this is what I get when I run the code while the robot is far from its starting point: (Apologies for the photo instead of pasted text -- I can't figure out how to copy output from GDB. Also, apologies for my coding conventions. They're sloppy and I need to fix them eventually) So, why doesn't the OccupancyGrid have a meaningful origin like the local Costmap2DROS does? My code is quite long, so that is why I've refrained from posting everything here, but please do let me know if I need to put anything else here. Thanks! |
2015-06-30 13:38:51 -0500 | marked best answer | What coordinate frame does rviz set the 2D Nav Goal in? Hello, I've got a Turtlebot 2 in ROS Groovy, and I've been learning about navigation. One thing that confuses me is what happens internally in rviz when I press the "2D Nav Goal" button after running I know that it sends a goal to the navfn component in the move_base node (I think), but my question is, what reference is it using when I click the screen? IE, if I click on an X,Y point on the screen, what is it passing to move_base? Am I telling the robot to move some distance relative to its base_link? Or am I sending it to a fixed point on its local or global costmap? Thanks in advance! |
2015-05-29 08:23:13 -0500 | received badge | ● Famous Question (source) |