|
gtsam
|
Contains generic global functions designed particularly for the matlab interface. More...
Go to the source code of this file.
Namespaces | |
| namespace | gtsam |
| Global functions in a separate testing namespace. | |
Functions | |
| FastList< Key > | gtsam::utilities::createKeyList (const Vector &I) |
| FastList< Key > | gtsam::utilities::createKeyList (std::string s, const Vector &I) |
| KeyVector | gtsam::utilities::createKeyVector (const Vector &I) |
| KeyVector | gtsam::utilities::createKeyVector (std::string s, const Vector &I) |
| KeySet | gtsam::utilities::createKeySet (const Vector &I) |
| KeySet | gtsam::utilities::createKeySet (std::string s, const Vector &I) |
| Matrix | gtsam::utilities::extractPoint2 (const Values &values) |
| Extract all Point2 values into a single matrix [x y]. | |
| Matrix | gtsam::utilities::extractPoint3 (const Values &values) |
| Extract all Point3 values into a single matrix [x y z]. | |
| Values | gtsam::utilities::allPose2s (const Values &values) |
| Extract all Pose3 values. | |
| Matrix | gtsam::utilities::extractPose2 (const Values &values) |
| Extract all Pose2 values into a single matrix [x y theta]. | |
| Values | gtsam::utilities::allPose3s (const Values &values) |
| Extract all Pose3 values. | |
| Matrix | gtsam::utilities::extractPose3 (const Values &values) |
| Extract all Pose3 values into a single matrix [r11 r12 r13 r21 r22 r23 r31 r32 r33 x y z]. | |
| Matrix | gtsam::utilities::extractVectors (const Values &values, char c) |
| Extract all Vector values with a given symbol character into an mxn matrix, where m is the number of symbols that match the character and n is the dimension of the variables. | |
| void | gtsam::utilities::perturbPoint2 (Values &values, double sigma, int32_t seed=42u) |
| Perturbs all 2D point values in a Values container using isotropic Gaussian noise. | |
| void | gtsam::utilities::perturbPose2 (Values &values, double sigmaT, double sigmaR, int32_t seed=42u) |
| Perturbs all 2D pose values (Pose2) in a Values container using diagonal Gaussian noise. | |
| void | gtsam::utilities::perturbPoint3 (Values &values, double sigma, int32_t seed=42u) |
| Perturbs all 3D point values in a Values container using isotropic Gaussian noise. | |
| void | gtsam::utilities::perturbPose3 (Values &values, double sigmaT, double sigmaR, int32_t seed=42u) |
| Perturbs all 3D pose values (Pose3) in a Values container using diagonal Gaussian noise. | |
| void | gtsam::utilities::insertBackprojections (Values &values, const PinholeCamera< Cal3_S2 > &camera, const Vector &J, ConstMatrixView Z, double depth) |
| Insert a number of initial point values by backprojecting. | |
| void | gtsam::utilities::insertProjectionFactors (NonlinearFactorGraph &graph, Key i, const Vector &J, ConstMatrixView Z, const SharedNoiseModel &model, const Cal3_S2::shared_ptr K, const Pose3 &body_P_sensor=Pose3()) |
| Insert multiple projection factors for a single pose key. | |
| Matrix | gtsam::utilities::reprojectionErrors (const NonlinearFactorGraph &graph, const Values &values) |
| Calculate the errors of all projection factors in a graph. | |
| Values | gtsam::utilities::localToWorld (const Values &local, const Pose2 &base, const KeyVector user_keys=KeyVector()) |
| Convert from local to world coordinates. | |
Contains generic global functions designed particularly for the matlab interface.
| Matrix gtsam::utilities::extractVectors | ( | const Values & | values, |
| char | c ) |
Extract all Vector values with a given symbol character into an mxn matrix, where m is the number of symbols that match the character and n is the dimension of the variables.
If not all variables have dimension n, then a runtime error will be thrown. The order of returned values are sorted by the symbol. For example, calling extractVector(values, 'x'), where values contains 200 variables x1, x2, ..., x200 of type Vector each 5-dimensional, will return a 200x5 matrix with row i containing xi.
| void gtsam::utilities::insertBackprojections | ( | Values & | values, |
| const PinholeCamera< Cal3_S2 > & | camera, | ||
| const Vector & | J, | ||
| ConstMatrixView | Z, | ||
| double | depth ) |
Insert a number of initial point values by backprojecting.
| values | The values dict to insert the backprojections to. |
| camera | The camera model. |
| J | Vector of key indices. |
| Z | 2*J matrix of pixel values. |
| depth | Initial depth value. |
| void gtsam::utilities::insertProjectionFactors | ( | NonlinearFactorGraph & | graph, |
| Key | i, | ||
| const Vector & | J, | ||
| ConstMatrixView | Z, | ||
| const SharedNoiseModel & | model, | ||
| const Cal3_S2::shared_ptr | K, | ||
| const Pose3 & | body_P_sensor = Pose3() ) |
Insert multiple projection factors for a single pose key.
| graph | The nonlinear factor graph to add the factors to. |
| i | Camera key. |
| J | Vector of key indices. |
| Z | 2*J matrix of pixel values. |
| model | Factor noise model. |
| K | Calibration matrix. |
| body_P_sensor | Pose of the camera sensor in the body frame. |
| void gtsam::utilities::perturbPoint2 | ( | Values & | values, |
| double | sigma, | ||
| int32_t | seed = 42u ) |
Perturbs all 2D point values in a Values container using isotropic Gaussian noise.
This updates in-place both Point2 entries and any Vector entries of size 2 by adding zero-mean Gaussian noise with the given standard deviation.
| values | Values whose Point2/2D Vector entries will be perturbed. |
| sigma | Standard deviation of the isotropic Gaussian noise applied. |
| seed | Random seed used by the Sampler (default 42u). |
| void gtsam::utilities::perturbPoint3 | ( | Values & | values, |
| double | sigma, | ||
| int32_t | seed = 42u ) |
Perturbs all 3D point values in a Values container using isotropic Gaussian noise.
This updates in-place both Point3 entries and any Vector entries of size 3 by adding zero-mean Gaussian noise with the given standard deviation.
| values | Values whose Point3 and 3D Vector entries will be perturbed. |
| sigma | Standard deviation of the isotropic Gaussian noise applied. |
| seed | Random seed used by the Sampler (default 42u). |
| void gtsam::utilities::perturbPose2 | ( | Values & | values, |
| double | sigmaT, | ||
| double | sigmaR, | ||
| int32_t | seed = 42u ) |
Perturbs all 2D pose values (Pose2) in a Values container using diagonal Gaussian noise.
The translational components (x, y) are perturbed with sigmaT, and the rotational component (theta) is perturbed with sigmaR.
| values | Values container whose Pose2 entries will be perturbed. |
| sigmaT | Standard deviation for translational noise. |
| sigmaR | Standard deviation for rotational noise (applied to theta). |
| seed | Random seed used by the Sampler (default 42u). |
| void gtsam::utilities::perturbPose3 | ( | Values & | values, |
| double | sigmaT, | ||
| double | sigmaR, | ||
| int32_t | seed = 42u ) |
Perturbs all 3D pose values (Pose3) in a Values container using diagonal Gaussian noise.
The noise is applied in the tangent space order [rx, ry, rz, tx, ty, tz], where rotational components are perturbed with sigmaR and translational components with sigmaT.
| values | Values container whose Pose3 entries will be perturbed. |
| sigmaT | Standard deviation for translational noise. |
| sigmaR | Standard deviation for rotational noise. |
| seed | Random seed used by the Sampler (default 42u). |