Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EST2 in chapter 7 Matlab code of the exercise 7.1.1.1 2-Dimensional (Planar) Robotic Arms (chapter7.mlx) #6

Open
ocaravaca opened this issue Oct 6, 2024 · 1 comment

Comments

@ocaravaca
Copy link

This report is for bugs with the RVC3-MATLAB repo: bugs in the RVC3 Toolbox, missing files, incorrect documentation, broken links etc.

Reports related to MATLAB, Simulink or any of the MathWorks Toolboxes should be directed to MathWorks. They will not be actioned if posted here.

What environment are you using

Are you using MATLAB Online or desktop? If desktop what operating system?

Desktop / Windows / Matlab R2024b

Let's check your installed software

Include the results of running

>> rvccheck

Results:

rvccheck
rvccheck for RVC3 Toolbox
Some required Toolboxes are not installed:
Navigation Toolbox is required for Chapter 5
You have Peter Corke's Robotics and/or Spatial Math Toolbox in your path

This is strange because the Navigation Toolbox is actually installed:

image

If this doesn't run, or produces no output please note that fact. It would mean something is very wrong with your MATLAB path or toolbox installation.

Describe the bug
A clear and concise description of what the bug is.

In chapter 7 Matlab code of the exercise 7.1.1.1 2-Dimensional (Planar) Robotic Arms (chapter7.mlx)
There is a bug when running the code:

>>a1 = 1;a2=5;
>>e = ETS2.Rz("q1")*ETS2.Tx(a1)
e = 
Rz(NaN)Tx(1)

This is later another problem when trying to run:

>> e.fkine(pi/6)
Operator '*' is not supported for operands of type 'string'.

Error in ETS2/fkine (line 143)
                        r = r * tform2d(0,0,v*opt.deg);

>> e.teach;
Error using zeros
NaN and Inf not allowed.

Error in ETS2/teach (line 388)
                q = zeros(1,robot.n);

The expected behavior is the one described in chapter 7 of the book "Robotics, Vision
and Control Fundamental Algorithms in MATLAB®", 3rd edition 2023 and starting from page 278.

@ocaravaca
Copy link
Author

ocaravaca commented Oct 8, 2024

Apparently, the problem is the use of "q1" in the code, so the error comes from using "" in the argument just as:

e = ETS2.Rz("q1") *ETS2.Tx(a1)
Instead, we should use 'q1' >>e = ETS2.Rz('q1') * ETS2.Tx(a1) and it works.
So, the issue is closed for me I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant