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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)