How to use the pyfrc.physics.tankmodel.TankModel function in pyfrc

To help you get started, we’ve selected a few pyfrc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wpilibsuite / frc-characterization / arm_characterization / robot / robot-python-spark / physics.py View on Github external
robot_wheelbase,
                robot_width,
                robot_length,
                wheel_diameter,
            )
        else:
            # These are the parameters for kv/ka that you computed for your robot
            # -> this example uses the values from the paper
            l_kv = 0.81 * units.tm_kv
            l_ka = 0.21 * units.tm_ka
            l_vintercept = 1.26 * units.volts
            r_kv = 0.81 * units.tm_kv
            r_ka = 0.21 * units.tm_ka
            r_vintercept = 1.26 * units.volts

            self.drivetrain = tankmodel.TankModel(
                motor_cfg,
                robot_mass,
                robot_wheelbase,
                robot_width,
                robot_length,
                l_kv,
                l_ka,
                l_vintercept,
                r_kv,
                r_ka,
                r_vintercept,
            )
github wpilibsuite / frc-characterization / arm_characterization / robot / robot-python-talonsrx / physics.py View on Github external
robot_wheelbase,
                robot_width,
                robot_length,
                wheel_diameter,
            )
        else:
            # These are the parameters for kv/ka that you computed for your robot
            # -> this example uses the values from the paper
            l_kv = 0.81 * units.tm_kv
            l_ka = 0.21 * units.tm_ka
            l_vintercept = 1.26 * units.volts
            r_kv = 0.81 * units.tm_kv
            r_ka = 0.21 * units.tm_ka
            r_vintercept = 1.26 * units.volts

            self.drivetrain = tankmodel.TankModel(
                motor_cfg,
                robot_mass,
                robot_wheelbase,
                robot_width,
                robot_length,
                l_kv,
                l_ka,
                l_vintercept,
                r_kv,
                r_ka,
                r_vintercept,
            )