Wrapped some more Pose2/PlanarSLAM functions with Richard for ASPN/CircleDemo.m
parent
cd9d3a0796
commit
080496db1d
2
gtsam.h
2
gtsam.h
|
|
@ -38,6 +38,7 @@ class Pose2 {
|
|||
double y() const;
|
||||
double theta() const;
|
||||
size_t dim() const;
|
||||
Pose2* between_(const Pose2& p2);
|
||||
};
|
||||
|
||||
class SharedGaussian {
|
||||
|
|
@ -129,6 +130,7 @@ class Ordering{
|
|||
class PlanarSLAMValues {
|
||||
PlanarSLAMValues();
|
||||
void print(string s) const;
|
||||
Pose2* pose(int key);
|
||||
void insertPose(int key, const Pose2& pose);
|
||||
void insertPoint(int key, const Point2& point);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -136,6 +136,11 @@ namespace gtsam {
|
|||
boost::optional<Matrix&> H1=boost::none,
|
||||
boost::optional<Matrix&> H2=boost::none) const;
|
||||
|
||||
/// MATLAB version returns shared pointer
|
||||
boost::shared_ptr<Pose2> between_(const Pose2& p2) {
|
||||
return boost::shared_ptr<Pose2>(new Pose2(between(p2)));
|
||||
}
|
||||
|
||||
/** return transformation matrix */
|
||||
Matrix matrix() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ namespace gtsam {
|
|||
|
||||
// Convenience for MATLAB wrapper, which does not allow for identically named methods
|
||||
|
||||
/// get a pose
|
||||
boost::shared_ptr<Pose2> pose(int key) {
|
||||
Pose2 pose = (*this)[PoseKey(key)];
|
||||
return boost::shared_ptr<Pose2>(new Pose2(pose));
|
||||
}
|
||||
|
||||
/// insert a pose
|
||||
void insertPose(int key, const Pose2& pose) {insert(PoseKey(key), pose); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue