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')
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Mapping 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!