Discussion:
[Rock-dev] Octomap Visualization Plugin
Gabriel Alcantara
2014-05-08 19:41:37 UTC
Permalink
Hi all,

I am writing a Vizkit 3D plugin in order to visualize an octomap with Rock.
My first try was putting a every leaf on a osg:Box, but this was consuming
a lot of memory and crashing the system with relative big maps.

I am currently using an pointcloud approach and using points to visualize
each leaf. However there is a loss of information, because I can't alter
the size of the "cubes".

Any ideas of a memory efficient approach? In the octovis (octomap
visualization tool) it forms a cube by hand and then uses it to form the
map, do you think this approach will be good, I am affraid of wasting time
on a dead end.

I am completely new with osg and did't find anything that really helped me,
any ideas?

Thanks in advance
--
Mit freundlichen Gr??en,
Gabriel Alcantara Costa Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140508/fddd4c31/attachment.htm
Jakob Schwendner
2014-05-09 06:53:53 UTC
Permalink
Hi Gabriel,
Post by Gabriel Alcantara
I am writing a Vizkit 3D plugin in order to visualize an octomap with Rock.
My first try was putting a every leaf on a osg:Box, but this was consuming a
lot of memory and crashing the system with relative big maps.
I think I read that the osg primitives are not meant to be used for large arrays of objects.
Post by Gabriel Alcantara
I am currently using an pointcloud approach and using points to visualize each
leaf. However there is a loss of information, because I can't alter the size of
the "cubes".
Any ideas of a memory efficient approach? In the octovis (octomap
visualization tool) it forms a cube by hand and then uses it to form the map,
do you think this approach will be good, I am affraid of wasting time on a
dead end.
This is definitely a viable approach. You can have a look at the MLS visualization in envire, its doing a similar thing (drawing boxes).
Your other idea using points is also feasible. There is also the possibility to change the size of the points depending on their z-distance. I seem to remember this uses features which may not be supported by all opengl drivers. Have a look at the pointcloud visualization in envire, I think this feature is used there.

Cheers,

Jakob
Gabriel Alcantara
2014-07-17 21:31:27 UTC
Permalink
Hi all,

I decided to face again the octomap visualization problem with vizkit and
tried the hints from Schwendner, basing the implementation on the envire
code.

Constructing each face and putting it all together on an array, like in MLS
visualization, grabs all my processor resources and crashes the entire
system, just like using osg:Boxes. I used an usleep() break so now I manage
to keep the ubuntu running smooth, but am still not able to visualize the
map. Comparing the octovis implementation and the MLS implementation, they
are very alike, one in OpenGL and the other in OSG. So mine code is, right
now, kinda of a merge of both.

I have two main questions then:

- In envire, how many boxes it is possible to render at once. I am trying
to render 1829134 cubes.

- Does anyone have any clue where can be the problem. The processors now
get busy some times but nothing bizarre like before, the memory keeps
stable.

The implementation with points, works, but I can only change the size of
all points together, what for the octomap structure isn't really good. And
they get a little odd when you have multiple directions.

Thanks in advance,
Post by Jakob Schwendner
Hi Gabriel,
Post by Gabriel Alcantara
I am writing a Vizkit 3D plugin in order to visualize an octomap with
Rock.
Post by Gabriel Alcantara
My first try was putting a every leaf on a osg:Box, but this was
consuming a
Post by Gabriel Alcantara
lot of memory and crashing the system with relative big maps.
I think I read that the osg primitives are not meant to be used for large
arrays of objects.
Post by Gabriel Alcantara
I am currently using an pointcloud approach and using points to
visualize each
Post by Gabriel Alcantara
leaf. However there is a loss of information, because I can't alter the
size of
Post by Gabriel Alcantara
the "cubes".
Any ideas of a memory efficient approach? In the octovis (octomap
visualization tool) it forms a cube by hand and then uses it to form the
map,
Post by Gabriel Alcantara
do you think this approach will be good, I am affraid of wasting time on
a
Post by Gabriel Alcantara
dead end.
This is definitely a viable approach. You can have a look at the MLS
visualization in envire, its doing a similar thing (drawing boxes).
Your other idea using points is also feasible. There is also the
possibility to change the size of the points depending on their z-distance.
I seem to remember this uses features which may not be supported by all
opengl drivers. Have a look at the pointcloud visualization in envire, I
think this feature is used there.
Cheers,
Jakob
--
Mit freundlichen Gr??en,
Gabriel Alcantara Costa Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140717/50f8f16e/attachment-0001.htm
Loading...