Skip to content

Commit ce712c8

Browse files
authored
Copy 1.9 spec to 1.10 (#1073)
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
1 parent 51e19d7 commit ce712c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3363
-4
lines changed

Migration.md

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ but with improved human-readability..
1414

1515
## libsdformat 12.x to 13.x
1616

17+
### Additions
18+
19+
1. **New SDFormat specification version 1.10**
20+
+ Details about the 1.9 to 1.10 transition are explained below in this same
21+
document
22+
1723
### Deprecations
1824

1925
- The `ignition` namespace is deprecated and will be removed in future versions.
@@ -507,6 +513,8 @@ ABI was broken for `sdf::Element`, and restored on version 11.2.1.
507513
+ Changed to `_fixed_joint_lump__` to avoid confusion with scoped names
508514
+ [BitBucket pull request 245](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/245)
509515

516+
## SDFormat specification 1.9 to 1.10
517+
510518
## SDFormat specification 1.8 to 1.9
511519

512520
### Additions

sdf/1.10/1_9.convert

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<convert name="sdf">
2+
</convert> <!-- End SDF -->

sdf/1.10/CMakeLists.txt

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
set (sdfs
2+
actor.sdf
3+
air_pressure.sdf
4+
altimeter.sdf
5+
atmosphere.sdf
6+
audio_source.sdf
7+
audio_sink.sdf
8+
battery.sdf
9+
box_shape.sdf
10+
camera.sdf
11+
capsule_shape.sdf
12+
collision.sdf
13+
contact.sdf
14+
cylinder_shape.sdf
15+
ellipsoid_shape.sdf
16+
frame.sdf
17+
forcetorque.sdf
18+
geometry.sdf
19+
gps.sdf
20+
gripper.sdf
21+
gui.sdf
22+
heightmap_shape.sdf
23+
image_shape.sdf
24+
imu.sdf
25+
inertial.sdf
26+
joint.sdf
27+
lidar.sdf
28+
light.sdf
29+
light_state.sdf
30+
link.sdf
31+
link_state.sdf
32+
logical_camera.sdf
33+
magnetometer.sdf
34+
material.sdf
35+
mesh_shape.sdf
36+
model.sdf
37+
model_state.sdf
38+
noise.sdf
39+
particle_emitter.sdf
40+
physics.sdf
41+
plane_shape.sdf
42+
plugin.sdf
43+
polyline_shape.sdf
44+
population.sdf
45+
pose.sdf
46+
projector.sdf
47+
ray.sdf
48+
rfidtag.sdf
49+
rfid.sdf
50+
road.sdf
51+
root.sdf
52+
scene.sdf
53+
sensor.sdf
54+
spherical_coordinates.sdf
55+
sphere_shape.sdf
56+
sonar.sdf
57+
state.sdf
58+
surface.sdf
59+
transceiver.sdf
60+
visual.sdf
61+
world.sdf
62+
)
63+
64+
set (SDF_SCHEMA)
65+
66+
foreach(FIL ${sdfs})
67+
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
68+
get_filename_component(FIL_WE ${FIL} NAME_WE)
69+
70+
list(APPEND SDF_SCHEMA "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd")
71+
72+
add_custom_command(
73+
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
74+
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
75+
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
76+
DEPENDS ${ABS_FIL}
77+
COMMENT "Running xml schema compiler on ${FIL}"
78+
VERBATIM)
79+
endforeach()
80+
81+
add_custom_target(schema1_10 ALL DEPENDS ${SDF_SCHEMA})
82+
83+
set_source_files_properties(${SDF_SCHEMA} PROPERTIES GENERATED TRUE)
84+
85+
install(FILES 1_9.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.10)
86+
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.10)

