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:
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)
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
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:
and
and for the second
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):
Additional context I will provide an PR with the fixes