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

SerialLink.double and Link.double #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aminya
Copy link

@aminya aminya commented Jul 8, 2019

Link.double converts link parameters to numeric (double) type

dl = l.double is a Link object in which all the parameters are
numeric ('double') type.

Useful when you are using Pi=sym('pi') to avoid round off errors
(e.g in sin(Pi/2)), but later you want to pass the link object to
a method (e.g. ikine) which only supports real numbers.

Will give an error if a symbolic variable is not convertible to
double number.

See also SerialLink.double

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SerialLink.double converts SerialLink object parameters to numeric (double) type

dr = r.double is a SerialLink object in which all the parameters are
numeric ('double') type.

Useful when you are using Pi=sym('pi') to avoid round off errors
(e.g in sin(Pi/2)), but later you want to pass the SerialLink object to
a method (e.g. ikine) which only supports real numbers.

Will give an error if a symbolic variable is not convertible to
double number.

See also Link.double

Author: Amin Yahyaabadi (aminyahyaabadi74@gmail.com)

Link.double converts link parameters to numeric (double) type

dl = l.double is a Link object in which all the parameters are
numeric ('double') type.

Useful when you are using Pi=sym('pi') to avoid round off errors
(e.g in sin(Pi/2)), but later you want to pass the link object to
a method (e.g. ikine) which only supports real numbers.

Will give an error if a symbolic variable is not convertible to
double number.

See also SerialLink.double

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SerialLink.double converts SerialLink object parameters to numeric (double) type

dr = r.double is a SerialLink object in which all the parameters are
numeric ('double') type.

Useful when you are using Pi=sym('pi') to avoid round off errors
e.g in sin(Pi/2)), but later you want to pass the SerialLink object to
a method (e.g. ikine) which only supports real numbers.

Will give an error if a symbolic variable is not convertible to
double number.

See also Link.double

Author: Amin Yahyaabadi (aminyahyaabadi74@gmail.com)
@aminya
Copy link
Author

aminya commented Jul 11, 2019

@petercorke I added two methods to Link and Serial Link which convert the parameters of both object to double.

@petercorke
Copy link
Owner

I'm not sure double() is the right name for this. Generally double() converts some representation to a native vector/matrix representation. Perhaps simplify() or symeval() or something.

@aminya
Copy link
Author

aminya commented Jul 14, 2019

I'm not sure double() is the right name for this. Generally double() converts some representation to a native vector/matrix representation. Perhaps simplify() or symeval() or something.

From Matlab document: double(s) converts symbolic values to MATLAB double precision. It is part of the symbolic toolbox.

But as you said double() is also the name for another function that just converts other numeric types to double type. double

simplify is different from the double function. double function converts numbers that are defined as symbolic to double. Such as sym(pi)

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

Successfully merging this pull request may close these issues.

None yet

2 participants