Skip to content

Commit

Permalink
Merge branch 'main' into nkoenig/remove-ign
Browse files Browse the repository at this point in the history
  • Loading branch information
azeey authored Aug 4, 2023
2 parents 2fa2477 + 91876e7 commit 673e816
Show file tree
Hide file tree
Showing 69 changed files with 3,530 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ project (sdformat14 VERSION 14.0.0)

# The protocol version has nothing to do with the package version.
# It represents the current version of SDFormat implemented by the software
set (SDF_PROTOCOL_VERSION 1.10)
set (SDF_PROTOCOL_VERSION 1.11)

OPTION(SDFORMAT_DISABLE_CONSOLE_LOGFILE "Disable the sdformat console logfile" OFF)

Expand Down
2 changes: 2 additions & 0 deletions sdf/1.11/1_10.convert
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<convert name="sdf">
</convert> <!-- End SDF -->
88 changes: 88 additions & 0 deletions sdf/1.11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
set (sdfs
actor.sdf
air_pressure.sdf
air_speed.sdf
altimeter.sdf
atmosphere.sdf
audio_source.sdf
audio_sink.sdf
battery.sdf
box_shape.sdf
camera.sdf
capsule_shape.sdf
collision.sdf
contact.sdf
cylinder_shape.sdf
ellipsoid_shape.sdf
frame.sdf
forcetorque.sdf
geometry.sdf
gps.sdf
gripper.sdf
gui.sdf
heightmap_shape.sdf
image_shape.sdf
imu.sdf
inertial.sdf
joint.sdf
lidar.sdf
light.sdf
light_state.sdf
link.sdf
link_state.sdf
logical_camera.sdf
magnetometer.sdf
material.sdf
mesh_shape.sdf
model.sdf
model_state.sdf
navsat.sdf
noise.sdf
particle_emitter.sdf
physics.sdf
plane_shape.sdf
plugin.sdf
polyline_shape.sdf
population.sdf
pose.sdf
projector.sdf
ray.sdf
rfidtag.sdf
rfid.sdf
road.sdf
root.sdf
scene.sdf
sensor.sdf
spherical_coordinates.sdf
sphere_shape.sdf
sonar.sdf
state.sdf
surface.sdf
transceiver.sdf
visual.sdf
world.sdf
)

set (SDF_SCHEMA)

foreach(FIL ${sdfs})
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
get_filename_component(FIL_WE ${FIL} NAME_WE)

list(APPEND SDF_SCHEMA "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd")

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
endforeach()

add_custom_target(schema1_11 ALL DEPENDS ${SDF_SCHEMA})

set_source_files_properties(${SDF_SCHEMA} PROPERTIES GENERATED TRUE)

install(FILES 1_10.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.11)
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.11)
86 changes: 86 additions & 0 deletions sdf/1.11/actor.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!-- Actor -->
<element name="actor" required="*">
<description>A special kind of model which can have a scripted motion. This includes both global waypoint type animations and skeleton animations.</description>

<attribute name="name" type="string" default="__default__" required="1">
<description>A unique name for the actor.</description>
</attribute>

<include filename="pose.sdf" required="0"/>

<element name="skin" required="0">
<description>Skin file which defines a visual and the underlying skeleton which moves it.</description>

<element name="filename" type="string" default="__default__" required="1">
<description>Path to skin file, accepted formats: COLLADA, BVH.</description>
</element>

<element name="scale" type="double" default="1.0" required="0">
<description>Scale the skin's size.</description>
</element>
</element> <!-- End Skin -->

<element name="animation" required="*">
<description>Animation file defines an animation for the skeleton in the skin. The skeleton must be compatible with the skin skeleton.</description>

<attribute name="name" type="string" default="__default__" required="1">
<description>Unique name for animation.</description>
</attribute>

<element name="filename" type="string" default="__default__" required="1">
<description>Path to animation file. Accepted formats: COLLADA, BVH.</description>
</element>
<element name="scale" type="double" default="1.0" required="0">
<description>Scale for the animation skeleton.</description>
</element>
<element name="interpolate_x" type="bool" default="false" required="0">
<description>Set to true so the animation is interpolated on X.</description>
</element>
</element> <!-- End Animation -->

<element name="script" required="1">
<description>Adds scripted trajectories to the actor.</description>

<element name="loop" type="bool" default="true" required="0">
<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>
</element>

<element name="delay_start" type="double" default="0.0" required="0">
<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>
</element>

<element name="auto_start" type="bool" default="true" required="0">
<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>
</element>

<element name="trajectory" required="*">
<description>The trajectory contains a series of keyframes to be followed.</description>
<attribute name="id" type="int" default="0" required="1">
<description>Unique id for a trajectory.</description>
</attribute>

