summaryrefslogtreecommitdiff
path: root/simulation/protos/Ball.proto
diff options
context:
space:
mode:
authorAbel Tim <atim@main.home>2024-07-25 16:53:53 +0200
committerAbel Tim <atim@main.home>2024-07-25 16:53:53 +0200
commit2a1cbf393270baef150354459de22a06bab016cc (patch)
treeb39860b4f64b3d12f85551600e3505e39287aea9 /simulation/protos/Ball.proto
parentcaf8e05494fac2bfa96e1f410b4c444b139b6480 (diff)
downloadrobotica-2a1cbf393270baef150354459de22a06bab016cc.tar.gz
robotica-2a1cbf393270baef150354459de22a06bab016cc.zip
sim
Diffstat (limited to 'simulation/protos/Ball.proto')
-rw-r--r--simulation/protos/Ball.proto53
1 files changed, 53 insertions, 0 deletions
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"
+ }
+}