from math import radians

from model import ArmModel, plot_models
from model.motors import BAG

if __name__ == "__main__":

    model = ArmModel(motors=BAG(2),
                     gear_ratio=250,
                     arm_mass=10,
                     arm_cg_distance=24 * 0.0254,
                     max_dist=radians(70))

    model2 = ArmModel(motors=BAG(2),
                      gear_ratio=300,
                      arm_mass=10,
                      arm_cg_distance=24 * 0.0254,
                      max_dist=radians(70))

    plot_models(model, model2, elements_to_plot=('pos', 'vel', 'current'))
예제 #2
0
    #                          pulley_diameter=2.144 * 0.0254, max_dist=48 * 0.0254, motor_voltage_limit=12)]
    # models += [ElevatorModel(motors=_775pro(3), gear_ratio=75, payload_mass=100, battery_voltage=12.3,
    #                          pulley_diameter=2.144 * 0.0254, max_dist=48 * 0.0254, motor_voltage_limit=12)]
    # models += [ElevatorModel(motors=_775pro(4), gear_ratio=85, payload_mass=100, battery_voltage=12.3,
    #                          pulley_diameter=2.144 * 0.0254, max_dist=48 * 0.0254, motor_voltage_limit=12)]

    # models += [ElevatorModel(motors=CIM(2), gear_ratio=17.49, payload_mass=40/2.2, battery_voltage=12.3,
    #                          pulley_diameter=2.144 * 0.0254, max_dist=48*0.0254, motor_voltage_limit=12)]

    models += [
        ElevatorModel(motors=CIM(2),
                      gear_ratio=26,
                      payload_mass=400 / 2.2,
                      battery_voltage=12.3,
                      pulley_diameter=1.43 * 0.0254,
                      max_dist=32 * 0.0254,
                      motor_voltage_limit=12)
    ]

    models += [
        ElevatorModel(motors=MiniCIM(3),
                      gear_ratio=29,
                      payload_mass=400 / 2.2,
                      battery_voltage=12.3,
                      pulley_diameter=1.43 * 0.0254,
                      max_dist=32 * 0.0254,
                      motor_voltage_limit=12)
    ]

    plot_models(*models, elements_to_plot=('pos', 'vel', 'current'))
예제 #3
0
from model import ShooterSpinupModel, plot_models
from model.motors import _775pro

if __name__ == "__main__":
    models = []

    # Intake Gearboxes
    models += [
        ShooterSpinupModel(motors=_775pro(2),
                           gear_ratio=2,
                           wheel_inertia=1,
                           wheel_diameter=2 * 0.0254,
                           motor_voltage_limit=12)
    ]
    models += [
        ShooterSpinupModel(motors=_775pro(2),
                           gear_ratio=1,
                           wheel_inertia=1,
                           wheel_diameter=2 * 0.0254,
                           motor_voltage_limit=12)
    ]

    plot_models(*models,
                elements_to_plot=('vel', 'surface_vel', 'total_current'))
예제 #4
0
from model import IntakeShooterModel, plot_models
from model.motors import _775pro, BAG

if __name__ == "__main__":
    models = []

    # Intake Gearboxes
    models += [IntakeShooterModel(motors=BAG(2), gear_ratio=r, element_mass=3.5 / 2.2,
                                  wheel_diameter=2 * 0.0254, max_dist=7 * 0.0254, motor_voltage_limit=12,
                                  compression_force=45, check_for_slip=False) for r in [3, 4, 5, 7, 9]]
    models += [IntakeShooterModel(motors=_775pro(2), gear_ratio=r, element_mass=3.5 / 2.2,
                                  wheel_diameter=2 * 0.0254, max_dist=7 * 0.0254, motor_voltage_limit=12,
                                  compression_force=45, check_for_slip=False) for r in [3, 4, 5, 7, 9]]

    plot_models(*models, elements_to_plot=('pos', 'vel', 'total_current', 'slipping'))
    # 6" Wheel Drivetrains
    models += [DrivetrainModel(_775pro(8), gear_ratio=28.3, robot_mass=68, wheel_diameter=6 * 0.0254,
                               motor_voltage_limit=12, motor_current_limit=30, max_dist=10)]

    # models += [DrivetrainModel(_775pro(8), gear_ratio=28.3 * 24 / 18, robot_mass=68, wheel_diameter=6 * 0.0254,
    #                            motor_voltage_limit=12, motor_current_limit=30, max_dist=10,
    #                            name="6\" Evo Slim - w\\ external2")]

    models += [DrivetrainModel(_775pro(8), gear_ratio=28.3 * 30 / 24, robot_mass=68, wheel_diameter=6 * 0.0254,
                               motor_voltage_limit=12, motor_current_limit=30, max_dist=10,
                               name="6\" Evo Slim - w\\ external")]

    models += [DrivetrainModel(_775pro(8), gear_ratio=100/12*66/16, robot_mass=68, wheel_diameter=6 * 0.0254,
                               motor_voltage_limit=12, motor_current_limit=30, max_dist=10,
                               name="6\" Evo Thicc")]

    models += [ShiftingDrivetrainModel(CIM(6), robot_mass=68, max_dist=10, shift_velocity=2.3,
                                       low_gear_ratio=9,
                                       high_gear_ratio=4,
                                       wheel_diameter=4 * 0.0254,
                                       name="Oscar")]
    #
    # # # 6 CIM Drivetrain
    # models += [DrivetrainModel(CIM(6), robot_mass=68, wheel_diameter=6 * 0.0254, gear_ratio=9.07,
    #                                    motor_voltage_limit=12, max_dist=6, name="Ball Shifter 6\" Wheel")]  # Ball Shifter
    #
    # models += [DrivetrainModel(CIM(4), gear_ratio=10.75, robot_mass=68, wheel_diameter=6 * 0.0254,
    #                            motor_voltage_limit=12, max_dist=6, name="Kitbot Toughbox 6\" Wheel")]  # Kit-bot
    #
    plot_models(*models, elements_to_plot=('pos', 'vel', 'accel', 'total_current'))