-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chao Qu
committed
May 11, 2014
1 parent
edd9f4d
commit 7b92272
Showing
5 changed files
with
47 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
%%% | ||
%> @file PoseNode.m | ||
%> @brief A class for edge in a pose graph | ||
%%% | ||
classdef PoseEdge < handle | ||
%POSEEDGE A class for edge in a pose graph | ||
|
||
properties (SetAccess = private) | ||
id_from %> This is the viewing frame of this edge | ||
id_to %> This is the pose being observed from the viewing frame | ||
mean %> Predicted virtual measurement | ||
infm %> Information matrix of this edge | ||
end % properties | ||
id_from % This is the viewing frame of this edge | ||
id_to % This is the pose being observed from the viewing frame | ||
mean % Predicted virtual measurement | ||
infm % Information matrix of this edge | ||
end % properties set private | ||
|
||
methods | ||
|
||
function obj = PoseEdge(id_from, id_to, mean, infm) | ||
% Consturctor of PoseEdge | ||
obj.id_from = id_from; | ||
obj.id_to = id_to; | ||
obj.mean = mean(:); | ||
obj.infm = infm; | ||
end | ||
end % methods | ||
|
||
end % methods public | ||
|
||
end % classdef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
%%% | ||
%> @brief computes the pose vector v from an homogeneous transformation A | ||
%> param A homogeneous transformation | ||
%> return v pose vector | ||
%> @author Giorgio Grisetti | ||
%%% | ||
function v = t2v(A) | ||
% T2V homogeneous transformation to vector | ||
v(1:2,1) = A(1:2,3); | ||
v(3,1) = atan2(A(2,1), A(1,1)); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
%%% | ||
%> @brief computes the homogeneous transformation A of the pose vector v | ||
%> @param v pose vector | ||
%> @return A homogeneous transformation | ||
%> @author Giorgio Grisetti | ||
%%% | ||
function A = v2t(v) | ||
% V2T vector to homogeneous transformation | ||
c = cos(v(3)); | ||
s = sin(v(3)); | ||
A = [c, -s, v(1); | ||
s, c, v(2); | ||
0 0 1]; | ||
|
||
end |