base::SO3StateSampler Class Reference

State space sampler for SO(3), using quaternion representation. More...

#include <ompl/base/spaces/SO3StateSpace.h>

Inheritance diagram for base::SO3StateSampler:

List of all members.

Public Member Functions

 SO3StateSampler (const StateSpace *space)
 Constructor.
virtual void sampleUniform (State *state)
 Sample a state.
virtual void sampleUniformNear (State *state, const State *near, const double distance)
 To sample unit quaternions uniformly within some given distance, we sample a 3-vector from the R^3 tangent space. This vector is drawn uniformly random from a 3D ball centered at the origin with radius distance. The vector is then "wrapped" around S^3 to obtain a unit quaternion uniformly distributed around the identity quaternion within given distance. We pre-multiply this quaternion with the quaternion near to center the distribution around near.
virtual void sampleGaussian (State *state, const State *mean, const double stdDev)
 Sample a state such that the expected distance between mean and state is stdDev.

Detailed Description

State space sampler for SO(3), using quaternion representation.

Definition at line 48 of file SO3StateSpace.h.


Member Function Documentation

void base::SO3StateSampler::sampleGaussian ( State state,
const State mean,
const double  stdDev 
) [virtual]

Sample a state such that the expected distance between mean and state is stdDev.

To sample a unit quaternion from a Gaussian distribution, we sample a 3-vector from the R^3 tangent space using a 3D Gaussian with zero mean and covariance matrix equal to diag(stdDev^2, stdDev^2, stdDev^2). This vector is "wrapped" around S^3 to obtain a Gaussian quaternion with zero mean. We pre-multiply this quaternion with the quaternion mean to get the desired mean.

Implements base::StateSampler.

Definition at line 128 of file SO3StateSpace.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines