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

Unicycle model str and deriv function raises traces #333

Closed
pauloone opened this issue Aug 13, 2022 · 1 comment
Closed

Unicycle model str and deriv function raises traces #333

pauloone opened this issue Aug 13, 2022 · 1 comment
Labels
bug we got it wrong, will fix for next release This fix will be included in the next release

Comments

@pauloone
Copy link

Describe the bug
I tryied to use the Unicycle mobile model, and the str function did not work, as well as the diff function

Version information

Did you install from PyPI or GitHub?
PyPi
If PyPI what version number?
1.0.2
If GitHub what commit hash?

Robotics Toolbox depends heavily on two other packages: Swift (3D graphics) and SpatialMath toolbox (underpinning maths utilities). If you think your issue is related to these, then please answer the questions above for them.

To Reproduce
Steps to reproduce the behavior:

  1. The shortest, complete, Python script that exhibits the bug.
uni = Unicycle()
str(uni)

and

uni = Unicycle()
state = np.r_[0, 0, 0]
input = [1, 0] # no rotation
uni.deriv(state, input)
  1. The script output, including error messages.
Traceback (most recent call last):
  File "/home/<redacted>/simple_movement.py", line 12, in <module>
    print(uni)
  File "/home/<redacted>/roboticstoolbox/mobile/Vehicle.py", line 1076, in __str__
    s += f"\n  W={self._w}, steer_max={self._steer_max}, vel_max={self._vel_max}, accel_max={self.accel_max}"
AttributeError: 'Unicycle' object has no attribute '_steer_max'

and for the second

AttributeError: 'Unicycle' object has no attribute 'w'

Expected behavior
A clear and concise description of what you expected to happen.
str should return a string describing the instance
deriv should return the derivative state of a unicycle robot

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Your OS: Linux
  • Your Python version: 3.9

Additional context
I will provide an PR with the fixes

@pauloone
Copy link
Author

Link to the MR: #334

@petercorke petercorke added bug we got it wrong, will fix for next release This fix will be included in the next release labels Apr 21, 2023
petercorke added a commit that referenced this issue Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug we got it wrong, will fix for next release This fix will be included in the next release
Projects
None yet
Development

No branches or pull requests

2 participants