<attribute name="type" type="string" default="__default__" required="1">
<description>If it matches the type of an animation, they will be played at the same time.</description>
</attribute>

<attribute name="tension" type="double" default="0.0" required="0" min="0.0" max="1.0">
<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>
</attribute>

<element name="waypoint" required="*">
<description>Each point in the trajectory.</description>
<element name="time" type="double" default="0.0" required="1">
<description>The time in seconds, counted from the beginning of the script, when the pose should be reached.</description>
</element>
<element name="pose" type="pose" default="0 0 0 0 0 0" required="1">
<description>The pose which should be reached at the given time.</description>
</element> <!-- End Pose -->
</element> <!-- End Waypoint -->
</element> <!-- End Trajectory -->
</element> <!-- End Script -->

<include filename="link.sdf" required="+"/>
<include filename="joint.sdf" required="*"/>
<include filename="plugin.sdf" required="*"/>

</element> <!-- End Actor -->
15 changes: 15 additions & 0 deletions sdf/1.11/air_pressure.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<element name="air_pressure" required="0">
<description>These elements are specific to an air pressure sensor.</description>

<element name="reference_altitude" type="double" default="0.0" required="0">
<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>
</element>

<element name="pressure" required="0">
<description>
Noise parameters for the pressure data.
</description>
<include filename="noise.sdf" required="0"/>
</element>

</element>
11 changes: 11 additions & 0 deletions sdf/1.11/air_speed.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<element name="air_speed" required="0">
<description>These elements are specific to an air speed sensor. This sensor determines speed based on the differential between static and dynamic pressure.</description>

<element name="pressure" required="0">
<description>
Noise parameters for the pressure data.
</description>
<include filename="noise.sdf" required="0"/>
</element>

</element>
18 changes: 18 additions & 0 deletions sdf/1.11/altimeter.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<element name="altimeter" required="0">
<description>These elements are specific to an altimeter sensor.</description>

<element name="vertical_position" required="0">
<description>
Noise parameters for vertical position
</description>
<include filename="noise.sdf" required="0"/>
</element>

<element name="vertical_velocity" required="0">
<description>
Noise parameters for vertical velocity
</description>
<include filename="noise.sdf" required="0"/>
</element>

</element>
21 changes: 21 additions & 0 deletions sdf/1.11/atmosphere.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Atmosphere -->
<element name="atmosphere" required="1">
<description>The atmosphere tag specifies the type and properties of the atmosphere model.</description>

<attribute name="type" type="string" default="adiabatic" required="1">
<description>The type of the atmosphere engine. Current options are adiabatic. Defaults to adiabatic if left unspecified.</description>
</attribute>

<element name="temperature" type="double" default="288.15" required="0">
<description>Temperature at sea level in kelvins.</description>
</element>

<element name="pressure" type="double" default="101325" required="0">
<description>Pressure at sea level in pascals.</description>
</element>

<element name="temperature_gradient" type="double" default="-0.0065" required="0">
<description>Temperature gradient with respect to increasing altitude at sea level in units of K/m.</description>
</element>

</element> <!-- Atmosphere -->
4 changes: 4 additions & 0 deletions sdf/1.11/audio_sink.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Audio Sink -->
<element name="audio_sink" required="*">
<description>An audio sink.</description>
</element>
30 changes: 30 additions & 0 deletions sdf/1.11/audio_source.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Audio Source -->
<element name="audio_source" required="*">
<description>An audio source.</description>

<element name="uri" type="string" default="__default__" required="1">
<description>URI of the audio media.</description>
</element>

<element name="pitch" type="double" default="1.0" required="0">
<description>Pitch for the audio media, in Hz</description>
</element>

<element name="gain" type="double" default="1.0" required="0">
<description>Gain for the audio media, in dB.</description>
</element>

<element name="contact" required="0">
<description>List of collision objects that will trigger audio playback.</description>
<element name="collision" type="string" default="__default__" required="+">
<description>Name of child collision element that will trigger audio playback.</description>
</element>
</element>

<element name="loop" type="bool" default="false" required="0">
<description>True to make the audio source loop playback.</description>
</element>

<include filename="pose.sdf" required="0"/>

</element>
12 changes: 12 additions & 0 deletions sdf/1.11/battery.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Battery -->
<element name="battery" required="*">
<description>Description of a battery.</description>

<attribute name="name" type="string" default="__default__" required="1">
<description>Unique name for the battery.</description>
</attribute>

<element name="voltage" type="double" default="0.0" required="1">
<description>Initial voltage in volts.</description>
</element>
</element>
6 changes: 6 additions & 0 deletions sdf/1.11/box_shape.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<element name="box" required="0">
<description>Box shape</description>
<element name="size" type="vector3" default="1 1 1" required="1">
<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>
</element>
</element>
Loading

0 comments on commit 673e816

Please sign in to comment.