How to modify plotted SE(3) transformations for animation purposes
Show older comments
I want to iteratively modify plotted SE(3) transformations generated by the built-in function plotTransforms() for a sequence of transformations, without closing and re-plotting an existing figure.
I know for objects returned by plot() or plot3(), point positions can be modified using the set() function, such as
set(obj, 'XData', x_data, 'YData', y_data)
however, I cannot find a straightforward way to set plotted transformations returned by plotTransforms() and have them reflected on the current figure.
Is the function plotTransforms() the correct function to use for my application? If not, is there an alternative of displaying SE(3) elements that allows me to iteratively set their properties (position, orientation, etc.)?
Answers (2)
Ashutosh Thakur
on 14 Dec 2023
0 votes
Hi Yanzhou,
I understand that you want to modify the plotted transformation without closing and re-plotting an existing figure.
Their are two possible suggestions which can be used to achieve the above objective:
- You can try to link the workspace variables with plot such that if the workspace variables are modified then the subsequent plot linked to it also gets modified.
- Instead of using the data linking feature, you can keep the plot synchronized with the workspace variables by setting the data source properties of the plotted object.
Please take reference from the following documentation link regarding the data linking and data source ways to update the plot dynamically:
- https://www.mathworks.com/help/matlab/creating_plots/making-graphs-responsive-with-data-linking.html
- https://www.mathworks.com/help/matlab/ref/matlab.graphics.internal.linkdata.html
- https://www.mathworks.com/help/matlab/ref/refreshdata.html
I hope this helps you in resolving the issue.
Yanzhou Wang
on 23 Jan 2024
Categories
Find more on Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!