From 2a1cbf393270baef150354459de22a06bab016cc Mon Sep 17 00:00:00 2001 From: Abel Tim Date: Thu, 25 Jul 2024 16:53:53 +0200 Subject: sim --- simulation/protos/Ball.proto | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 simulation/protos/Ball.proto (limited to 'simulation/protos/Ball.proto') diff --git a/simulation/protos/Ball.proto b/simulation/protos/Ball.proto new file mode 100644 index 0000000..c992189 --- /dev/null +++ b/simulation/protos/Ball.proto @@ -0,0 +1,53 @@ +#VRML_SIM R2023b utf8 +# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots. +# license url: https://cyberbotics.com/webots_assets_license +# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/objects/balls/protos/Ball.proto +# keywords: exterior/sport +# The Ball's size, mass and color correspond to the soccer ball used in the Robocup SPL. +# You can change the centerOfMass to [0 0 0] to avoid the random rolling effect. + +PROTO Ball [ + field SFVec3f translation 0 0 0.1625 + field SFRotation rotation 0 0 1 0 + field SFString name "ball" + field SFColor color 1.0 0.54 0.08 # Defines the color of the ball. + field SFFloat radius 0.0325 # Defines the radius of the ball. + field SFFloat mass 0.055 # Defines the mass of the ball. + field MFVec3f centerOfMass [0 0 -0.0001] # Defines the center of mass of the ball. + field SFFloat linearDamping 0.17 # Defines the linear damping of the ball. + field SFFloat angularDamping 0.33 # Defines the angular damping of the ball. + field SFString contactMaterial "default" # Is `Solid.contactMaterial`. +] +{ + Solid { + translation IS translation + rotation IS rotation + children [ + DEF BALL_SHAPE Shape { + appearance PBRAppearance { + baseColor IS color + roughness 0.3 + metalness 0 + } + geometry Sphere { + radius IS radius + subdivision 4 + } + } + ] + contactMaterial IS contactMaterial + boundingObject USE BALL_SHAPE + physics Physics { + density -1 + mass IS mass + centerOfMass IS centerOfMass + inertiaMatrix [ 0.000023 0.000023 0.000023, 0 0 0 ] + damping Damping { + linear IS linearDamping + angular IS angularDamping + } + } + name IS name + model "ball" + } +} -- cgit v1.2.3