How Can I Plot SerialLink in 3D graph in App Designer

8 visualizaciones (últimos 30 días)
Ke Wei Ong
Ke Wei Ong el 16 de Ag. de 2020
Editada: Ke Wei Ong el 22 de Ag. de 2020
Hi,
I would like to know how can I plot SerialLink arm in 3D grap in App Designer?
Here is my code:
app.L = Link();
app.L(1) = Link([0 0.127300 0.000000 pi/2]);
app.L(2) = Link([0 0.000000 -0.61200 0]);
app.L(3) = Link([0 0.000000 -0.57230 0]);
app.L(4) = Link([0 0.163941 0.000000 pi/2]);
app.L(5) = Link([0 0.115700 0.000000 -(pi/2)]);
app.L(6) = Link([0 0.092200 0.000000 0.000000]);
app.Rob = SerialLink(app.L);
app.Rob.name = 'UR10';
app.Rob.plot( [app.j]);
and i have my value app.j as well. Just that if i used app.Rob.plot( [app.j]); it would be a pop up graph, however i would like it to stick on my main interface, where i located a axes graph for it.
I tried app.Rob.plot(app.j,app.UIAxes2);
Here is the error message, please help:-
Error using matlab.ui.control.UIAxes/horzcat
Conversion to matlab.ui.control.UIAxes from char is not possible.
Error in RTBPlot.plot_options (line 719)
error(['unknown option: ' args{1}]);
Error in SerialLink/plot (line 213)
opt = RTBPlot.plot_options(robot, varargin);

Respuestas (1)

Prabhanjan Mentla
Prabhanjan Mentla el 19 de Ag. de 2020
Hi,
To plot in the app designer, you can use plot function for a 2d plot and mesh and surf function for 3D plot.
For more information about these functions, visit the below links:
Hope this helps.
  1 comentario
Ke Wei Ong
Ke Wei Ong el 22 de Ag. de 2020
Hi Prabhanjan,
Thanks for your reply. Sorry not making myself clear.
Here is my code:
app.L = Link();
app.L(1) = Link([0 0.127300 0.000000 pi/2]);
app.L(2) = Link([0 0.000000 -0.61200 0]);
app.L(3) = Link([0 0.000000 -0.57230 0]);
app.L(4) = Link([0 0.163941 0.000000 pi/2]);
app.L(5) = Link([0 0.115700 0.000000 -(pi/2)]);
app.L(6) = Link([0 0.092200 0.000000 0.000000]);
app.Rob = SerialLink(app.L);
app.Rob.name = 'UR10';
app.Rob.plot( [app.j]);
and i have my value app.j as well. Just that if i used app.Rob.plot( [app.j]); it would be a pop up graph, however i would like it to stick on my main interface, where i located a axes graph for it.
I tried app.Rob.plot([app.j], app.UIAxes2); or app.Rob.plot("Parent",app.j)
but they don't work.
(I will edit it in question)
Thanks.

Iniciar sesión para comentar.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by