# How to create an Octomap at different resolutions?

Hi,

I am using a laser_scan to record some data, after which I convert the range data to laser scan and create an Octomap.

I know that Octomap allows to perform queries to work at different levels of resolution. But what this means is that if I want high resolution for some cases I have to set the octomap_server resolution at a very high resolution as well, and thus, in situations were high resolution is not required, I would be wasting resources. Am I understanding it correctly?

What I wanted to do is the following. Depending on the altitude of the recording, I wanted different resolutions. I did the following:

        if (height < 1.5)
{
nh_.setParam("/octomap_server/resolution", 0.01);
}
else if (height < 2.5)
{
nh_.setParam("/octomap_server/resolution", 0.02);
}
else
nh_.setParam("/octomap_server/resolution", 0.15);


Is this correct? Can I change the current map_resolution depending on the height or if I want the resolution to be very high, I need to set it to "very high" from the beggining?