Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpMarkersMeasurements Class Reference

Public Member Functions

 vpMarkersMeasurements (const vpCameraParameters &cam, const vpHomogeneousMatrix &cMw, const vpRotationMatrix &wRo, const std::vector< vpColVector > &markers, const double &noise_stdev, const long &seed)
vpColVector state_to_measurement (const vpColVector &x)
vpColVector measureGT (const vpColVector &wX)
vpColVector measureWithNoise (const vpColVector &wX)
 vpMarkersMeasurements (const vpCameraParameters &cam, const vpHomogeneousMatrix &cMw, const vpRotationMatrix &wRo, const std::vector< vpColVector > &markers, const double &noise_stdev, const long &seed, const double &likelihood_stdev)
vpColVector state_to_measurement (const vpColVector &x)
vpColVector measureGT (const vpColVector &wX)
vpColVector measureWithNoise (const vpColVector &wX)
double likelihood (const vpColVector &x, const vpColVector &meas)

Detailed Description

[Object_simulator]

[Markers_class]

Class that permits to convert the 3D position of the object into measurements.

Examples
tutorial-pf.cpp, and tutorial-ukf.cpp.

Definition at line 125 of file tutorial-ukf.cpp.

Constructor & Destructor Documentation

◆ vpMarkersMeasurements() [1/2]

vpMarkersMeasurements::vpMarkersMeasurements ( const vpCameraParameters & cam,
const vpHomogeneousMatrix & cMw,
const vpRotationMatrix & wRo,
const std::vector< vpColVector > & markers,
const double & noise_stdev,
const long & seed )
inline

Construct a new vpMarkersMeasurements object.

Parameters
[in]camThe camera parameters.
[in]cMwThe pose of the world frame with regard to the camera frame.
[in]wRoThe rotation matrix expressing the rotation between the world frame and object frame.
[in]markersThe position of the markers in the object frame.
[in]noise_stdevThe standard deviation for the noise generator
[in]seedThe seed for the noise generator
Examples
tutorial-pf.cpp, and tutorial-ukf.cpp.

Definition at line 138 of file tutorial-ukf.cpp.

◆ vpMarkersMeasurements() [2/2]

vpMarkersMeasurements::vpMarkersMeasurements ( const vpCameraParameters & cam,
const vpHomogeneousMatrix & cMw,
const vpRotationMatrix & wRo,
const std::vector< vpColVector > & markers,
const double & noise_stdev,
const long & seed,
const double & likelihood_stdev )
inline

Construct a new vpMarkersMeasurements object.

Parameters
[in]camThe camera parameters.
[in]cMwThe pose of the world frame with regard to the camera frame.
[in]wRoThe rotation matrix expressing the rotation between the world frame and object frame.
[in]markersThe position of the markers in the object frame.
[in]noise_stdevThe standard deviation for the noise generator
[in]seedThe seed for the noise generator
[in]likelihood_stdevThe standard deviation for the likelihood computation. A particle that is
  1. * likelihood_stdev further than the measurements will have a weight of 0.

Definition at line 208 of file tutorial-pf.cpp.

Member Function Documentation

◆ likelihood()

double vpMarkersMeasurements::likelihood ( const vpColVector & x,
const vpColVector & meas )
inline

[Noisy_measurements]

[Likelihood_function]

Compute the likelihood of a particle compared to the measurements. The likelihood equals zero if the particle is completely different of the measurements and equals one if it matches completely. The chosen likelihood is a Gaussian function that penalizes the mean distance between the projection of the markers corresponding to the particle position and the measurements of the markers in the image.

Parameters
[in]xThe particle.
[in]measThe measurement vector. meas[2i] = u_i meas[2i + 1] = v_i .
Returns
double The likelihood of the particle.
Examples
tutorial-pf.cpp.

Definition at line 312 of file tutorial-pf.cpp.

References vpHomogeneousMatrix::buildFrom(), vpMeterPixelConversion::convertPoint(), likelihood(), and vpImagePoint::sqrDistance().

Referenced by likelihood().

◆ measureGT() [1/2]

vpColVector vpMarkersMeasurements::measureGT ( const vpColVector & wX)
inline

[Measurement_function]

[GT_measurements]

Perfect measurement of the projection of the markers in the image when the object is located at wX.

Parameters
[in]wXThe actual position of the robot (wX[0]: x, wX[1]: y, wX[2] = z).
Returns
vpColVector [2*i] u_i [2*i + 1] v_i where i is the index of the marker.
Examples
tutorial-pf.cpp, and tutorial-ukf.cpp.

Definition at line 180 of file tutorial-ukf.cpp.

References vpHomogeneousMatrix::buildFrom(), and vpMeterPixelConversion::convertPoint().

Referenced by measureWithNoise().

◆ measureGT() [2/2]

vpColVector vpMarkersMeasurements::measureGT ( const vpColVector & wX)
inline

[Measurement_function]

[GT_measurements]

Perfect measurement of the projection of the markers in the image when the object is located at wX.

Parameters
[in]wXThe actual position of the robot (wX[0]: x, wX[1]: y, wX[2] = z).
Returns
vpColVector [2*i] u_i [2*i + 1] v_i where i is the index of the marker.

Definition at line 261 of file tutorial-pf.cpp.

References vpHomogeneousMatrix::buildFrom(), and vpMeterPixelConversion::convertPoint().

◆ measureWithNoise() [1/2]

vpColVector vpMarkersMeasurements::measureWithNoise ( const vpColVector & wX)
inline

[GT_measurements]

[Noisy_measurements]

Noisy measurement of the projection of the markers in the image when the object is located at wX.

Parameters
[in]wXThe actual position of the robot (wX[0]: x, wX[1]: y, wX[2] = z).
Returns
vpColVector [2*i] u_i [2*i + 1] v_i where i is the index of the marker.
Examples
tutorial-pf.cpp, and tutorial-ukf.cpp.

Definition at line 206 of file tutorial-ukf.cpp.

References measureGT(), and vpArray2D< Type >::size().

◆ measureWithNoise() [2/2]

vpColVector vpMarkersMeasurements::measureWithNoise ( const vpColVector & wX)
inline

[GT_measurements]

[Noisy_measurements]

Noisy measurement of the projection of the markers in the image when the object is located at wX.

Parameters
[in]wXThe actual position of the robot (wX[0]: x, wX[1]: y, wX[2] = z).
Returns
vpColVector [2*i] u_i [2*i + 1] v_i where i is the index of the marker.

Definition at line 287 of file tutorial-pf.cpp.

References measureGT(), and vpArray2D< Type >::size().

◆ state_to_measurement() [1/2]

vpColVector vpMarkersMeasurements::state_to_measurement ( const vpColVector & x)
inline

[Measurement_function]

Convert the prior of the UKF into the measurement space.

Parameters
[in]xThe prior.
Returns
vpColVector The prior expressed in the measurement space.
Examples
tutorial-pf.cpp, and tutorial-ukf.cpp.

Definition at line 154 of file tutorial-ukf.cpp.

References vpHomogeneousMatrix::buildFrom(), and vpMeterPixelConversion::convertPoint().

◆ state_to_measurement() [2/2]

vpColVector vpMarkersMeasurements::state_to_measurement ( const vpColVector & x)
inline

[Measurement_function]

Convert the prior of the UKF into the measurement space.

Parameters
[in]xThe prior.
Returns
vpColVector The prior expressed in the measurement space.

Definition at line 235 of file tutorial-pf.cpp.

References vpHomogeneousMatrix::buildFrom(), and vpMeterPixelConversion::convertPoint().