Skip to content

Commit

Permalink
Excavation squares (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirVincan authored Nov 23, 2021
1 parent 77034e7 commit f74f626
Show file tree
Hide file tree
Showing 9 changed files with 237 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mep3_simulation/webots_data/protos/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.cache
*.cache
.clang-format
171 changes: 171 additions & 0 deletions mep3_simulation/webots_data/protos/ExcavationSquare.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#VRML_SIM R2021b utf8
# template language: javascript

PROTO ExcavationSquare [
field SFString name "excavation_square"
field SFVec3f translation 0 0 0
field SFRotation rotation 0 1 0 0
field SFBool flipped FALSE
field SFFloat POSITION -0.4
field SFFloat MIN_STOP -0.401426
field SFFloat MAX_STOP 2
field SFString{"yellow1", "yellow2", "purple1", "purple2", "red"} frontTexture "yellow1"
]
{
Solid {
translation IS translation
rotation IS rotation
children [
Group {
children [
DEF EXCAVATION_SQUARE_BOUNDING Transform {
translation 0 -0.0075 0.035
children [
Shape {
appearance DEF WALL_APPEARANCE PBRAppearance {
baseColor 0.631 0.612 0.537
roughness 1
metalness 0
}
geometry Box {
size 0.185 0.015 0.07
}
}
]
}
Transform {
translation -0.085 -0.0425 0.0075
children [
DEF EXCAVATION_SQUARE_BOTTOM_BOX Shape {
appearance USE WALL_APPEARANCE
geometry Box {
size 0.015 0.055 0.015
}
}
]
}
Transform {
translation 0.085 -0.0425 0.0075
children [
USE EXCAVATION_SQUARE_BOTTOM_BOX
]
}
Transform {
translation -0.085 -0.02925 0.0425
children [
DEF EXCAVATION_SQUARE_FIRST_BOX Shape {
appearance USE WALL_APPEARANCE
geometry Box {
size 0.015 0.0285 0.055
}
}
]
}
Transform {
translation 0.085 -0.02925 0.0425
children [
USE EXCAVATION_SQUARE_FIRST_BOX
]
}
Transform {
translation -0.085 -0.06175 0.0425
children [
DEF EXCAVATION_SQUARE_SECOND_BOX Shape {
appearance USE WALL_APPEARANCE
geometry Box {
size 0.015 0.0165 0.055
}
}
]
}
Transform {
translation 0.085 -0.06175 0.0425
children [
USE EXCAVATION_SQUARE_SECOND_BOX
]
}
]
}
HingeJoint {
jointParameters HingeJointParameters {
position IS POSITION
anchor 0 -0.0485 0.02
minStop IS MIN_STOP
maxStop IS MAX_STOP
}
endPoint Solid {
translation 0 -0.0485 0.02
rotation 1 0 0 %<= (fields.flipped.value) ? 3.2 : -0.4 >%
children [
Transform {
translation 0 0 0.064
children [
Shape {
appearance USE WALL_APPEARANCE
geometry Box {
size 0.15 0.021 0.15
}
}
]
}
Transform {
translation 0 0.0105 0.064
children [
Shape {
appearance PBRAppearance {
baseColorMap ImageTexture {
url [ %<= '"assets/samples/excSq_' + fields.frontTexture.value + '.png"' >% ]
repeatS FALSE
repeatT FALSE
}
roughness 1
metalness 0
}
geometry Box {
size 0.15 0.001 0.15
}
}
]
}
Transform {
translation 0 0 0.139785
children [
Shape {
appearance PBRAppearance {
baseColor 0.768627 0.627451 0
baseColorMap ImageTexture {
url ["assets/samples/pcb.png"]
repeatS FALSE
repeatT FALSE
}
roughness 1
metalness 0
}
geometry Box {
size 0.1 0.02 0.00157
}
}
]
}
]
boundingObject Transform {
translation 0 0 0.064
children [
Shape {
appearance PBRAppearance {
}
geometry Box {
size 0.15 0.022 0.15
}
}
]
}
physics Physics {
}
}
}
]
name IS name
boundingObject USE EXCAVATION_SQUARE_BOUNDING
locked TRUE
}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions mep3_simulation/webots_data/worlds/assets/samples/pcb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions mep3_simulation/webots_data/worlds/eurobot_2022.wbt
Original file line number Diff line number Diff line change
Expand Up @@ -675,3 +675,49 @@ Robot {
}
controller "<extern>"
}
ExcavationSquare {
name "excSq0"
translation -0.8325 -1.022 0
}
ExcavationSquare {
name "excSq1"
translation -0.6475 -1.022 0
}
ExcavationSquare {
name "excSq2"
translation -0.4625 -1.022 0
frontTexture "red"
}
ExcavationSquare {
name "excSq3"
translation -0.2775 -1.022 0
frontTexture "purple1"
}
ExcavationSquare {
name "excSq4"
translation -0.0925 -1.022 0
}
ExcavationSquare {
name "excSq5"
translation 0.0925 -1.022 0
}
ExcavationSquare {
name "excSq6"
translation 0.2775 -1.022 0
frontTexture "purple1"
}
ExcavationSquare {
name "excSq7"
translation 0.4625 -1.022 0
frontTexture "red"
}
ExcavationSquare {
name "excSq8"
translation 0.6475 -1.022 0
frontTexture "purple1"
}
ExcavationSquare {
name "excSq9"
translation 0.8325 -1.022 0
frontTexture "purple1"
}

0 comments on commit f74f626

Please sign in to comment.