-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #820 from robotology/devel
Merge devel in master and release 3.0.0
- Loading branch information
Showing
197 changed files
with
7,860 additions
and
4,394 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
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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
function frame = plotFrame(transform, axisDimension, lineWidth) | ||
|
||
%% plotFrame | ||
% plotFrame adds a 3D frame in the current figure | ||
% Inputs: | ||
% - transform: The transform of the frame (4x4 matrix) | ||
% - axisDimension: The dimension of the axes | ||
% - lineWidth: The linewidth of the axes | ||
% Outputs: | ||
% - A struct that can be used with updateFrame to update the | ||
% visualization | ||
% | ||
% Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved. | ||
% This software may be modified and distributed under the terms of the | ||
% GNU Lesser General Public License v2.1 or any later version. | ||
|
||
hold on | ||
parent=gca; | ||
|
||
frame = struct(); | ||
|
||
R = transform(1:3, 1:3); | ||
|
||
or = transform(1:3, 4); | ||
|
||
p = [or, or, or] + axisDimension * R; | ||
|
||
frame.axisDimension = axisDimension; | ||
frame.lineWidth = lineWidth; | ||
|
||
frame.x = plot3(parent, [or(1) p(1,1)], [or(2) p(2,1)], [or(3) p(3,1)], 'r', 'linewidth', lineWidth); | ||
frame.y = plot3(parent, [or(1) p(1,2)], [or(2) p(2,2)], [or(3) p(3,2)], 'g', 'linewidth', lineWidth); | ||
frame.z = plot3(parent, [or(1) p(1,3)], [or(2) p(2,3)], [or(3) p(3,3)], 'b', 'linewidth', lineWidth); | ||
|
||
p_text = [or, or, or] + axisDimension * 1.25 * R; | ||
|
||
frame.labels = struct(); | ||
|
||
frame.labels.x = text(parent, p_text(1,1), p_text(2,1), p_text(3,1), 'x', 'color', 'r'); | ||
frame.labels.y = text(parent, p_text(1,2), p_text(2,2), p_text(3,2), 'y', 'color', 'g'); | ||
frame.labels.z = text(parent, p_text(1,3), p_text(2,3), p_text(3,3), 'z', 'color', 'b'); | ||
|
||
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function updateFrame(frame, newTransform) | ||
|
||
%% updateFrame | ||
% updateFrame updates a 3D frame added with the plotFrame function | ||
% Inputs: | ||
% - frame: The struct output by plotFrame | ||
% - newTransform : The new 3D transformation (4x4 matrix) | ||
% | ||
% Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved. | ||
% This software may be modified and distributed under the terms of the | ||
% GNU Lesser General Public License v2.1 or any later version. | ||
|
||
R = newTransform(1:3, 1:3); | ||
|
||
or = newTransform(1:3, 4); | ||
|
||
p = [or, or, or] + frame.axisDimension * R; | ||
|
||
set(frame.x, 'XData', [or(1) p(1,1)], 'YData', [or(2) p(2,1)], 'ZData', [or(3) p(3,1)]); | ||
set(frame.y, 'XData', [or(1) p(1,2)], 'YData', [or(2) p(2,2)], 'ZData', [or(3) p(3,2)]); | ||
set(frame.z, 'XData', [or(1) p(1,3)], 'YData', [or(2) p(2,3)], 'ZData', [or(3) p(3,3)]); | ||
|
||
p_text = [or, or, or] + frame.axisDimension * 1.25 * R; | ||
|
||
set(frame.labels.x, 'Position', p_text(1:3,1)); | ||
set(frame.labels.y, 'Position', p_text(1:3,2)); | ||
set(frame.labels.z, 'Position', p_text(1:3,3)); | ||
|
||
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
2 changes: 1 addition & 1 deletion
2
bindings/matlab/autogenerated/+iDynTree/ArticulatedBodyAlgorithm.m
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,3 +1,3 @@ | ||
function varargout = ArticulatedBodyAlgorithm(varargin) | ||
[varargout{1:nargout}] = iDynTreeMEX(1233, varargin{:}); | ||
[varargout{1:nargout}] = iDynTreeMEX(1235, varargin{:}); | ||
end |
Oops, something went wrong.