why i cant use "occupancyMap", it looks like a dont recognize it as a function.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Erick Guzman
le 1 Juin 2022
Commenté : Erick Guzman
le 3 Juin 2022
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')
0 commentaires
Réponse acceptée
Steven Lord
le 1 Juin 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!