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

1 visualizzazione (ultimi 30 giorni)
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')

Risposta accettata

Steven Lord
Steven Lord il 1 Giu 2022
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.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by