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

Automatic Moment of Inertia Calculations for Basic Shapes #1299

Merged
merged 92 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
93e497e
Copy sdf 1.10 to 1.11
jasmeet0915 Jun 13, 2023
bf33df2
Bumped sdf 1.10 to sdf 1.11
jasmeet0915 Jun 19, 2023
9450574
Update SDF schema version in CMakeLists.txt
jasmeet0915 Jun 27, 2023
0841705
Added <material_density> element to <collision
jasmeet0915 Jun 19, 2023
1c27bfc
Added auto attribute to <inertia> tag
jasmeet0915 Jun 19, 2023
8a1f8a7
Added gz::math::Material member to Collision
jasmeet0915 Jun 26, 2023
e3fc2a3
Added MassMatrix() functions to Box, Capsule, Cylinder, Ellipsoid & S…
jasmeet0915 Jul 3, 2023
dbe7d3e
Added MassMatrix() functions to sdf::Geometry class
jasmeet0915 Jul 3, 2023
45a67bd
Replaced gz::math::Material member of sdf::Collision with double density
jasmeet0915 Jul 3, 2023
db76c5f
Added getter setter functions for density in sdf::Collision
jasmeet0915 Jul 3, 2023
7290483
Added MassMatrix() function to sdf::Collision class
jasmeet0915 Jul 3, 2023
c8120ae
Update Link::Load() to check for inertia auto attr & call MassMatrix …
jasmeet0915 Jul 3, 2023
42a4707
Cleaned up the Code
jasmeet0915 Jul 13, 2023
bbacbe9
Corrected default density value
jasmeet0915 Jul 17, 2023
b092904
Corrected function comments
jasmeet0915 Jul 17, 2023
c3c52aa
Changed <material_density> tag to <density>
jasmeet0915 Jul 31, 2023
8ff8726
Updated Collision:MassMatrix() to use gz::math::Inertial object as pa…
jasmeet0915 Jul 13, 2023
0cd267b
Updated Link::Load() to add inertials from multiple collisions
jasmeet0915 Jul 13, 2023
6881c2d
Shifted auto attribute from <inertia> to <inertial>
jasmeet0915 Aug 4, 2023
dd0551a
Added CalculateInertial() function to sdf::Root
jasmeet0915 Aug 7, 2023
8d0c084
Added CalculateInertial() function to sdf::Model
jasmeet0915 Aug 7, 2023
942bf78
Added CalculateInertial() function to sdf::World
jasmeet0915 Aug 7, 2023
1eeed1e
Added CalculateInertial() function to sdf::Link to check for auto and…
jasmeet0915 Aug 7, 2023
b6a8a7b
Update Collision::MassMatrix() to set inertial pose using collision p…
jasmeet0915 Aug 7, 2023
33d9979
Called World::CalculateInertials() in Root::Load() function
jasmeet0915 Aug 8, 2023
76842fe
Added check for no collisions when auto is true & return an Element M…
jasmeet0915 Aug 8, 2023
f486a1b
Used enforcePolicyCondition() to print <density> element missing mess…
jasmeet0915 Aug 10, 2023
429eb2f
Restored original flow of Link::Load() to set inertial values & updat…
jasmeet0915 Aug 10, 2023
b349c0d
Renamed & changed MassMatrix() functions for all shapes to return gz:…
jasmeet0915 Aug 10, 2023
5f11863
Renamed & updated MassMatrix() function for sdf::Geometry to return o…
jasmeet0915 Aug 10, 2023
8214ae6
Renamed & Updated MassMatrix() function of sdf::Collision to use Iner…
jasmeet0915 Aug 10, 2023
0d1e1bc
Updated call to collision inertia calculation function with the new name
jasmeet0915 Aug 10, 2023
b1f7a51
Removed print statements
jasmeet0915 Aug 10, 2023
702dd9f
Completed codecheck
jasmeet0915 Aug 10, 2023
67126dd
Merge branch 'main' into jasmeet/auto_moment_of_inertia
jasmeet0915 Aug 10, 2023
0a6a528
Removed const type qualifier from double density param for CalculateI…
jasmeet0915 Aug 11, 2023
138bdb4
Shifted check for density element from Collision::Load() to Collision…
jasmeet0915 Aug 11, 2023
fa1da0b
Shifted CalculateInertials() call to end of Root:Load()
jasmeet0915 Aug 11, 2023
9c6f8c5
Update CalculateInertials() function in Root, World, Model, Link & Co…
jasmeet0915 Aug 11, 2023
1a483a2
Completed codecheck
jasmeet0915 Aug 11, 2023
2f0c840
Removed const specifier for double density from Geometry & Collision
jasmeet0915 Aug 11, 2023
ac943c6
Corrected function comments
jasmeet0915 Aug 14, 2023
8fef740
Included <optional> header
jasmeet0915 Aug 14, 2023
80e321c
Removed warning for missing <inertial> element
jasmeet0915 Aug 17, 2023
e3041e4
Added warning for overwritting of user given inertial value sif auto …
jasmeet0915 Aug 17, 2023
cc9849c
Removed call to CalculateInertial() from Root::Load()
jasmeet0915 Aug 17, 2023
0e41116
Corrected codecheck
jasmeet0915 Aug 21, 2023
4731e21
Added unit tests for CalculateInertial() function in Box, Capsule, Cy…
jasmeet0915 Aug 22, 2023
3aefdc3
Added unit tests for CalculateInertial() in Geometry
jasmeet0915 Aug 22, 2023
2836be9
Updated construction unit test of Collision with checks for density v…
jasmeet0915 Aug 22, 2023
dbe543f
Updated CalculateInertial() unit test to test for std::nullopt return…
jasmeet0915 Aug 22, 2023
8d459c7
Added unit tests for CalculateInertial() in sdf::Collision
jasmeet0915 Aug 22, 2023
464f7de
Completed codecheck
jasmeet0915 Aug 22, 2023
5af78f7
Merge branch 'main' into jasmeet/auto_moment_of_inertia
jasmeet0915 Aug 22, 2023
485dd84
Added enum class for CalculateInertial() configuration
jasmeet0915 Aug 24, 2023
ca78026
Added check for CalculateInertialConfiguration in Root::Load()
jasmeet0915 Aug 24, 2023
002c643
Renamed CALCULATE_AND_SAVE value to SAVE_CALCULATION in COnfigureCalc…
jasmeet0915 Aug 24, 2023
1688522
Added boolean autoInertiaSaved member to link
jasmeet0915 Aug 24, 2023
230bde2
Added check for autoInertiaSaved & SAVE_CALCULATION configuration in …
jasmeet0915 Aug 24, 2023
0df7eae
Completed codecheck
jasmeet0915 Aug 24, 2023
5b58b11
Merge branch 'main' into jasmeet/auto_moment_of_inertia
jasmeet0915 Aug 24, 2023
dd06f08
Added //inertial/density to the spec
jasmeet0915 Aug 24, 2023
325854c
Updated Geometry::CalculateInertial() to accept density & parser conf…
jasmeet0915 Aug 24, 2023
fc01633
Updated Geometry::CalculateInertial() to give warning when a not supp…
jasmeet0915 Aug 24, 2023
d1e7484
Updated Geometry unit test for not supported geom type
jasmeet0915 Aug 24, 2023
88d5eeb
Updated Collision::ToElement() to set density
jasmeet0915 Aug 24, 2023
0ec1aac
Added unit tests for collision pose relative to some other frame test…
jasmeet0915 Aug 24, 2023
dc30cf9
Completed codecheck
jasmeet0915 Aug 24, 2023
40811cf
Added unit tests for ParserConfig
jasmeet0915 Aug 24, 2023
01c49c4
Added unit tests for Link
jasmeet0915 Aug 24, 2023
b5648ff
Replaced tabs with spaces in sdf string in Link_Test
jasmeet0915 Aug 24, 2023
4a2357a
Updated ParserConfig Unit test to test SetCalculateInertialConfigurat…
jasmeet0915 Aug 24, 2023
60131dd
Added test for CalculateInertial() called with auto set to false
jasmeet0915 Aug 24, 2023
a3cb221
Added unit test for World::CalculateInertial()
jasmeet0915 Aug 24, 2023
7483b89
Added unit test for CalculateInertial() call with SAVE_CALCULATION co…
jasmeet0915 Aug 24, 2023
e772c24
Included missing header files
jasmeet0915 Aug 25, 2023
f3cd3be
Removed redundant sdf/Model.hh include from Collision_TEST
jasmeet0915 Aug 26, 2023
ef8ae18
Merge branch 'main' into jasmeet/auto_moment_of_inertia
jasmeet0915 Aug 27, 2023
16ce852
Updated CalculateInertial() documentation for Box, Capsule, Cylinder,…
jasmeet0915 Aug 28, 2023
65c3703
Updated Collision::Density() & Collision::SetDensity() docs
jasmeet0915 Aug 28, 2023
fee0d90
Updated Root::CalculateInertial() docs
jasmeet0915 Aug 28, 2023
ff88720
Updated description for <density> element in <inertial>
jasmeet0915 Aug 28, 2023
af8052e
Added doc for autoInertiaSaved variable in sdf::Link
jasmeet0915 Aug 28, 2023
943b886
Update function APIs
jasmeet0915 Aug 28, 2023
a658c25
Added flag to track if density was set at load
jasmeet0915 Aug 28, 2023
d652717
Added separate variable to track if auto inertia is enabled or not
jasmeet0915 Aug 28, 2023
ec62766
Completed codecheck
jasmeet0915 Aug 28, 2023
c8f9fc4
Updated Collision::CalculateInertial() API
jasmeet0915 Aug 29, 2023
b05e267
Updated check for geometry type before resolving inertial pose
jasmeet0915 Aug 29, 2023
3a21b69
Updated Root::CalculateInertial() docs
jasmeet0915 Aug 29, 2023
91c828a
Added const specifier to variables where needed
jasmeet0915 Aug 29, 2023
1986cfd
Rename CalculateInertials() API in Root, World, Model & Link
jasmeet0915 Aug 30, 2023
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: 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
6 changes: 6 additions & 0 deletions include/sdf/Box.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
#ifndef SDF_BOX_HH_
#define SDF_BOX_HH_

