classdef stateSpaceDubins3D < nav.StateSpace & stateSpaceSE3
function obj = stateSpaceDubins3D(varargin)
obj@stateSpaceSE3(varargin{:});
function dist = distance(obj, state1, state2)
if ~obj.SkipStateValidation
if size(state1, 1) == 1 || size(state2, 1) == 1
nav.internal.validation.validateStateMatrix(state1, nan, 7, 'distance', 'state1');
nav.internal.validation.validateStateMatrix(state2, nan, 7, 'distance', 'state2');
nav.internal.validation.validateStateMatrix(state1, nan, 7, 'distance', 'state1');
nav.internal.validation.validateStateMatrix(state2, size(state1,1), 7, 'distance', 'state2');
distRow = matlabshared.planning.internal.DubinsBuiltins.autonomousDubinsSegments(...
double(state1), double(state2), obj.MinTurningRadius, 'optimal', {});
function interpState = interpolate(obj, state1, state2, ratios)
if ~obj.SkipStateValidation
[state1, state2, ratios] = obj.validateInterpolateInput(state1, state2, ratios);
[pathLength,segmentLengths,segmentTypes] = matlabshared.planning.internal.DubinsBuiltins.autonomousDubinsSegments(...
state1, state2, obj.MinTurningRadius, 'optimal', {});
interpState = matlabshared.planning.internal.DubinsBuiltins.autonomousDubinsInterpolateSegments(...
state1, state2, double(ratios) * pathLength(1), obj.MinTurningRadius, ...
segmentLengths(:)', uint32(segmentTypes(:)'));
function copyObj = copy(obj)
copyObj = stateSpaceDubins3D(obj.StateBounds);
obj.copyProperties(copyObj);
function set.MinTurningRadius(obj, radius)
validateattributes(radius, {'double'}, ...
{'nonempty', 'scalar', 'real', 'nonnan', 'finite', 'positive'}, 'stateSpaceDubins', 'MinTurningRadius');
obj.MinTurningRadius = double(radius);
methods (Access = protected)
function propgrp = getPropertyGroups(obj)
"StateBounds", obj.StateBounds,...
"NumStateVariables", obj.NumStateVariables);
propgrpSE3 = matlab.mixin.util.PropertyGroup(propListS3, ...
message("nav:navalgs:statespacese3:SE3Properties").getString);
propListDubins = struct("MinTurningRadius", obj.MinTurningRadius);
propgrpDubins = matlab.mixin.util.PropertyGroup(propListDubins, ...
message("nav:navalgs:statespacedubins:DubinsProperties").getString);
propgrp = [propgrpSE3, propgrpDubins];
function copyProperties(obj, copyObj)
copyProperties@stateSpaceSE2(copyObj);
copyObj.MinTurningRadius = obj.MinTurningRadius;