sdf/1.10/actor.sdf

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!-- Actor -->
2+
<element name="actor" required="*">
3+
<description>A special kind of model which can have a scripted motion. This includes both global waypoint type animations and skeleton animations.</description>
4+
5+
<attribute name="name" type="string" default="__default__" required="1">
6+
<description>A unique name for the actor.</description>
7+
</attribute>
8+
9+
<include filename="pose.sdf" required="0"/>
10+
11+
<element name="skin" required="0">
12+
<description>Skin file which defines a visual and the underlying skeleton which moves it.</description>
13+
14+
<element name="filename" type="string" default="__default__" required="1">
15+
<description>Path to skin file, accepted formats: COLLADA, BVH.</description>
16+
</element>
17+
18+
<element name="scale" type="double" default="1.0" required="0">
19+
<description>Scale the skin's size.</description>
20+
</element>
21+
</element> <!-- End Skin -->
22+
23+
<element name="animation" required="*">
24+
<description>Animation file defines an animation for the skeleton in the skin. The skeleton must be compatible with the skin skeleton.</description>
25+
26+
<attribute name="name" type="string" default="__default__" required="1">
27+
<description>Unique name for animation.</description>
28+
</attribute>
29+
30+
<element name="filename" type="string" default="__default__" required="1">
31+
<description>Path to animation file. Accepted formats: COLLADA, BVH.</description>
32+
</element>
33+
<element name="scale" type="double" default="1.0" required="0">
34+
<description>Scale for the animation skeleton.</description>
35+
</element>
36+
<element name="interpolate_x" type="bool" default="false" required="0">
37+
<description>Set to true so the animation is interpolated on X.</description>
38+
</element>
39+
</element> <!-- End Animation -->
40+
41+
<element name="script" required="1">
42+
<description>Adds scripted trajectories to the actor.</description>
43+
44+
<element name="loop" type="bool" default="true" required="0">
45+
<description>Set this to true for the script to be repeated in a loop. For a fluid continuous motion, make sure the last waypoint matches the first one.</description>
46+
</element>
47+
48+
<element name="delay_start" type="double" default="0.0" required="0">
49+
<description>This is the time to wait before starting the script. If running in a loop, this time will be waited before starting each cycle.</description>
50+
</element>
51+
52+
<element name="auto_start" type="bool" default="true" required="0">
53+
<description>Set to true if the animation should start as soon as the simulation starts playing. It is useful to set this to false if the animation should only start playing only when triggered by a plugin, for example.</description>
54+
</element>
55+
56+
<element name="trajectory" required="*">
57+
<description>The trajectory contains a series of keyframes to be followed.</description>
58+
<attribute name="id" type="int" default="0" required="1">
59+
<description>Unique id for a trajectory.</description>
60+
</attribute>
61+
62+
<attribute name="type" type="string" default="__default__" required="1">
63+
<description>If it matches the type of an animation, they will be played at the same time.</description>
64+
</attribute>
65+
66+
<attribute name="tension" type="double" default="0.0" required="0" min="0.0" max="1.0">
67+
<description>The tension of the trajectory spline. The default value of zero equates to a Catmull-Rom spline, which may also cause the animation to overshoot keyframes. A value of one will cause the animation to stick to the keyframes.</description>
68+
</attribute>
69+
70+
<element name="waypoint" required="*">
71+
<description>Each point in the trajectory.</description>
72+
<element name="time" type="double" default="0.0" required="1">
73+
<description>The time in seconds, counted from the beginning of the script, when the pose should be reached.</description>
74+
</element>
75+
<element name="pose" type="pose" default="0 0 0 0 0 0" required="1">
76+
<description>The pose which should be reached at the given time.</description>
77+
</element> <!-- End Pose -->
78+
</element> <!-- End Waypoint -->
79+
</element> <!-- End Trajectory -->
80+
</element> <!-- End Script -->
81+
82+
<include filename="link.sdf" required="+"/>
83+
<include filename="joint.sdf" required="*"/>
84+
<include filename="plugin.sdf" required="*"/>
85+
86+
</element> <!-- End Actor -->

