Hello there
I have to generate point clouds which represents a room or a floor, as example. Also it should be able to add an error to the generator of the point cloud to make it more real (like a noise).
With a small section of the map it should than be possible to find out the location of this small section. Like SLAM without the mapping. Just localisation.
Maybe someone has a solution or some ideas to solve this.
Kind regard
Ramon

댓글 수: 6

darova
darova 2019년 9월 25일
How does the cloud look like?
Ramon
Ramon 2019년 9월 26일
multi_measure_obstacle.png
single_measure.png
something like that....in the first picture there are multiple measurments overlapped and in the second picture is one measurment.
I think it's possible to make it somehow with linspace and additional errors .
the restriction later is, that the maze just have angles of 90°... maybe this makes it easier.
darova
darova 2019년 9월 26일
You have black line and want red points? Is it correct?
111Untitled.png
Ramon
Ramon 2019년 9월 27일
편집: Ramon 2019년 9월 27일
yes, but it has to be something like a normal distribution...like 68% are on the line and the others are offset to the black line....something like that
darova
darova 2019년 9월 27일
Any ideas how to implement it?
Ramon
Ramon 2019년 9월 28일
편집: Ramon 2019년 9월 29일
Yes, i made some functions to make lines with errors.
%% Functions
% Function for generating a line out of points with an additional random
% error for one axis
function[v_ret] = calc_v(start,fin,N,error)
dv = (fin-start)/N;
v = linspace(start,fin,N);
if dv == 0
dv = 1;
end
v_ret = v-(-error + (error+error)*rand(1,N))*dv;
end
% Function to concatenate two arrays. Returns concatenated array.
function[arr_x,arr_y] = concator(array_x,extension_x,array_y,extension_y)
arr_x = [array_x extension_x];
arr_y = [array_y extension_y];
end
% Function to add a cos-error
function[arrayWithError] = addCosError(arr,step,err_amp,err_step)
format = size(arr(1:step:end));
len = format(2);
i = linspace(1,err_step,len);
arr(1:step:end) = arr(1:step:end) + err_amp*cos(pi.*i);
arrayWithError = arr;
end
% Function for generate a point line for mapping
function [arr_x,arr_y] = setLine(x_start,x_fin,y_start,y_fin,rand_error,step_to_add_error,err_amp,err_period)
if (x_fin - x_start) > (y_fin - y_start)
N = x_fin - x_start;
else
N = y_fin - y_start;
end
arr_x = addCosError(calc_v(x_start,x_fin,N,rand_error),step_to_add_error,err_amp,err_period);
arr_y = addCosError(calc_v(y_start,y_fin,N,rand_error),step_to_add_error,err_amp,err_period);
end
The result is like this:
An example map without errors.
And the example map with errors.

댓글을 달려면 로그인하십시오.

 채택된 답변

Ramon
Ramon 2019년 9월 28일

1 개 추천

댓글 수: 1

darova
darova 2019년 9월 28일
The best solution is the solution made by yourself :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2019년 9월 25일

편집:

2019년 9월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by