Public Member Functions | |
| __init__ (self, params=RobotParams(), min_speed_mmps=0) | |
| get_axis_length_mm (self) | |
| convert_range (self, x_value, x_min, x_max, y_min, y_max) | |
| compute_rev_from_pulses (self, pulses) | |
| compute_distance_from_rev (self, revolutions) | |
| compute_distance_from_pulses (self, pulses) | |
| compute_speed_from_distance (self, distance_mm, time_ms) | |
| compute_speed_from_pulses (self, num_pulses, time_ms) | |
| compute_distance_from_speed (self, speed_mmps, time_ms) | |
| compute_revolutions_from_distance (self, distance_mm) | |
| compute_arc_length (self, angle_rad, radius_of_curvature_mm) | |
| compute_pulses_from_rev (self, revolutions) | |
| compute_pulses_from_speed (self, speed_mmps, time_ms) | |
| compute_pulses_from_distance (self, distance) | |
| compute_pulses_from_angle_and_curvature (self, angle_rad, radius_of_curvature_mm=0) | |
| convert_to_mmps (self, desired_speed_percentage) | |
| convert_to_percentage (self, desired_speed_mmps) | |
| compute_pose_speeds (self, left_speed, right_speed) | |
| compute_wheel_speeds (self, linear_speed, angular_speed_rad) | |
| compute_speeds_rpm (self, WheelSpeeds wheel_speeds_mmps) | |
collection of methods to compute speeds, distance, pulses
| onepi.utils.control_utils.ControlUtils.__init__ | ( | self, | |
| params = RobotParams(), | |||
| min_speed_mmps = 0 ) |
constructor
| onepi.utils.control_utils.ControlUtils.compute_arc_length | ( | self, | |
| angle_rad, | |||
| radius_of_curvature_mm ) |
Computes the arc length given the angle and radius of curvature
| onepi.utils.control_utils.ControlUtils.compute_distance_from_pulses | ( | self, | |
| pulses ) |
computes distance given the number of pulses
| onepi.utils.control_utils.ControlUtils.compute_distance_from_rev | ( | self, | |
| revolutions ) |
computes distance given the number of revolutions
| onepi.utils.control_utils.ControlUtils.compute_distance_from_speed | ( | self, | |
| speed_mmps, | |||
| time_ms ) |
computes the distance given the speed and time
| onepi.utils.control_utils.ControlUtils.compute_pose_speeds | ( | self, | |
| left_speed, | |||
| right_speed ) |
computes the pose speeds given left and right wheel speeds
| onepi.utils.control_utils.ControlUtils.compute_pulses_from_angle_and_curvature | ( | self, | |
| angle_rad, | |||
| radius_of_curvature_mm = 0 ) |
computes number of pulses given the angle and radius of curvature curvature
| onepi.utils.control_utils.ControlUtils.compute_pulses_from_distance | ( | self, | |
| distance ) |
computes number of pulses given distance
| onepi.utils.control_utils.ControlUtils.compute_pulses_from_rev | ( | self, | |
| revolutions ) |
computes the expected number of pulses given the number of revolutions of the wheel
| onepi.utils.control_utils.ControlUtils.compute_pulses_from_speed | ( | self, | |
| speed_mmps, | |||
| time_ms ) |
computes number of pulses given speed and time
| onepi.utils.control_utils.ControlUtils.compute_rev_from_pulses | ( | self, | |
| pulses ) |
computes the expected number of pulses given the number of revolutions of the wheel
| onepi.utils.control_utils.ControlUtils.compute_revolutions_from_distance | ( | self, | |
| distance_mm ) |
computes the number of revolutions expected for the wheel for a given distance
| onepi.utils.control_utils.ControlUtils.compute_speed_from_distance | ( | self, | |
| distance_mm, | |||
| time_ms ) |
computes speed given the distance and time
| onepi.utils.control_utils.ControlUtils.compute_speed_from_pulses | ( | self, | |
| num_pulses, | |||
| time_ms ) |
computes speed given the number of pulses and time
| onepi.utils.control_utils.ControlUtils.compute_speeds_rpm | ( | self, | |
| WheelSpeeds | wheel_speeds_mmps ) |
computes the speeds in rpm given the speeds in mm/s
| onepi.utils.control_utils.ControlUtils.compute_wheel_speeds | ( | self, | |
| linear_speed, | |||
| angular_speed_rad ) |
Computes the wheel speeds from linear and angular speeds
| onepi.utils.control_utils.ControlUtils.convert_range | ( | self, | |
| x_value, | |||
| x_min, | |||
| x_max, | |||
| y_min, | |||
| y_max ) |
Converts a value x given in the range [x_min : x_max] to a new value in the range [y_min : y_max]
| onepi.utils.control_utils.ControlUtils.convert_to_mmps | ( | self, | |
| desired_speed_percentage ) |
convert speed percentage to real speed in mmps
| onepi.utils.control_utils.ControlUtils.convert_to_percentage | ( | self, | |
| desired_speed_mmps ) |
convert real speed to speed percentage