#include <optional>

#include <gz/math/Box.hh>
#include <gz/math/Vector3.hh>
#include <gz/math/MassMatrix3.hh>
#include <gz/utils/ImplPtr.hh>
#include <sdf/Error.hh>
#include <sdf/Element.hh>
Expand Down Expand Up @@ -65,6 +68,9 @@ namespace sdf
/// \return A reference to a gz::math::Boxd object.
public: gz::math::Boxd &Shape();

/// \brief Calculate an return the Mass Matrix values for the Box
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Create and return an SDF element filled with data from this
/// box.
/// Note that parameter passing functionality is not captured with this
Expand Down
6 changes: 6 additions & 0 deletions include/sdf/Capsule.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
#ifndef SDF_CAPSULE_HH_
#define SDF_CAPSULE_HH_

#include <optional>

#include <gz/math/Capsule.hh>
#include <gz/math/MassMatrix3.hh>
#include <gz/utils/ImplPtr.hh>
#include <sdf/Error.hh>
#include <sdf/Element.hh>
Expand Down Expand Up @@ -72,6 +75,9 @@ namespace sdf
/// \return A reference to a gz::math::Capsuled object.
public: gz::math::Capsuled &Shape();

/// \brief Calculate an return the Mass Matrix values for the Capsule
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Create and return an SDF element filled with data from this
/// capsule.
/// Note that parameter passing functionality is not captured with this
Expand Down
21 changes: 21 additions & 0 deletions include/sdf/Collision.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <memory>
#include <string>
#include <gz/math/Pose3.hh>
#include <gz/math/Vector3.hh>
#include <gz/utils/ImplPtr.hh>
#include "sdf/Element.hh"
#include "sdf/SemanticPose.hh"
Expand Down Expand Up @@ -75,6 +76,16 @@ namespace sdf
/// \param[in] _name Name of the collision.
public: void SetName(const std::string &_name);

