From 6414c7806500b33ed95ce0ed0ecd363068394d21 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sat, 5 Nov 2011 21:17:32 +0000 Subject: [PATCH] Renamed function arguments to be more clear --- gtsam.h | 22 +++++++++++----------- gtsam/slam/planarSLAM.h | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gtsam.h b/gtsam.h index 566d18803..3ff7d77e6 100644 --- a/gtsam.h +++ b/gtsam.h @@ -157,18 +157,18 @@ class PlanarSLAMGraph { void print(string s) const; - double error(const PlanarSLAMValues& c) const; - Ordering* orderingCOLAMD(const PlanarSLAMValues& config) const; - GaussianFactorGraph* linearize(const PlanarSLAMValues& config, + double error(const PlanarSLAMValues& values) const; + Ordering* orderingCOLAMD(const PlanarSLAMValues& values) const; + GaussianFactorGraph* linearize(const PlanarSLAMValues& values, const Ordering& ordering) const; - void addPrior(int i, const Pose2& p, const SharedNoiseModel& model); - void addPoseConstraint(int i, const Pose2& p); - void addOdometry(int i, int j, const Pose2& z, const SharedNoiseModel& model); - void addBearing(int i, int j, const Rot2& z, const SharedNoiseModel& model); - void addRange(int i, int j, double z, const SharedNoiseModel& model); - void addBearingRange(int i, int j, const Rot2& z1, double z2, - const SharedNoiseModel& model); + void addPrior(int key, const Pose2& pose, const SharedNoiseModel& noiseModel); + void addPoseConstraint(int key, const Pose2& pose); + void addOdometry(int key1, int key2, const Pose2& odometry, const SharedNoiseModel& noiseModel); + void addBearing(int poseKey, int pointKey, const Rot2& bearing, const SharedNoiseModel& noiseModel); + void addRange(int poseKey, int pointKey, double range, const SharedNoiseModel& noiseModel); + void addBearingRange(int poseKey, int pointKey, const Rot2& bearing, double range, + const SharedNoiseModel& noiseModel); PlanarSLAMValues* optimize_(const PlanarSLAMValues& initialEstimate); }; @@ -176,5 +176,5 @@ class PlanarSLAMOdometry { PlanarSLAMOdometry(int key1, int key2, const Pose2& measured, const SharedNoiseModel& model); void print(string s) const; - GaussianFactor* linearize(const PlanarSLAMValues& c, const Ordering& ordering) const; + GaussianFactor* linearize(const PlanarSLAMValues& center, const Ordering& ordering) const; }; diff --git a/gtsam/slam/planarSLAM.h b/gtsam/slam/planarSLAM.h index 86773b661..8b260b1fa 100644 --- a/gtsam/slam/planarSLAM.h +++ b/gtsam/slam/planarSLAM.h @@ -109,27 +109,27 @@ namespace gtsam { /// Creates a NonlinearFactorGraph based on another NonlinearFactorGraph Graph(const NonlinearFactorGraph& graph); - /// Biases the value of PoseKey i with Pose2 p given a noise model - void addPrior(const PoseKey& i, const Pose2& p, const SharedNoiseModel& model); + /// Biases the value of PoseKey key with Pose2 p given a noise model + void addPrior(const PoseKey& key, const Pose2& pose, const SharedNoiseModel& noiseModel); - /// Creates a hard constraint to enforce Pose2 p for PoseKey i's value - void addPoseConstraint(const PoseKey& i, const Pose2& p); + /// Creates a hard constraint to enforce Pose2 p for PoseKey poseKey's value + void addPoseConstraint(const PoseKey& poseKey, const Pose2& pose); - /// Creates a factor with a Pose2 between PoseKeys i and j (i.e. an odometry measurement) - void addOdometry(const PoseKey& i, const PoseKey& j, const Pose2& z, + /// Creates a factor with a Pose2 between PoseKeys poseKey and pointKey (poseKey.e. an odometry measurement) + void addOdometry(const PoseKey& poseKey, const PoseKey& pointKey, const Pose2& odometry, const SharedNoiseModel& model); - /// Creates a factor with a Rot2 between a PoseKey i and PointKey j for difference in rotation - void addBearing(const PoseKey& i, const PointKey& j, const Rot2& z, + /// Creates a factor with a Rot2 between a PoseKey poseKey and PointKey pointKey for difference in rotation + void addBearing(const PoseKey& poseKey, const PointKey& pointKey, const Rot2& bearing, const SharedNoiseModel& model); - /// Creates a factor with a Rot2 between a PoseKey i and PointKey j for difference in location - void addRange(const PoseKey& i, const PointKey& j, double z, + /// Creates a factor with a Rot2 between a PoseKey poseKey and PointKey pointKey for difference in location + void addRange(const PoseKey& poseKey, const PointKey& pointKey, double range, const SharedNoiseModel& model); - /// Creates a factor with a Rot2 between a PoseKey i and PointKey j for difference in rotation and location - void addBearingRange(const PoseKey& i, const PointKey& j, - const Rot2& z1, double z2, const SharedNoiseModel& model); + /// Creates a factor with a Rot2 between a PoseKey poseKey and PointKey pointKey for difference in rotation and location + void addBearingRange(const PoseKey& poseKey, const PointKey& pointKey, + const Rot2& bearing, double range, const SharedNoiseModel& model); /// Optimize_ for MATLAB boost::shared_ptr optimize_(const Values& initialEstimate) {