why i cant use "occupancyMap", it looks like a dont recognize it as a function.

조회 수: 2 (최근 30일)
clc
clear all
close all
map = robotics.BinaryOccupancyGrid(20,20);
setOccupancy(map,[8 8],0.2);
setOccupancy(map,[8 9],0.2);
setOccupancy(map,[8 7],0.2);
setOccupancy(map,[7 8],0.2);
setOccupancy(map,[6 8],0.2);
figure
show(map)
title('Warehouse Floor Plan')
% Create map that will be updated with sensor readings
estMap = occupancyMap(occupancyMatrix(map));
% Create a map that will inflate the estimate for planning
inflateMap = occupancyMap(estMap);
vMap = validatorOccupancyMap;
vMap.Map = inflateMap;
vMap.ValidationDistance = .1;
planner = plannerHybridAStar(vMap, 'MinTurningRadius', 4);
entrance = [1 40 0];
packagePickupLocation = [63 44 -pi/2];
route = plan(planner, entrance, packagePickupLocation);
route = route.States;
% Get poses from the route.
rsConn = reedsSheppConnection('MinTurningRadius', planner.MinTurningRadius);
startPoses = route(1:end-1,:);
endPoses = route(2:end,:);
rsPathSegs = connect(rsConn, startPoses, endPoses);
poses = [];
for i = 1:numel(rsPathSegs)
lengths = 0:0.1:rsPathSegs{i}.Length;
[pose, ~] = interpolate(rsPathSegs{i}, lengths);
poses = [poses; pose];
end
figure
show(planner)
title('Initial Route to Package')

채택된 답변

Steven Lord
Steven Lord 2022년 6월 1일
The occupancyMap function was introduced in Navigation Toolbox in release R2019b. It's not clear whether you have this product licensed and installed from the Products and Releases information on this post, but even if you do the release you're using predates the introduction of this function. You will need to upgrade to release R2019b or later and have Navigation Toolbox installed and licensed to use it.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mapping에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by