You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The book introduces python on page 13. It shows a basic command to create a 2d rotational matrix.
Again on page 34.
But nowhere do I see the required import statement. It's not clear where rot2() comes from. I don't find it in roboticstoolbox, or in spatialmath or numpy. I'm missing something obvious, but I don't see the obvious in the book either.
Would someone let me know what to import for rot2()?
Python 3.9.6 (default, Oct 18 2022, 12:41:40)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> R = rot2(0.3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rot2' is not defined
>>> from roboticstoolbox import *
>>> R = rot2(0.3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rot2' is not defined
>>> from spatialmath import *
>>> R = rot2(0.3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'rot2' is not defined
>>>
Some of this information is in the book on page 79. It comes well after the introduction of the functions.
There is also a python notebook page that has more python preamble:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The book introduces python on page 13. It shows a basic command to create a 2d rotational matrix.
Again on page 34.
But nowhere do I see the required import statement. It's not clear where rot2() comes from. I don't find it in
roboticstoolbox
, or inspatialmath
ornumpy
. I'm missing something obvious, but I don't see the obvious in the book either.Would someone let me know what to import for rot2()?
I found it, after snooping around:
Some of this information is in the book on page 79. It comes well after the introduction of the functions.
There is also a python notebook page that has more python preamble:
https://github.com/petercorke/RVC3-python/blob/main/notebooks/chap2.ipynb
Beta Was this translation helpful? Give feedback.
All reactions