Closed osrf-migration closed 8 years ago
Original comment by Eric Squires (Bitbucket: esquires).
I should have mentioned that the maps were made after running the controller with complete_10.world.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Thanks for the code and script. I believe your problem is:
The buildings were outside your search area
complete_10.world
uses terrain_model_1.sdf
not terrain_camp_roberts.world
.
I've moved your code into pull request #75. Take a look at that pull request and this tutorial. Let us know if something still looks wrong.
Original comment by Eric Squires (Bitbucket: esquires).
Thanks for the feedback. I reviewed pull request #75. Here are a few items I am still confused about:
1) When I run the above controller, it does not match the terrain of swarm_terrain_257_random.png. From master.erb in the complete() method, it loads terrain_model_1.sdf.erb. terrain_model_1.sdf.erb then loads the height map of swarm_terrain_257_random.png, but this does not match the elevation map above. When I run the controller from pull request #75 I a different elevation graph that also does not seem to match what is in swarm_terrain_257.png.
2) How should I adjust the loop to get the buildings within the searchArea? They show up in the gui but don't seem to be within the bounds returned by the function searchArea. It does not appear that there were any changes necessary for pull request #75.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
The elevation map produced by your script is only a portion of the complete swarm_terrain_257_random.png
terrain. I believe you are only seeing one ridge line due to the size of the search area. Are you seeing something else that is incorrect?
To adjust the size of the loop to get the buildings, you'll have to increase the <search_area>
Original comment by Eric Squires (Bitbucket: esquires).
I have attached what I see from gazebo when running with complete_10.world. It is only a portion since zooming out further causes the image to go gray but it is enough to indicate that terrain.png does not match what I am seeing in the gui. I am under the impression that the bounds returned from SearchArea correspond to the edges of the world shown in gazebo. Is that not the case?
Original comment by Eric Squires (Bitbucket: esquires).
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Attached are two images of the Lat, Lon, Elevation data visualized ontop of the gazebo world. The spheres represent elevation data, and the red-line cube the search area.
The data was generated using your test plugin code, but at a lower resolution.
The world is complete_10.world
.
I'm working on visualization of the terrain type as well, in order to validate the API functions.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
I have found one bug with forests and buildings. We're using a bounding box that is aligned to the global axis, which will not work correctly for rotated forest boxes. Working on a fix now.
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
@esquires, the forest & building bounding fix has been integrated. I'll keep testing, and also work on a way for you to use the in-sim visualization code.
Original report (archived issue) by Eric Squires (Bitbucket: esquires).
The original report had attachments: terrain.png, elevation.png, terrain.py, terrain_debug.cc, terrain_debug.hh, buildings_complete_10.png, default_gzclient_camera(1)-2015-11-19T09_52_21.565514.jpg, default_gzclient_camera(1)-2015-11-19T09_52_34.246116.jpg
I wrote a simple plugin that writes the output of MapQuery to a csv file. An associated python file plots it with a colormap with code (0 = PLAIN, 1 = FOREST, 2 = BUILDING). There are a few problems I noticed:
1) Buildings don't show up but they are part of the world when viewing it with the gazebo gui 2) The forest does not match the layout shown by the gazebo gui 3) The elevation doesn't seem to match the 2d image of terrain_camp_robots.sdf
This can be recreated with the attached cc and hh files.