sdf/1.10/air_pressure.sdf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<element name="air_pressure" required="0">
2+
<description>These elements are specific to an air pressure sensor.</description>
3+
4+
<element name="reference_altitude" type="double" default="0.0" required="0">
5+
<description>The initial altitude in meters. This value can be used by a sensor implementation to augment the altitude of the sensor. For example, if you are using simulation instead of creating a 1000 m mountain model on which to place your sensor, you could instead set this value to 1000 and place your model on a ground plane with a Z height of zero.</description>
6+
</element>
7+
8+
<element name="pressure" required="0">
9+
<description>
10+
Noise parameters for the pressure data.
11+
</description>
12+
<include filename="noise.sdf" required="0"/>
13+
</element>
14+
15+
</element>

sdf/1.10/altimeter.sdf

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<element name="altimeter" required="0">
2+
<description>These elements are specific to an altimeter sensor.</description>
3+
4+
<element name="vertical_position" required="0">
5+
<description>
6+
Noise parameters for vertical position
7+
</description>
8+
<include filename="noise.sdf" required="0"/>
9+
</element>
10+
11+
<element name="vertical_velocity" required="0">
12+
<description>
13+
Noise parameters for vertical velocity
14+
</description>
15+
<include filename="noise.sdf" required="0"/>
16+
</element>
17+
18+
</element>

sdf/1.10/atmosphere.sdf

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Atmosphere -->
2+
<element name="atmosphere" required="1">
3+
<description>The atmosphere tag specifies the type and properties of the atmosphere model.</description>
4+
5+
<attribute name="type" type="string" default="adiabatic" required="1">
6+
<description>The type of the atmosphere engine. Current options are adiabatic. Defaults to adiabatic if left unspecified.</description>
7+
</attribute>
8+
9+
<element name="temperature" type="double" default="288.15" required="0">
10+
<description>Temperature at sea level in kelvins.</description>
11+
</element>
12+
13+
<element name="pressure" type="double" default="101325" required="0">
14+
<description>Pressure at sea level in pascals.</description>
15+
</element>
16+
17+
<element name="temperature_gradient" type="double" default="-0.0065" required="0">
18+
<description>Temperature gradient with respect to increasing altitude at sea level in units of K/m.</description>
19+
</element>
20+
21+
</element> <!-- Atmosphere -->

sdf/1.10/audio_sink.sdf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- Audio Sink -->
2+
<element name="audio_sink" required="*">
3+
<description>An audio sink.</description>
4+
</element>

sdf/1.10/audio_source.sdf

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Audio Source -->
2+
<element name="audio_source" required="*">
3+
<description>An audio source.</description>
4+
5+
<element name="uri" type="string" default="__default__" required="1">
6+
<description>URI of the audio media.</description>
7+
</element>
8+
9+
<element name="pitch" type="double" default="1.0" required="0">
10+
<description>Pitch for the audio media, in Hz</description>
11+
</element>
12+
13+
<element name="gain" type="double" default="1.0" required="0">
14+
<description>Gain for the audio media, in dB.</description>
15+
</element>
16+
17+
<element name="contact" required="0">
18+
<description>List of collision objects that will trigger audio playback.</description>
19+
<element name="collision" type="string" default="__default__" required="+">
20+
<description>Name of child collision element that will trigger audio playback.</description>
21+
</element>
22+
</element>
23+
24+
<element name="loop" type="bool" default="false" required="0">
25+
<description>True to make the audio source loop playback.</description>
26+
</element>
27+
28+
<include filename="pose.sdf" required="0"/>
29+
30+
</element>

sdf/1.10/battery.sdf

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- Battery -->
2+
<element name="battery" required="*">
3+
<description>Description of a battery.</description>
4+
5+
<attribute name="name" type="string" default="__default__" required="1">
6+
<description>Unique name for the battery.</description>
7+
</attribute>
8+
9+
<element name="voltage" type="double" default="0.0" required="1">
10+
<description>Initial voltage in volts.</description>
11+
</element>
12+
</element>

sdf/1.10/box_shape.sdf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<element name="box" required="0">
2+
<description>Box shape</description>
3+
<element name="size" type="vector3" default="1 1 1" required="1">
4+
<description>The three side lengths of the box. The origin of the box is in its geometric center (inside the center of the box).</description>
5+
</element>
6+
</element>

0 commit comments

Comments
 (0)