Visual Servoing Platform  version 3.6.1 under development (2024-09-10)
vpMarkersMeasurements Class Reference

Public Member Functions

 vpMarkersMeasurements (const vpCameraParameters &cam, const vpHomogeneousMatrix &cMw, const vpRotationMatrix &wRo, const std::vector< vpColVector > &markers, const double &sigmaDistance, const double &noise_stdev, const long &seed)
 
double likelihoodParticle (const vpColVector &x, const vpColVector &meas)
 
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)
 
vpColVector state_to_measurement (const vpColVector &x)
 
vpColVector measureGT (const vpColVector &wX)
 
vpColVector measureWithNoise (const vpColVector &wX)
 

Detailed Description

[Object_simulator]

[Markers_class]

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

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

Definition at line 150 of file pf-nonlinear-example.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 &  sigmaDistance,
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]sigmaDistanceStandard deviation of the Gaussian function used for the computation of the likelihood. An error greater than 3 times this standard deviation will lead to a likelihood equal to 0.
[in]noise_stdevThe standard deviation for the noise generator
[in]seedThe seed for the noise generator

Definition at line 165 of file pf-nonlinear-example.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 
)
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

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

Member Function Documentation

◆ likelihoodParticle()

double vpMarkersMeasurements::likelihoodParticle ( const vpColVector x,
const vpColVector meas 
)
inline

[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
pf-nonlinear-example.cpp.

Definition at line 192 of file pf-nonlinear-example.cpp.

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

◆ measureGT() [1/2]

vpColVector vpMarkersMeasurements::measureGT ( const vpColVector wX)
inline

[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 248 of file pf-nonlinear-example.cpp.

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

◆ 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 184 of file tutorial-ukf.cpp.

References vpHomogeneousMatrix::build(), 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.

Definition at line 274 of file pf-nonlinear-example.cpp.

References 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 210 of file tutorial-ukf.cpp.

References vpArray2D< Type >::size().

◆ state_to_measurement() [1/2]

vpColVector vpMarkersMeasurements::state_to_measurement ( const vpColVector x)
inline

[Likelihood_function]

Convert the state of the PF into the measurement space.

Parameters
[in]xThe state of the PF.
Returns
vpColVector The state expressed in the measurement space.
Examples
tutorial-ukf.cpp.

Definition at line 223 of file pf-nonlinear-example.cpp.

References vpHomogeneousMatrix::build(), 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 158 of file tutorial-ukf.cpp.

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