#VRML_SIM R2022b utf8
# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots.
# license url: https://cyberbotics.com/webots_assets_license
# tags: static
# documentation url: https://www.cyberbotics.com/doc/guide/epuck
# EPFL educational and research mini mobile robot.
# The e-puck is powered by a dsPIC processor and features a very large number of sensors in its basic configuration.
# More info here: http://www.e-puck.org.

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/50c3f419b5da49a2af606297049ee91e8adbc92e/projects/objects/solids/protos/SolidPipe.proto"

PROTO custom_robot [
    field SFVec3f            translation                  0 0 0                    # Is `Transform.translation`.
    field SFRotation         rotation                     0 1 0 0                  # Is `Transform.rotation`.
    field SFString           name                         "Erebus_Bot"                 # Is `Solid.name`.
    field SFInt32            emitter_channel              1
    field SFInt32            receiver_channel             1
    field SFString           controller                   ""
    field MFString           controllerArgs               ""
    field SFString           customData                   ""
    hiddenField SFFloat      wheel_mult                   1.0
    hiddenField  SFFloat     max_velocity                 6.28
    field SFFloat            camera_fieldOfView           0.84
    field SFInt32            camera_width                 64
    field SFInt32            camera_height                40
    field SFBool             camera_antiAliasing          FALSE
    field SFRotation         camera_rotation              1 0 0 0
    field SFFloat            camera_noise                 0.0
    field SFFloat            camera_motionBlur            0.0

]
{
Robot {
    translation IS translation
    rotation IS rotation
    children [
        DEF EPUCK_PLATE Transform {
            translation 0.0002 0.037 0
            rotation 0 0.7071067811862363 0.7071067811862363 3.1415907772264875
            children [
                Shape {
                appearance PBRAppearance {
                    baseColorMap ImageTexture {
                    url [
                        "textures/e-puck1_plate_base_color_1.jpg"
                    ]
                    }
                    roughnessMap ImageTexture {
                    url [
                        "textures/e-puck1_plate_roughness.jpg"
                    ]
                    }
                    metalnessMap ImageTexture {
                    url [
                        "textures/e-puck1_plate_metalness.jpg"
                    ]
                    }
                    normalMap ImageTexture {
                    url [
                        "textures/e-puck1_plate_normal.jpg"
                    ]
                    }
                    occlusionMap ImageTexture {
                    url [
                        "textures/e-puck1_plate_occlusion.jpg"
                    ]
                    }
                }
                geometry Cylinder {
                    height 1e-05
                    radius 0.035
                }
                }
            ]
        }
        DEF EPUCK_BODY_LED LED {
            rotation 0 1 0 4.712399693899575
            children [
                Shape {
                appearance PBRAppearance {
                    baseColor 0.5 0.5 0.5
                    roughness 0.5
                    metalness 0
                    emissiveIntensity 0.2
                }
                geometry IndexedFaceSet {
                    coord Coordinate {
                    point [
                        0 0 0, 0.031522 0.025 0.015211, 0.031522 0.009 0.015211, 0.020982 0.00775 0.022017, 0.033472 0.006 0.009667, 0.029252 0.009825 0.018942, 0.016991 0.00101 0.022014, -0.022019 0.037 0.021983, -0.022018 0.025 0.021982, 0.02707 0.001064 0.00781, 0.027116 0.037 0.00781, -0.034656 0.031 0.003517, 0.026971 0.025 0.022022, 0.02707 0.01 0.022022, -0.027018 0.001 0.021978, -0.034312 0.031 0.005972, -0.034677 0.02633 0.003018, 0.035 0.037 2.9e-05, -0.031546 0.001 0.015161, -0.027018 0.037 0.021981, -0.027018 0.025 0.02198, -0.034312 0.025 0.005972, -0.034312 0.001 0.005972, -0.035 0.001 -2.7e-05, -0.035 0.025 -2.7e-05, -0.031312 0.025 0.005974, -0.031312 0.031 0.005974, -0.031656 0.031 0.00352, -0.032002 0.02633 0.003, -0.026442 0.025 -2.4e-05, -0.031546 0.037 0.015161, -0.031546 0.025 0.015161, 0.034116 0.001 0.007816, 0.034116 0.037 0.007816, 0.034116 0.025 0.007816, 0.035 0.001 2.9e-05, 0.034129 0.025 -0.007759, 0.034129 0.037 -0.007759, 0.034129 0.001 -0.007759, -0.031522 0.025 -0.015209, -0.031522 0.037 -0.015209, -0.031998 0.02633 -0.003049, -0.031651 0.031 -0.003568, -0.031302 0.031 -0.006022, -0.031302 0.025 -0.006022, -0.034302 0.001 -0.006024, -0.034302 0.025 -0.006024, -0.021982 0.025 -0.022015, -0.026983 0.025 -0.022021, -0.031522 0.001 -0.015209, -0.026983 0.001 -0.022019, -0.034672 0.02633 -0.003071, -0.034302 0.031 -0.006024, -0.026983 0.037 -0.022022, 0.031546 0.025 -0.015158, 0.031546 0.009 -0.015158, 0.027018 0.01 -0.021976, 0.026971 0.025 -0.021976, -0.034651 0.031 -0.00357, 0.027129 0.037 -0.007764, 0.02707 0.001064 -0.007764, -0.021983 0.037 -0.022015, 0.017026 0.00101 -0.021984, 0.029282 0.009825 -0.018893, 0.033487 0.006 -0.009611, 0.021018 0.00775 -0.021981, -0.022012 0.001029 0.021984, -0.021988 0.001029 -0.022017, -0.022012 0.002114 0.020705, -0.021988 0.002114 -0.020739, 0.020982 0.007866 0.021216, 0.02707 0.006116 0.009667, 0.02707 0.009941 0.018942, 0.016991 0.001125 0.021213, 0.02707 0.010116 0.021221, 0.02707 0.009116 0.015211, -0.026411 0.037 -0.020914, 0.02707 0.010116 -0.021175, 0.017026 0.001125 -0.021183, 0.02707 0.009941 -0.018893, 0.02707 0.006116 -0.009611, 0.021018 0.007866 -0.02118, 0.02707 0.009116 -0.015158, 0.026971 0.025 0.02126, 0.026971 0.025 0.015211, 0.027032 0.024944 0.007813, 0.027035 0.024936 -0.007761, 0.026971 0.025 -0.021174, 0.026971 0.025 -0.015158, -0.022018 0.025 0.020881, -0.022019 0.037 0.020881, -0.021982 0.025 -0.020913, -0.021983 0.037 -0.020914, -0.022012 0.001029 0.020691, -0.021988 0.001029 -0.020724, -0.030453 0.025 0.014633, -0.030453 0.03692 0.014633, -0.030444 0.03692 -0.01468, -0.030444 0.025 -0.01468, -0.026555 0.037 0.02095, -0.026555 0.02482 0.02095, -0.026442 0.001685 0.014633, -0.026555 0.001504 0.02095, -0.026411 0.025004 -0.020914, -0.026442 0.001774 -0.01468, -0.026411 0.001778 -0.020914, -0.028504 0.03696 0.017791, -0.029479 0.03694 0.016212, -0.028427 0.03696 -0.017797, -0.026442 0.036868 -0.01468, -0.029436 0.03694 -0.016239, -0.026442 0.036868 0.014633, -0.026442 0.025 0.014633, -0.026442 0.025 -0.01468, -0.026426 0.036934 -0.017797, -0.026498 0.036934 0.017791, 0.030629 0.037 -0.007761, 0.027122 0.037 2.3e-05, 0.031064 0.037 -0.003868
                    ]
                    }
                    coordIndex [
                    36, 38, 64, -1, 29, 41, 24, -1, 51, 24, 41, -1, 51, 41, 58, -1, 42, 58, 41, -1, 51, 58, 46, -1, 52, 46, 58, -1, 44, 46, 43, -1, 52, 43, 46, -1, 49, 40, 50, -1, 53, 50, 40, -1, 54, 55, 57, -1, 63, 57, 55, -1, 56, 57, 63, -1, 17, 35, 37, -1, 65, 62, 48, -1, 56, 65, 48, -1, 38, 37, 36, -1, 57, 56, 48, -1, 49, 45, 46, -1, 45, 23, 24, -1, 42, 43, 52, -1, 51, 46, 24, -1, 35, 38, 36, -1, 35, 36, 37, -1, 33, 34, 35, -1, 34, 32, 35, -1, 24, 21, 16, -1, 15, 26, 27, -1, 23, 22, 21, -1, 22, 18, 31, -1, 20, 13, 12, -1, 34, 33, 10, -1, 37, 36, 116, -1, 20, 3, 13, -1, 20, 6, 3, -1, 6, 20, 14, -1, 33, 35, 17, -1, 5, 12, 13, -1, 21, 26, 15, -1, 26, 21, 25, -1, 11, 21, 15, -1, 21, 11, 16, -1, 28, 11, 27, -1, 11, 28, 16, -1, 28, 24, 16, -1, 24, 28, 29, -1, 4, 32, 34, -1, 1, 2, 4, -1, 1, 4, 34, -1, 28, 26, 25, -1, 42, 41, 43, -1, 69, 68, 66, -1, 63, 79, 77, -1, 56, 77, 81, -1, 78, 62, 65, -1, 74, 72, 5, -1, 13, 3, 70, -1, 73, 70, 3, -1, 81, 77, 87, -1, 81, 87, 78, -1, 74, 70, 83, -1, 73, 83, 70, -1, 87, 91, 78, -1, 83, 73, 89, -1, 73, 93, 89, -1, 66, 93, 73, -1, 67, 62, 78, -1, 78, 91, 94, -1, 60, 35, 9, -1, 9, 32, 4, -1, 72, 83, 84, -1, 75, 84, 85, -1, 71, 85, 9, -1, 36, 64, 54, -1, 64, 55, 54, -1, 47, 48, 61, -1, 53, 61, 48, -1, 50, 48, 62, -1, 2, 12, 5, -1, 12, 2, 1, -1, 20, 7, 19, -1, 7, 20, 8, -1, 30, 14, 19, -1, 14, 30, 18, -1, 22, 45, 14, -1, 67, 66, 49, -1, 1, 84, 83, -1, 85, 84, 1, -1, 54, 88, 86, -1, 87, 88, 54, -1, 64, 38, 60, -1, 55, 64, 80, -1, 82, 79, 63, -1, 2, 75, 71, -1, 5, 72, 75, -1, 82, 88, 79, -1, 92, 91, 47, -1, 87, 57, 47, -1, 7, 8, 89, -1, 83, 89, 8, -1, 96, 31, 30, -1, 97, 40, 39, -1, 98, 39, 46, -1, 95, 25, 21, -1, 76, 53, 40, -1, 61, 53, 76, -1, 99, 19, 7, -1, 107, 96, 30, -1, 99, 90, 89, -1, 113, 98, 44, -1, 105, 103, 113, -1, 102, 100, 89, -1, 103, 91, 92, -1, 98, 113, 109, -1, 91, 103, 105, -1, 113, 29, 104, -1, 101, 112, 100, -1, 29, 101, 104, -1, 118, 59, 117, -1, 39, 49, 46, -1, 46, 45, 24, -1, 58, 42, 52, -1, 11, 15, 27, -1, 24, 23, 21, -1, 21, 22, 31, -1, 28, 27, 26, -1, 25, 29, 28, -1, 44, 43, 41, -1, 41, 29, 44, -1, 69, 104, 101, -1, 67, 69, 66, -1, 56, 63, 77, -1, 65, 56, 81, -1, 81, 78, 65, -1, 13, 74, 5, -1, 74, 13, 70, -1, 6, 73, 3, -1, 6, 66, 73, -1, 94, 67, 78, -1, 32, 9, 35, -1, 60, 38, 35, -1, 71, 9, 4, -1, 84, 75, 72, -1, 72, 74, 83, -1, 71, 75, 85, -1, 49, 14, 45, -1, 18, 22, 14, -1, 23, 45, 22, -1, 14, 49, 66, -1, 50, 67, 49, -1, 12, 1, 83, -1, 34, 85, 1, -1, 36, 54, 86, -1, 57, 87, 54, -1, 80, 64, 60, -1, 82, 55, 80, -1, 55, 82, 63, -1, 4, 2, 71, -1, 2, 5, 75, -1, 80, 60, 86, -1, 87, 77, 79, -1, 82, 80, 86, -1, 87, 79, 88, -1, 86, 88, 82, -1, 61, 92, 47, -1, 91, 87, 47, -1, 90, 7, 89, -1, 12, 83, 8, -1, 95, 31, 96, -1, 98, 97, 39, -1, 44, 98, 46, -1, 31, 95, 21, -1, 108, 76, 40, -1, 92, 61, 76, -1, 90, 99, 7, -1, 19, 99, 30, -1, 100, 99, 89, -1, 111, 107, 106, -1, 93, 102, 89, -1, 76, 103, 92, -1, 109, 114, 108, -1, 29, 112, 101, -1, 94, 91, 105, -1, 10, 33, 17, -1, 118, 116, 59, -1, 103, 114, 113, -1, 112, 115, 100, -1, 95, 96, 111, -1, 25, 95, 112, -1, 37, 116, 118, -1, 17, 118, 117, -1, 86, 60, 10, -1, 59, 86, 117, -1, 34, 10, 85, -1, 60, 9, 85, -1, 30, 99, 106, -1, 106, 107, 30, -1, 29, 113, 44, -1, 104, 105, 113, -1, 97, 98, 109, -1, 102, 101, 100, -1, 102, 68, 101, -1, 69, 105, 104, -1, 101, 68, 69, -1, 40, 97, 110, -1, 110, 108, 40, -1, 106, 99, 115, -1, 115, 111, 106, -1, 96, 107, 111, -1, 110, 97, 109, -1, 76, 108, 114, -1, 110, 109, 108, -1, 109, 113, 114, -1, 103, 76, 114, -1, 99, 100, 115, -1, 112, 111, 115, -1, 112, 95, 111, -1, 29, 25, 112, -1, 17, 37, 118, -1, 10, 17, 117, -1, 117, 86, 10, -1, 36, 86, 116, -1, 59, 116, 86, -1, 10, 60, 85, -1
                    ]
                    creaseAngle 0.5
                }
                }
            ]
            name "led8"
            color [
                0 1 0
            ]
        }
        DEF EPUCK_FRONT_LED LED {
            translation 0.0125 0.0285 -0.031
            children [
                Shape {
                appearance PBRAppearance {
                    baseColor 0.8 0.8 0.8
                    transparency 0.3
                    roughness 0.2
                    metalness 0.5
                }
                geometry Sphere {
                    radius 0.0025
                }
                castShadows FALSE
                }
            ]
            name "led9"
            color [
                1 0.3 0
            ]
        }
        DEF EPUCK_SMALL_LOGO Transform {
            translation 0 0.031 0.035
            rotation 0 1 0 3.14159
            children [
                Shape {
                appearance PBRAppearance {
                    baseColorMap ImageTexture {
                    url [
                        "textures/rescue.png"
                    ]
                    }
                    roughness 0.4
                    metalness 0
                }
                geometry IndexedFaceSet {
                    coord Coordinate {
                    point [
                        0.005 -0.005 0
                        -0.005 -0.005 0
                        -0.005 0.005 0
                        0.005 0.005 0
                    ]
                    }
                    texCoord TextureCoordinate {
                    point [
                        0 0
                        1 0
                        1 1
                        0 1
                    ]
                    }
                    coordIndex [
                    0, 1, 2, 3
                    ]
                    texCoordIndex [
                    0, 1, 2, 3
                    ]
                }
                castShadows FALSE
                }
            ]
        }
        DEF EPUCK_RECEIVER Receiver {
            channel IS receiver_channel
            allowedChannels [ 111 ]
        }
        DEF EPUCK_EMITTER Emitter {
            channel IS emitter_channel
            allowedChannels [ 11 ]
        }
        Solid {
            translation 0 0.001 -0.034
            name "ballCaster1"
            contactMaterial "NO_FRIC"
            boundingObject Transform {
                children [
                Sphere {
                    radius 0.001
                }
                ]
            }
            physics Physics {
                density -1
                mass 0.1
            }
        }
        Solid {
            translation 0 0.001 0.034
            name "ballCaster2"
            contactMaterial "NO_FRIC"
            boundingObject Transform {
                children [
                Sphere {
                    radius 0.001
                }
                ]
            }
            physics Physics {
                density -1
                mass 0.1
            }
        }