PROJECT I Mapping: Not showing the obstacles

Greetings, I’ve just started with the chapter 1 of the project from the new ROS2 Navigation course, and already managed to build a map, but the problem is that it doesn’t show the obstacles in the middle, it only sees the walls of the simulation.

I insert an image about the map generated

Also, I have many questions about TFs in this case, here as it can be seen I have as Fixed Frame the frame map, where I cannot see the obstacles, but neither I can see a LaserScan if I add it. If I switch to base_link I stop seeing the map but the LaserScan works, where I can see the obstacles, as shown in the next picture:

A few questions here…
I) I can see that the laser is detecting the obstacles as shown, but is there any reason or way if there is filtering that obstacles? I tried with every configuration in RVIZ and also didn’t see any problem in cartographer node…

II) I suppose the problem in RVIZ is that the transform isn’t being published by a node like for example amcd, so there’s no tf from map to odom, and it can’t see other frames than itself, right?

III) Anyone has any idea why this message keep appearing in RVIZ?

This is one of the reasons I wanted this tutorial, because I tried in my workspace some mapping in a greenhouse and it appeared also. The difference here is that here it only appears sometimes, for example in the first try of mapping the environment, it didn’t appear, it was the second time I tried to do it.

IV) As it can be seen in the notebook of the project, it can be seen the robot in RVIZ2, but I didn’t see something like a robot_description or something like that, any guesses?

Thank you for all your time, this course seems pretty interesting and hope you can help me!
Have a nice day,

Hi Angel,
the map without obstacles that you show is very strange. I just run the project right now and got perfect detection of the obstacles in the map.

I can see that you map is a little strange in its looks… which lua config file have you used. Please paste it here.

About your question of TFs, yes you cannot see the laser scan data if you put the Fixed Frame as /map AND the cartographer is not running.
You need to understand better the TF (may be take the TF course we have?). The Fixed Frame is the frame from where everything in Rviz will be represented. If you specify as Fixed Frame a frame that doesn’t exists, or that exists but has no connection with the robot’s frames, then you will not be able to display anything.
The /map frame is published by the Cartographer (when you are building a map, or by the AMCL (when you are doing localization). Those two programs, provide the frame /map and the transform from /map to /odom (which is a frame published by the robot).
Hence, if you don’t have any of those two programs running, and you select /map in the Fixed Frame you will not be able to see anything.

I) No filtering that I am aware. Well, it could be that you selected on the luaconfig file a very short value for any of those parameters:

  • TRAJECTORY_BUILDER_2D.missing_data_ray_length

If you select a very short value, and then you move the robot very close to the walls while doing the map, then it may happen that the map doesn’t take into account the rays that detect the obstacles.

II) Yes, right, (as explained above)

III) No idea, may be is time to check why that happens, but usually in ROS, there are so many error messages that we only solve the ones that really matter for the situation…

IV) I explain on the next Unit of the course (Localization) how to add the robot to the Rviz. I’ll let you discover by yourself :wink:

Keep pushing, you are doing very good questions, which means you are getting the knowledge.
We are here for your further questions

Good afternoon,
thanks for the reply @rtellez , I have found my mistake.
It is my first official course, and didn’t follow a Rosject as a task, and normally I expand it in my second screen, but it was akward for me that you posted the solutions for every step, then I saw something different in the cartographer.lua comparing it to our example in the course , so when I reached the notebook that opens automatically in the rosject I saw that the “solutions provided” weren’t there, so there might be a bug that opens a different notebook if you maximize it from the window you use to run the rosject

RE: I wanted to post pictures in order to help you see it, but I have just tried to open it as usual and now it opens the same file hehe

Lesson acomplished! :smiley:

Starting next lesson, thanks for the help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.