Showing robot in app designer UIAxes

I want to draw a robot using the show() function from Robotics System Toolbox in App designer UIAxes.
However, the function does not work if I put app.UIAxes in the first argument nor if I specify Axes as a Name-Value argument:
show(app.UIAxes, robot);
show(robot, 'Parent',app.UIAxes);
I'm getting:
Undefined function 'show' for input arguments of type 'matlab.ui.control.UIAxes'.
or:
The value of 'Parent' is invalid. Functionality not supported with UIAxes.
Is there any other way to get the show() function into app designer?

Réponses (1)

Cris LaPierre
Cris LaPierre le 9 Jan 2022
Modifié(e) : Cris LaPierre le 9 Jan 2022

0 votes

Do you have the Robotics System Toolbox installed? Type ver in the command window to see. If not, and you have access to it, you can install it using the Add-Ons Explorer.
Once that toolbox is added, the correct syntax is option 2: 'Parent'.

6 commentaires

Robert Pastor
Robert Pastor le 10 Jan 2022
Modifié(e) : Robert Pastor le 10 Jan 2022
Yes, I do have Robotics System Toolbox installed. And it works when I use only
show(robot);
However, that opens up a new figure. I want to use the UIAxes in my app. When I run
show(robot, 'Parent',app.UIAxes);
The full error is this:
Error using robotics.manip.internal.RigidBodyTree/parseShowInputs (line 1084)
The value of 'Parent' is invalid. Functionality not supported with UIAxes.
Error in robotics.manip.internal.RigidBodyTree/show (line 1033)
parser = obj.parseShowInputs(varargin{:});
Error in rigidBodyTree/show (line 839)
ax = obj.TreeInternal.show(varargin{:});
Cam Salzberger
Cam Salzberger le 10 Jan 2022
"Functionality not supported with UIAxes."
That seems pretty clear. I don't think there is a way to use it in app designer apps, other than opening up a separate figure window with a regular axes to show it.
Hannes Daepp
Hannes Daepp le 10 Jan 2022
Cam is correct. Currently rigidBodyTree.show() only works with axes, and not uiaxes, but we are aware of this limitation and working to add support in a future release.
Robert Pastor
Robert Pastor le 10 Jan 2022
Thanks, I thought I was doing something wrong. I will use a separate figure for now.
Lluís Ros
Lluís Ros le 5 Oct 2023
Is there any progress on solving this issue? In the latest Matlab version, 2023b, rigidBodyTree.show() is still unable to plot the results on app.UIaxes ...
Hagyong Kihm
Hagyong Kihm le 21 Oct 2025
I also want to use 'interactiveRigidBodyTree' and 'showFigure' in a uiaxes of an app designer in the future release to use interactive marker in an appdesigner.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange

Produits

Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by