From f1b19558c805e4f12be5e08922b0a88a01fb0caf Mon Sep 17 00:00:00 2001 From: Boyd Fletcher <130318010+bcfletcher@users.noreply.github.com> Date: Sat, 5 Apr 2025 14:53:24 -0400 Subject: [PATCH 1/5] Update robotics.py updated DriveBase.settings to added more information about turn_rate calculations --- src/pybricks/robotics.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 8dd36c73..1dd20eba 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -161,6 +161,13 @@ def settings(self, *args): The speed values given here do not apply to the :meth:`.drive` method, since you provide your own speed values as arguments in that method. + The robot will calculate the max turn rate for your robot based on the + axleTrack and wheelDiameter settings when you initialize the robot via + the DriveBase() function. If you try to set turn_rate to a value the + exceeds the calculated value the robot will return a INVALID AUGMENT error. + The max possible value for turn_rate is 1000 deg/s. A wider drivebase + or one with smaller wheels will have a lower top speed for the turn_rate. + Arguments: straight_speed (Number, mm/s): Straight-line speed of the robot. straight_acceleration (Number, mm/s²): Straight-line From aaf0d3868b0f2e6beb28342f4d2f9cd3d7d819c9 Mon Sep 17 00:00:00 2001 From: Boyd Fletcher <130318010+bcfletcher@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:25:22 -0400 Subject: [PATCH 2/5] Update src/pybricks/robotics.py Co-authored-by: David Lechner --- src/pybricks/robotics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 1dd20eba..8228a350 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -163,7 +163,7 @@ def settings(self, *args): The robot will calculate the max turn rate for your robot based on the axleTrack and wheelDiameter settings when you initialize the robot via - the DriveBase() function. If you try to set turn_rate to a value the + the :class:`DriveBase` constructor. If you try to set ``turn_rate`` to a value that exceeds the calculated value the robot will return a INVALID AUGMENT error. The max possible value for turn_rate is 1000 deg/s. A wider drivebase or one with smaller wheels will have a lower top speed for the turn_rate. From 30256166437fda890fe01ee625eac3b91c7e5bad Mon Sep 17 00:00:00 2001 From: Boyd Fletcher <130318010+bcfletcher@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:25:29 -0400 Subject: [PATCH 3/5] Update src/pybricks/robotics.py Co-authored-by: David Lechner --- src/pybricks/robotics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 8228a350..29355ba0 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -164,7 +164,7 @@ def settings(self, *args): The robot will calculate the max turn rate for your robot based on the axleTrack and wheelDiameter settings when you initialize the robot via the :class:`DriveBase` constructor. If you try to set ``turn_rate`` to a value that - exceeds the calculated value the robot will return a INVALID AUGMENT error. + exceeds the calculated value the robot will raise a ``ValueError`` exception. The max possible value for turn_rate is 1000 deg/s. A wider drivebase or one with smaller wheels will have a lower top speed for the turn_rate. From f29b95d2a336bf6a53de25dba6f11d2a7d9b3741 Mon Sep 17 00:00:00 2001 From: Boyd Fletcher <130318010+bcfletcher@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:25:40 -0400 Subject: [PATCH 4/5] Update src/pybricks/robotics.py Co-authored-by: David Lechner --- src/pybricks/robotics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 29355ba0..c70b81eb 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -166,7 +166,7 @@ def settings(self, *args): the :class:`DriveBase` constructor. If you try to set ``turn_rate`` to a value that exceeds the calculated value the robot will raise a ``ValueError`` exception. The max possible value for turn_rate is 1000 deg/s. A wider drivebase - or one with smaller wheels will have a lower top speed for the turn_rate. + or one with smaller wheels will have a lower top speed for the ``turn_rate``. Arguments: straight_speed (Number, mm/s): Straight-line speed of the robot. From 25544c57c3df67d4bc2ebe3b028bd39dce1ea1bf Mon Sep 17 00:00:00 2001 From: Boyd Fletcher <130318010+bcfletcher@users.noreply.github.com> Date: Wed, 9 Apr 2025 20:25:50 -0400 Subject: [PATCH 5/5] Update src/pybricks/robotics.py Co-authored-by: David Lechner --- src/pybricks/robotics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index c70b81eb..8d850cd7 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -162,7 +162,7 @@ def settings(self, *args): since you provide your own speed values as arguments in that method. The robot will calculate the max turn rate for your robot based on the - axleTrack and wheelDiameter settings when you initialize the robot via + ``axle_track`` and ``wheel_diameter`` settings when you initialize the robot in the :class:`DriveBase` constructor. If you try to set ``turn_rate`` to a value that exceeds the calculated value the robot will raise a ``ValueError`` exception. The max possible value for turn_rate is 1000 deg/s. A wider drivebase