/// \brief Get the density of the collision.
/// The density of the collision must be unique within the scope of a Link.
azeey marked this conversation as resolved.
Show resolved Hide resolved
/// \return Density of the collision.
public: double Density() const;

/// \brief Set the density of the collision.
/// The density of the collision must be unique within the scope of a Link.
/// \param[in] _name Density of the collision.
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved
public: void SetDensity(const double density);

/// \brief Get a pointer to the collisions's geometry.
/// \return The collision's geometry.
public: const Geometry *Geom() const;
Expand Down Expand Up @@ -119,6 +130,16 @@ namespace sdf
/// \return SemanticPose object for this link.
public: sdf::SemanticPose SemanticPose() const;

/// \brief Calculate and return the MassMatrix for the collision
/// \param[in] _xxyyzz A vector 3d representing the diagonal elements
/// of the mass matrix
/// \param[in] _xyxzyx A vector 3d representing the off-diagonal elements
/// of the mass matrix
/// \param[in] _mass A double representing the mass of the collision
/// \return Errors, which is a vector of Error objects. Each Error includes
/// an error code and message. An empty vector indicates no error
public: Errors MassMatrix(gz::math::Vector3d &_xxyyzz, gz::math::Vector3d &_xyxzyz, double &_mass);

/// \brief Get a pointer to the SDF element that was used during
/// load.
/// \return SDF element pointer. The value will be nullptr if Load has
Expand Down
6 changes: 6 additions & 0 deletions include/sdf/Cylinder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
#ifndef SDF_CYLINDER_HH_
#define SDF_CYLINDER_HH_

