gazebosim / gazebosim/sdformat

Consider declare meter-kilogram-second units officially as part of the specification.

Open
#1,385 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
216
Forks
125
Avg merge
1d 14h
Merged PRs (30d)
14

Description

## Context

In various documentations in the SDF spec, units kilograms, meters and seconds are used for different physical properties.
For example:
- [kg and m in inertial](https://github.com/gazebosim/sdformat/blob/sdf14/sdf/1.11/inertial.sdf#L116-L232)
- [Meters in Specifying pose tutorial](https://github.com/gazebosim/sdformat/blob/sdf14/sdf/1.11/inertial.sdf#L116-L232)
However there is not a centralized place that states these are the official units of the sdformat.

## Problem

This created some ambiguity around inferring units:
1. In places where units are not clearly stated, for example in [geometry](https://github.com/gazebosim/sdformat/blob/sdf14/sdf/1.11/geometry.sdf), should one assume all geometries are defined in meters?
2. In a included mesh in [mesh_shape](https://github.com/gazebosim/sdformat/blob/sdf14/sdf/1.11/mesh_shape.sdf), should one assume mesh vertex locations are in meters even if the included mesh file might have another unit convention. For example, FBX files have [implied centimeters](https://forums.autodesk.com/t5/fbx-forum/fbx-units-and-scaling/td-p/9761576) although it is stated as an unit-less format.

## Proposal

Let's discuss options. There are a few options I can think of.
1. Define units in a centralized place and only document exceptions in individual schemas. This is the simplest way to disambiguate if everyone has been working with this assumption.
2. Define units explicitly as part of the schema similar to [angle vs radians in pose](https://github.com/gazebosim/sdformat/blob/sdf14/sdf/1.11/pose.sdf#L37). This would be more tedious to implement but makes units more explicit

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.