Ardupilot2/libraries/SITL/examples/Webots_Python/protos/ArucoMarker.proto
Ian d358ca1b32 SITL: Add Webots 2023a support and examples
The various C Webots controllers are replaced by a single Python controller
- More readable (in my opinion)
- Does not require compilation
- Easily modifiable to run user code
- Can be blackboxed and configured via arguments when designing a robot model
- Optionally provides the ability to stream camera images over TCP
- Generalizable to copters and rovers (and probably more)
- Supports multi-vehicle simulation (including of multiple types)
- Requires no non-standard libraries (neither does current)

Higher fidelity example worlds
- Iris quadcopter demo world similar to gazebo
- Crazyflie quadcopter demo world (crazyflie models baked into webots)
- Pioneer3at rover demo world (pioneer models baked into webots)
2023-01-22 18:19:38 +11:00

57 lines
1.4 KiB
Protocol Buffer

# VRML_SIM R2022b utf8
# template language: javascript
PROTO ArucoMarker [
field SFVec3f translation 0 0 0
field SFRotation rotation 0 0 1 0
field SFString name "aruco" # Defines the name of the aruco board.
field SFFloat size 0.1 # Defines size of the markers.
field SFString{"0", "1", "2", "3", "4", "5", "6", "7", "8"}
markerId "0" # Defines the marker id.
]
{
Solid {
translation IS translation
rotation IS rotation
name IS name
children [
# marker slightly in front of the border
Transform {
translation 0 0 1e-3
children [
Shape {
appearance PBRAppearance {
baseColor 1 1 1
metalness 0
roughness 0.6
%< let markerTexture = "textures/aruco_" + fields.markerId.value + ".png"; >%
baseColorMap ImageTexture {
url "%<= markerTexture >%"
}
}
geometry Plane {
size %<= fields.size.value >% %<= fields.size.value >%
}
}
]
}
# while boarder
Shape {
appearance PBRAppearance {
baseColor 1 1 1
metalness 0
roughness 0.6
}
geometry Plane {
size %<= fields.size.value * 8/6 >% %<= fields.size.value * 8/6 >%
}
}
]
}
}