enforceStateBounds
Reduce state to state bounds
Description
reduces the specified states boundedStates = enforceStateBounds(space,states)states to the state bounds in the
StateBounds property of the specified state space object
space.
Examples
Create an SE(3) state space object.
space = stateSpaceSE3([-1 1; ... -2 2; ... -10 10; ... -inf inf; ... -inf inf; ... -inf inf; ... -inf inf])
space =
stateSpaceSE3 with properties:
Name: 'SE3'
StateBounds: [7×2 double]
NumStateVariables: 7
WeightXYZ: 1
WeightQuaternion: 0.1000
Create a pair of states in 3-D space.
state1 = [2 10 3 2 0 0 0.8]; state2 = [223 100 3 2 2 12 5];
Enforce state bounds for a single state.
boundedState = enforceStateBounds(space,state1)
boundedState = 1×7
1.0000 2.0000 3.0000 2.0000 0 0 0.8000
Enforce state bounds for multiple states.
boundedStates = enforceStateBounds(space,[state1; state2])
boundedStates = 2×7
1.0000 2.0000 3.0000 2.0000 0 0 0.8000
1.0000 2.0000 3.0000 2.0000 2.0000 12.0000 5.0000
Input Arguments
State space object, specified as a stateSpaceSE2,
stateSpaceSE3,
stateSpaceDubins, or stateSpaceReedsShepp object.
Unbounded states, specified as an n-by-3 or n-by-7 matrix of real values.
For the 2-D state space objects stateSpaceSE2,
stateSpaceDubins, and stateSpaceReedsShepp, each row is of form [x y theta],
which defines the xy-position and orientation angle
theta of a state in the state space.
For the 3-D state space object stateSpaceSE3,
each row is of form [x y z qw qx qy qz], which defines the
xyz-position and quaternion orientation [qw qx qy
qz] of a state in the state space.
Data Types: single | double
Output Arguments
Bounded states, returned as an n-by-3 or
n-by-7 matrix of real values. The value of n is
same as for states input argument.
The function truncates each of the specified unbounded states to the bounds
specified in the StateBounds property of the state space object
space.
For the 2-D state space objects stateSpaceSE2,
stateSpaceDubins, and stateSpaceReedsShepp, each row is of form [x y theta],
which defines the xy-position and orientation angle
theta of the bounded states.
For the 3-D state space object stateSpaceSE3,
each row is of form [x y z qw qx qy qz], which defines the
xyz-position and quaternion orientation [qw qx qy
qz] of the bounded states.
Data Types: single | double
Version History
Introduced in R2019b
See Also
stateSpaceSE2 | stateSpaceSE3 | stateSpaceDubins | stateSpaceReedsShepp
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)