Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config schemas #7

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ find_package(Rock)

rock_init()
rock_standard_layout()

install(DIRECTORY configuration/schema/ DESTINATION share/envire_types/schema)
24 changes: 24 additions & 0 deletions configuration/schema/Inertial_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name:
type: string
required: true
mass:
type: number
required: true
xx:
type: number
required: true
xy:
type: number
required: true
xz:
type: number
required: true
yy:
type: number
required: true
yz:
type: number
required: true
zz:
type: number
required: true
3 changes: 3 additions & 0 deletions configuration/schema/Link_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name:
type: string
required: true
6 changes: 6 additions & 0 deletions configuration/schema/World_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name:
type: string
required: true
prefix:
type: string
required: true
82 changes: 82 additions & 0 deletions configuration/schema/geometry/Box_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name:
type: string
required: true
size:
type: object
required: true
properties:
x:
type: number
required: true
y:
type: number
required: true
z:
type: number
required: true
material:
type: object
properties:
name:
type: string
ambientColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
diffuseColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
specularColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
shininess:
type: number
textureFilename:
type: string
75 changes: 75 additions & 0 deletions configuration/schema/geometry/Capsule_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name:
type: string
required: true
radius:
type: number
required: true
length:
type: number
required: true
material:
type: object
properties:
name:
type: string
ambientColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
diffuseColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
specularColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
shininess:
type: number
textureFilename:
type: string
75 changes: 75 additions & 0 deletions configuration/schema/geometry/Cylinder_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name:
type: string
required: true
radius:
type: number
required: true
length:
type: number
required: true
material:
type: object
properties:
name:
type: string
ambientColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
diffuseColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
specularColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
shininess:
type: number
textureFilename:
type: string
69 changes: 69 additions & 0 deletions configuration/schema/geometry/Heightfield_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name:
type: string
required: true
material:
type: object
properties:
name:
type: string
ambientColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
diffuseColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
specularColor:
type: object
properties:
r:
type: number
minimum: 0.0
maximum: 1.0
g:
type: number
minimum: 0.0
maximum: 1.0
b:
type: number
minimum: 0.0
maximum: 1.0
a:
type: number
minimum: 0.0
maximum: 1.0
shininess:
type: number
textureFilename:
type: string
Loading