sdformat icon indicating copy to clipboard operation
sdformat copied to clipboard

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

Open qingyouzhao opened this issue 11 months ago • 2 comments

Context

In various documentations in the SDF spec, units kilograms, meters and seconds are used for different physical properties. For example:

Problem

This created some ambiguity around inferring units:

  1. In places where units are not clearly stated, for example in geometry, should one assume all geometries are defined in meters?
  2. In a included mesh in mesh_shape, 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 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. This would be more tedious to implement but makes units more explicit

qingyouzhao avatar Mar 25 '24 16:03 qingyouzhao

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. This would be more tedious to implement but makes units more explicit

I prefer option 1, and the we refer to ROS REP 103, which defines standard units for ROS.

scpeters avatar Apr 01 '24 18:04 scpeters

I'd prefer option 1 as well. I think for mesh files, the mesh loader should be implemented such that if the file format has a convention of using a different unit (e.g. centimeters), it would convert the values to meters during import.

azeey avatar May 06 '24 16:05 azeey