Replies: 4 comments 12 replies
-
Thanks for your message! The gyro is a new feature that has only just been added to the beta version: https://beta.pybricks.com/ To try it, install the firmware from there, and write your code there, too. Everything else should work the same. We'd love to have your feedback on this feature. This will help us improve it before we include it in the official release too. To see what is and isn't supported, just browse the documentation inside the app. This always matches the right version. |
Beta Was this translation helpful? Give feedback.
-
Hi, Traceback (most recent call last): My version: |
Beta Was this translation helpful? Give feedback.
-
As you can see in the video, after a 90-degree turn, there is a drift to the right. I’m also sending you the code. I couldn’t figure out what to write in the version field for the 3D calibration, so I couldn’t complete it. If you could help me with that, I would appreciate it, but this issue seems to be caused by something else. Thank you! from pybricks.hubs import PrimeHub
from pybricks.parameters import Direction, Port, Stop
from pybricks.pupdevices import Motor
from pybricks.robotics import DriveBase
from pybricks.tools import wait
prime_hub = PrimeHub()
right = Motor(Port.C, Direction.CLOCKWISE)
left = Motor(Port.B, Direction.COUNTERCLOCKWISE)
left_arm = Motor(Port.A, Direction.CLOCKWISE)
right_arm = Motor(Port.D, Direction.CLOCKWISE)
robot = DriveBase(left, right, 64.2, 117)
robot.settings(straight_acceleration=150)
robot.straight(300, Stop.COAST,True)
print(prime_hub.imu.heading())
robot.settings(turn_rate=1000)
robot.turn(95,Stop.COAST_SMART,True)
#robot.turn(93, Stop.BRAKE)
print(prime_hub.imu.heading())
robot.settings(straight_acceleration=150)
robot.straight(100, Stop.COAST,True)
print(prime_hub.imu.heading()) IMG_2199.mov |
Beta Was this translation helpful? Give feedback.
-
It doesn’t look like that on my side. I’ve uploaded it again, and if it still shows as zero seconds, I’ll upload it to Drive. IMG_2199.mov |
Beta Was this translation helpful? Give feedback.
-
Hi, this must be a novice question but..
This works fine:
from pybricks.robotics import DriveBase
But this produces a "from pybricks.robotics import GyroDriveBase" error:
from pybricks.robotics import GyroDriveBase
What am I doing wrong? I just copied the example from the doc, and changed Drivebase to GyroDriveBase, but can't compile. I am using v3.2.3 (Pybricks Code v2.1.1).
Beta Was this translation helpful? Give feedback.
All reactions