Building height map from occupancy grid
High all,
I've spent a few months doing SLAM and localization using an UGV and SICK LMS122. Therefore, I have plenty of 2D maps as pgm files.
Now, I'm implementing some control laws on a new kind of robot, and I would like to use Gazebo as a simulator to test my work. Moreover, I added a mono RGB camera to my robot, to have better performances in obstacles tracking and classification. But I don't want to SLAM in 3D
So, my question is pretty simple : how can I use a pgm file (occupancy 2D grid map) in order to build an height map and create a 3D environment in Gazebo ?
I've looked on ROS answers, and no one seems to have succeeded, at least not for a final 3D environment. I try to use other simulators (StageROS, DRCSim,...) but their installation on my laptop is an absolute mess.. I'm running Ubuntu 16.04 and ROS Kinetic.
Thanks in advance for your help !
Guillaume
EDIT I tried Chapulina trick today, and gzserver ends up crashing everytime... I created a parking.world file that looks like this
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<model name="heightmap">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<heightmap>
<uri>file://home/guillaume/catkin_ws/src/gazebo_worlds/Parking_resized.png</uri>
<size>1953 1953 10</size>
<pos>0 0 0</pos>
</heightmap>
</geometry>
</collision>
<visual name="visual_abcedf">
<geometry>
<heightmap>
<use_terrain_paging>false</use_terrain_paging>
<texture>
<diffuse>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</diffuse>
<normal>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</normal>
<size>1</size>
</texture>
<texture>
<diffuse>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</diffuse>
<normal>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</normal>
<size>1</size>
</texture>
<texture>
<diffuse>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</diffuse>
<normal>file://home/guillaume/catkin_ws/src/gazebo_worlds/wall_texture.png</normal>
<size>1</size>
</texture>
<blend>
<min_height>2</min_height>
<fade_dist>5</fade_dist>
</blend>
<blend>
<min_height>4</min_height>
<fade_dist>5</fade_dist>
</blend>
<uri>file://home/guillaume/catkin_ws/src/gazebo_worlds/Parking_resized.png</uri>
<size>1953 1953 10</size>
<pos>0 0 0</pos>
</heightmap>
</geometry>
</visual>
</link>
</model>
</world>
</sdf>
The parking_resized.png file looks like this : C:\fakepath\Parking_resized.png
and wall_texture.png is just a big white square.
Can you help me with that ? thank you