#include <optional>

#include <gz/math/Cylinder.hh>
#include <gz/math/MassMatrix3.hh>
#include <gz/utils/ImplPtr.hh>
#include <sdf/Error.hh>
#include <sdf/Element.hh>
Expand Down Expand Up @@ -72,6 +75,9 @@ namespace sdf
/// \return A reference to a gz::math::Cylinderd object.
public: gz::math::Cylinderd &Shape();

/// \brief Calculate an return the Mass Matrix values for the Cylinder
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Create and return an SDF element filled with data from this
/// cylinder.
/// Note that parameter passing functionality is not captured with this
Expand Down
6 changes: 6 additions & 0 deletions include/sdf/Ellipsoid.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#ifndef SDF_ELLIPSOID_HH_
#define SDF_ELLIPSOID_HH_

#include <optional>

#include <gz/math/MassMatrix3.hh>
#include <gz/math/Ellipsoid.hh>
#include <gz/utils/ImplPtr.hh>
#include <sdf/Error.hh>
Expand Down Expand Up @@ -64,6 +67,9 @@ namespace sdf
/// \return A reference to a gz::math::Ellipsoidd object.
public: gz::math::Ellipsoidd &Shape();

/// \brief Calculate an return the Mass Matrix values for the Cylinder
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Create and return an SDF element filled with data from this
/// ellipsoid.
/// Note that parameter passing functionality is not captured with this
Expand Down
11 changes: 11 additions & 0 deletions include/sdf/Geometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#define SDF_GEOMETRY_HH_

#include <vector>
#include <optional>

#include <gz/utils/ImplPtr.hh>
#include <gz/math/MassMatrix3.hh>
#include <sdf/Error.hh>
#include <sdf/Element.hh>
#include <sdf/sdf_config.h>
Expand Down Expand Up @@ -209,6 +211,15 @@ namespace sdf
/// \param[in] _heightmap The heightmap shape.
public: void SetHeightmapShape(const Heightmap &_heightmap);

/// \brief Calculate and return the Mass Matrix values for the Geometry
/// \param[in] _xxyyzz A vector 3d representing the diagonal elements
/// of the mass matrix
/// \param[in] _xyxzyx A vector 3d representing the off-diagonal elements
/// of the mass matrix
/// \param[in] _density The density of the geometry element.
/// \return Boolean that indicates whether the calculation was successfull
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Get a pointer to the SDF element that was used during
/// load.
/// \return SDF element pointer. The value will be nullptr if Load has
Expand Down
6 changes: 6 additions & 0 deletions include/sdf/Sphere.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#ifndef SDF_SPHERE_HH_
#define SDF_SPHERE_HH_

#include <optional>

#include <gz/math/MassMatrix3.hh>
#include <gz/math/Sphere.hh>
#include <gz/utils/ImplPtr.hh>

Expand Down Expand Up @@ -65,6 +68,9 @@ namespace sdf
/// not been called.
public: sdf::ElementPtr Element() const;

/// \brief Calculate an return the Mass Matrix values for the Cylinder
public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density);
jasmeet0915 marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Create and return an SDF element filled with data from this
/// sphere.
/// Note that parameter passing functionality is not captured with this
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">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is empty ? remove ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the migration.md file in the 'Note on Backward Compatibility' section, the .convert files are used to facilitate forward conversion and are present in all the spec directories.

</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 ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${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>
Loading