MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / set_robot_constants

Method set_robot_constants

Software/Python/easygopigo3.py:204–223  ·  view source on GitHub ↗

Set new wheel diameter and wheel base width values for the GoPiGo3. :param float wheel_diameter: Diameter of the GoPiGo3 wheels as measured in millimeters. :param float wheel_base_width: The distance between the 2 centers of the 2 wheels as measured in millimeters.

(self, wheel_diameter, wheel_base_width)

Source from the content-addressed store, hash-verified

202 json.dump(data, json_file)
203
204 def set_robot_constants(self, wheel_diameter, wheel_base_width):
205 """
206 Set new wheel diameter and wheel base width values for the GoPiGo3.
207
208 :param float wheel_diameter: Diameter of the GoPiGo3 wheels as measured in millimeters.
209 :param float wheel_base_width: The distance between the 2 centers of the 2 wheels as measured in millimeters.
210
211 This should only be required in rare cases when the GoPiGo3's trajectory is skewed due to minor differences in the wheel-to-body measurements.
212
213 The GoPiGo3 class instantiates itself with default values for both constants:
214
215 1. ``wheel_diameter`` is by-default set to **66.5** *mm*.
216
217 2. ``wheel_base_width`` is by-default set to **117** *mm*.
218
219 """
220 self.WHEEL_DIAMETER = wheel_diameter
221 self.WHEEL_CIRCUMFERENCE = self.WHEEL_DIAMETER * pi
222 self.WHEEL_BASE_WIDTH = wheel_base_width
223 self.WHEEL_BASE_CIRCUMFERENCE = self.WHEEL_BASE_WIDTH * pi
224
225 def volt(self):
226 """

Callers 2

load_robot_constantsMethod · 0.95
onSaveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected