Discover Learn Reference Get OpenPLX Search Contact

Vehicles/TrackSystem/Connections/Traits

HingeWheels

trait TwoWheels:
    .doc: """
    Here we extend the connection base with one more wheel connectors.
    Note that the size of the track_wheels array in the track_system must
    have at least the the number of hinges in the connection. E.g. if we use the
    TwoWheels trait, the track_system must have at least two track_wheels.


    Example:
        tracks_connection is Vehicles.TrackSystem.Connections.Base with Vehicles.TrackSystem.Connections.Traits.TwoWheels:
            track_system : track_system
            connectors: [sprocket_connector,
                        idler_connector]
    """

    # Note that when creating the hinge or hinges the order of connector
    # assignment matter for stability at high velocities.
    # The  wheel `center_connector` should always be assigned to `hinge_#.from`
    # and the mating connector on the chassis or suspension should be assigned to
    # `hinge_#.to`.

    hinge_2 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[1].center_connector
        to: connectors[1]
    hinge_2.snap_hinge.initial_angle: 0

trait ThreeWheels is TwoWheels:
    .doc: """
    Here we extend the connection base with two more wheel connectors.
    Note that the size of the track_wheels array in the track_system must
    have at least the the number of hinges in the connection. E.g. if we use the
    ThreeWheels trait, the track_system must have at least three track_wheels.

    Example:
        tracks_connection is Vehicles.TrackSystem.Connections.Base with Vehicles.TrackSystem.Connections.Traits.ThreeWheels:
            track_system : track_system
            connectors: [sprocket_connector,
                        idler_connector]
    """
    hinge_3 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[2].center_connector
        to: connectors[2]
    hinge_3.snap_hinge.initial_angle: 0

trait FourWheels is ThreeWheels:
    hinge_4 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[3].center_connector
        to: connectors[3]
    hinge_4.snap_hinge.initial_angle: 0

trait FiveWheels is FourWheels:
    hinge_5 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[4].center_connector
        to: connectors[4]
    hinge_5.snap_hinge.initial_angle: 0

trait SixWheels is FiveWheels:
    hinge_6 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[5].center_connector
        to: connectors[5]
    hinge_6.snap_hinge.initial_angle: 0

trait SevenWheels is SixWheels:
    hinge_7 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[6].center_connector
        to: connectors[6]
    hinge_7.snap_hinge.initial_angle: 0

trait EightWheels is SevenWheels:
    hinge_8 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[7].center_connector
        to: connectors[7]
    hinge_8.snap_hinge.initial_angle: 0

trait NineWheels is EightWheels:
    hinge_9 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[8].center_connector
        to: connectors[8]
    hinge_9.snap_hinge.initial_angle: 0

trait TenWheels is NineWheels:
    hinge_10 is MachineModeling.Connections.Pivot.Hinge:
        from: track_system.track_wheels[9].center_connector
        to: connectors[9]
    hinge_10.snap_hinge.initial_angle: 0

OpenPLX is a work in progress. This draft version will evolve with user feedback and experience. We welcome your input and collaboration.
X