Skip to content

Commit 1e5be74

Browse files
authored
Merge pull request #1177 from gazebosim/scpeters/merge_12_13
Merge sdf12 ➡️ sdf13
2 parents 91a6ffc + 9a67dfd commit 1e5be74

15 files changed

+486
-57
lines changed

Changelog.md

+73-1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,53 @@
192192

193193
## libsdformat 12.X
194194

195+
### libsdformat 12.6.0 (2022-09-07)
196+
197+
1. Reduce the number of include dirs for sdformat.
198+
* [Pull request #1170](https://github.com/gazebosim/sdformat/pull/1170)
199+
200+
1. Add camera `optical_frame_id` element
201+
* [Pull request #1109](https://github.com/gazebosim/sdformat/pull/1109)
202+
203+
1. urdf: fix sensor/light pose for links lumped by fixed joints
204+
* [Pull request #1114](https://github.com/gazebosim/sdformat/pull/1114)
205+
206+
1. Removed USD component from SDFormat and move to gz-usd
207+
* [Pull request #1094](https://github.com/gazebosim/sdformat/pull/1094)
208+
209+
1. Fix URDF fixed joint reduction of SDF joints
210+
* [Pull request #1089](https://github.com/gazebosim/sdformat/pull/1089)
211+
212+
1. Test model name as `placement_frame`
213+
* [Pull request #1079](https://github.com/gazebosim/sdformat/pull/1079)
214+
215+
1. Test using `__model__`, `world` in `@attached_to`, `@relative_to`
216+
* [Pull request #1066](https://github.com/gazebosim/sdformat/pull/1066)
217+
218+
1. Remove unused sdf.hh.in template
219+
* [Pull request #1081](https://github.com/gazebosim/sdformat/pull/1081)
220+
221+
1. Readme: Ignition -> Gazebo
222+
* [Pull request #1080](https://github.com/gazebosim/sdformat/pull/1080)
223+
224+
1. Document major and minor SDFormat version numbers
225+
* [Pull request #1065](https://github.com/gazebosim/sdformat/pull/1065)
226+
227+
1. Add skybox URI
228+
* [Pull request #1037](https://github.com/gazebosim/sdformat/pull/1037)
229+
230+
1. Bash completion for flags
231+
* [Pull request #1042](https://github.com/gazebosim/sdformat/pull/1042)
232+
233+
1. Fix bug with resolving poses for joint sensors.
234+
* [Pull request #1033](https://github.com/gazebosim/sdformat/pull/1033)
235+
236+
1. sdf::Joint: Mutable versions of SensorByName and SensorByIndex
237+
* [Pull request #1031](https://github.com/gazebosim/sdformat/pull/1031)
238+
239+
1. Add Link::ResolveInertial API
240+
* [Pull request #1012](https://github.com/gazebosim/sdformat/pull/1012)
241+
195242
### libsdformat 12.5.0 (2022-05-12)
196243

197244
1. Add visibility mask to Lidar / Ray sensor
@@ -1203,7 +1250,32 @@
12031250

12041251
## libsdformat 9.X
12051252

1206-
### libsdformat 9.X.X (202X-XX-XX)
1253+
### libsdformat 9.9.0 (2022-09-07)
1254+
1255+
1. sdf/camera.sdf: fields for projection matrix
1256+
* [Pull request #1088](https://github.com/gazebosim/sdformat/pull/1088)
1257+
1258+
1. urdf: fix sensor/light pose for links lumped by fixed joints
1259+
* [Pull request #1114](https://github.com/gazebosim/sdformat/pull/1114)
1260+
1261+
1. Ensure relocatable config files
1262+
* [Pull request #419](https://github.com/gazebosim/sdformat/pull/419)
1263+
* [Pull request #1093](https://github.com/gazebosim/sdformat/pull/1093)
1264+
1265+
1. Test using `__model__`, `world` in @attached_to, @relative_to
1266+
* [Pull request #1066](https://github.com/gazebosim/sdformat/pull/1066)
1267+
1268+
1. Readme: Ignition -> Gazebo
1269+
* [Pull request #1080](https://github.com/gazebosim/sdformat/pull/1080)
1270+
1271+
1. Document major and minor SDFormat version numbers
1272+
* [Pull request #1065](https://github.com/gazebosim/sdformat/pull/1065)
1273+
1274+
1. Bash completion for flags
1275+
* [Pull request #1042](https://github.com/gazebosim/sdformat/pull/1042)
1276+
1277+
1. Add Link::ResolveInertial API
1278+
* [Pull request #1012](https://github.com/gazebosim/sdformat/pull/1012)
12071279

12081280
### libsdformat 9.8.0 (2022-04-26)
12091281

Migration.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ but with improved human-readability..
7070
1. USD component now is living in https://github.com/gazebosim/gz-usd as an
7171
independent package.
7272

73+
1. URDF parser now properly transforms poses for lights, projectors and sensors
74+
from gazebo extension tags that are moved to a new link during fixed joint
75+
reduction.
76+
+ [pull request 1114](https://github.com/osrf/sdformat/pull/1114)
77+
7378
## libsdformat 11.x to 12.0
7479

7580
An error is now emitted instead of a warning for a file containing more than
@@ -334,7 +339,12 @@ ABI was broken for `sdf::Element`, and restored on version 11.2.1.
334339
+ std::optional<std::string> GetMaxValueAsString() const;
335340
+ bool ValidateValue() const;
336341

337-
## libsdformat 9.8.0 to 9.8.1
342+
## libsdformat 9.8.0 to 9.9.0
343+
344+
### Additions
345+
346+
1. **sdf/Camera.hh**
347+
+ Get/Set functions for Camera projection matrix parameters.
338348

339349
### Modifications
340350

include/sdf/Camera.hh

+78-16
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,20 @@ namespace sdf
348348
/// \param[in] _frame The name of the pose relative-to frame.
349349
public: void SetPoseRelativeTo(const std::string &_frame);
350350

351+
/// \brief Get the name of the coordinate frame relative to which this
352+
/// object's camera_info message header is expressed.
353+
/// Note: while Gazebo interprets the camera frame to be looking towards +X,
354+
/// other tools, such as ROS interprets this frame as looking towards +Z.
355+
/// The Camera sensor assumes that the color and depth images are captured
356+
/// at the same frame_id.
357+
/// \return The name of the frame this camera uses in its camera_info topic.
358+
public: const std::string OpticalFrameId() const;
359+
360+
/// \brief Set the name of the coordinate frame relative to which this
361+
/// object's camera_info is expressed.
362+
/// \param[in] _frame The frame this camera uses in its camera_info topic.
363+
public: void SetOpticalFrameId(const std::string &_frame);
364+
351365
/// \brief Get the lens type. This is the type of the lens mapping.
352366
/// Supported values are gnomonical, stereographic, equidistant,
353367
/// equisolid_angle, orthographic, custom. For gnomonical (perspective)
@@ -433,38 +447,86 @@ namespace sdf
433447
/// \param[in] _size The lens environment texture size.
434448
public: void SetLensEnvironmentTextureSize(int _size);
435449

436-
/// \brief Get the lens X focal length in pixels.
437-
/// \return The lens X focal length in pixels.
450+
/// \brief Get the lens intrinsic matrix X focal length in pixels.
451+
/// \return The lens X focal length in pixels for the intrinsic matrix.
438452
public: double LensIntrinsicsFx() const;
439453

440-
/// \brief Set the lens X focal length in pixels.
441-
/// \param[in] _fx The lens X focal length in pixels.
454+
/// \brief Set the lens intrinsic matrix X focal length in pixels.
455+
/// \param[in] _fx The intrinsic matrix lens X focal length in pixels.
442456
public: void SetLensIntrinsicsFx(double _fx);
443457

444-
/// \brief Get the lens Y focal length in pixels.
445-
/// \return The lens Y focal length in pixels.
458+
/// \brief Get the lens intrinsic matrix Y focal length in pixels.
459+
/// \return The lens intrinsic matrix Y focal length in pixels.
446460
public: double LensIntrinsicsFy() const;
447461

448-
/// \brief Set the lens Y focal length in pixels.
449-
/// \param[in] _fy The lens Y focal length in pixels.
462+
/// \brief Set the lens intrinsic matrix Y focal length in pixels.
463+
/// \param[in] _fy The lens intrinsic matrix Y focal length in pixels.
450464
public: void SetLensIntrinsicsFy(double _fy);
451465

452-
/// \brief Get the lens X principal point in pixels.
453-
/// \return The lens X principal point in pixels.
466+
/// \brief Get the lens intrinsic matrix X principal point in pixels.
467+
/// \return The lens intrinsic matrix X principal point in pixels.
454468
public: double LensIntrinsicsCx() const;
455469

456-
/// \brief Set the lens X principal point in pixels.
457-
/// \param[in] _cx The lens X principal point in pixels.
470+
/// \brief Set the lens intrinsic matrix X principal point in pixels.
471+
/// \param[in] _cx The lens intrinsic matrix X principal point in pixels.
458472
public: void SetLensIntrinsicsCx(double _cx);
459473

460-
/// \brief Get the lens Y principal point in pixels.
461-
/// \return The lens Y principal point in pixels.
474+
/// \brief Get the lens intrinsic matrix Y principal point in pixels.
475+
/// \return The lens intrinsic matrix Y principal point in pixels.
462476
public: double LensIntrinsicsCy() const;
463477

464-
/// \brief Set the lens Y principal point in pixels.
465-
/// \param[in] _cy The lens Y principal point in pixels.
478+
/// \brief Set the lens intrinsic matrix Y principal point in pixels.
479+
/// \param[in] _cy The lens intrinsic matrix Y principal point in pixels.
466480
public: void SetLensIntrinsicsCy(double _cy);
467481

482+
/// \brief Get the lens projection matrix X focal length in pixels.
483+
/// \return The lens projection matrix X focal length in pixels.
484+
public: double LensProjectionFx() const;
485+
486+
/// \brief Set the lens projection matrix X focal length in pixels.
487+
/// \param[in] _fx_p The lens projection matrix X focal length in pixels.
488+
public: void SetLensProjectionFx(double _fx_p);
489+
490+
/// \brief Get the lens projection matrix Y focal length in pixels.
491+
/// \return The lens projection matrix Y focal length in pixels.
492+
public: double LensProjectionFy() const;
493+
494+
/// \brief Set the lens projection matrix Y focal length in pixels.
495+
/// \param[in] _fy_p The lens projection matrix Y focal length in pixels.
496+
public: void SetLensProjectionFy(double _fy_p);
497+
498+
/// \brief Get the lens projection matrix X principal point in pixels.
499+
/// \return The lens projection matrix X principal point in pixels.
500+
public: double LensProjectionCx() const;
501+
502+
/// \brief Set the lens projection matrix X principal point in pixels.
503+
/// \param[in] _cx_p The lens projection matrix X principal point in pixels.
504+
public: void SetLensProjectionCx(double _cx_p);
505+
506+
/// \brief Get the lens projection matrix Y principal point in pixels.
507+
/// \return The lens projection matrix Y principal point in pixels.
508+
public: double LensProjectionCy() const;
509+
510+
/// \brief Set the lens projection matrix Y principal point in pixels.
511+
/// \param[in] _cy_p The lens projection matrix Y principal point in pixels.
512+
public: void SetLensProjectionCy(double _cy_p);
513+
514+
/// \brief Get the lens projection matrix X translation in pixels.
515+
/// \return The lens projection matrix X translation in pixels.
516+
public: double LensProjectionTx() const;
517+
518+
/// \brief Set the lens projection matrix X translation in pixels.
519+
/// \param[in] _tx The lens projection matrix X translation in pixels.
520+
public: void SetLensProjectionTx(double _tx);
521+
522+
/// \brief Get the lens projection matrix Y translation in pixels.
523+
/// \return The lens projection matrix Y translation in pixels.
524+
public: double LensProjectionTy() const;
525+
526+
/// \brief Set the lens projection matrix Y translation in pixels.
527+
/// \param[in] _ty The lens projection matrix Y translation in pixels.
528+
public: void SetLensProjectionTy(double _ty);
529+
468530
/// \brief Get the lens XY axis skew.
469531
/// \return The lens XY axis skew.
470532
public: double LensIntrinsicsSkew() const;

sdf/1.10/camera.sdf

+26
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,37 @@
190190
<description>XY axis skew</description>
191191
</element>
192192
</element> <!-- End Intrinsics -->
193+
194+
<element name="projection" required="0">
195+
<description>Camera projection matrix P for overriding camera intrinsic matrix K values so that users can configure P independently of K. This is useful when working with stereo cameras where P may be different from K due to the transform between the two cameras.</description>
196+
<element name="p_fx" type="double" default="277" required="0">
197+
<description>X focal length for projection matrix(in pixels, overrides fx)</description>
198+
</element>
199+
<element name="p_fy" type="double" default="277" required="0">
200+
<description>Y focal length for projection matrix(in pixels, overrides fy)</description>
201+
</element>
202+
<element name="p_cx" type="double" default="160" required="0">
203+
<description>X principal point for projection matrix(in pixels, overrides cx)</description>
204+
</element>
205+
<element name="p_cy" type="double" default="120" required="0">
206+
<description>Y principal point for projection matrix(in pixels, overrides cy)</description>
207+
</element>
208+
<element name="tx" type="double" default="0.0" required="0">
209+
<description>X translation for projection matrix (in pixels)</description>
210+
</element>
211+
<element name="ty" type="double" default="0.0" required="0">
212+
<description>Y translation for projection matrix (in pixels)</description>
213+
</element>
214+
</element> <!-- End Projection -->
193215
</element> <!-- End Lens -->
194216

195217
<element name="visibility_mask" type="unsigned int" default="4294967295" required="0">
196218
<description><![CDATA[Visibility mask of a camera. When (camera's visibility_mask & visual's visibility_flags) evaluates to non-zero, the visual will be visible to the camera.]]></description>
197219
</element>
198220

221+
<element name="optical_frame_id" type="string" default="" required="0">
222+
<description>An optional frame id name to be used in the camera_info message header.</description>
223+
</element>
224+
199225
<include filename="pose.sdf" required="0"/>
200226
</element> <!-- End Camera -->

sdf/1.7/camera.sdf

+26
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,37 @@
155155
<description>XY axis skew</description>
156156
</element>
157157
</element> <!-- End Intrinsics -->
158+
159+
<element name="projection" required="0">
160+
<description>Camera projection matrix P for overriding camera intrinsic matrix K values so that users can configure P independently of K. This is useful when working with stereo cameras where P may be different from K due to the transform between the two cameras.</description>
161+
<element name="p_fx" type="double" default="277" required="0">
162+
<description>X focal length for projection matrix(in pixels, overrides fx)</description>
163+
</element>
164+
<element name="p_fy" type="double" default="277" required="0">
165+
<description>Y focal length for projection matrix(in pixels, overrides fy)</description>
166+
</element>
167+
<element name="p_cx" type="double" default="160" required="0">
168+
<description>X principal point for projection matrix(in pixels, overrides cx)</description>
169+
</element>
170+
<element name="p_cy" type="double" default="120" required="0">
171+
<description>Y principal point for projection matrix(in pixels, overrides cy)</description>
172+
</element>
173+
<element name="tx" type="double" default="0.0" required="0">
174+
<description>X translation for projection matrix (in pixels)</description>
175+
</element>
176+
<element name="ty" type="double" default="0.0" required="0">
177+
<description>Y translation for projection matrix (in pixels)</description>
178+
</element>
179+
</element> <!-- End Projection -->
158180
</element> <!-- End Lens -->
159181

160182
<element name="visibility_mask" type="unsigned int" default="4294967295" required="0">
161183
<description><![CDATA[Visibility mask of a camera. When (camera's visibility_mask & visual's visibility_flags) evaluates to non-zero, the visual will be visible to the camera.]]></description>
162184
</element>
163185

186+
<element name="optical_frame_id" type="string" default="" required="0">
187+
<description>An optional frame id name to be used in the camera_info message header.</description>
188+
</element>
189+
164190
<include filename="pose.sdf" required="0"/>
165191
</element> <!-- End Camera -->

sdf/1.8/camera.sdf

+26
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,37 @@
155155
<description>XY axis skew</description>
156156
</element>
157157
</element> <!-- End Intrinsics -->
158+
159+
<element name="projection" required="0">
160+
<description>Camera projection matrix P for overriding camera intrinsic matrix K values so that users can configure P independently of K. This is useful when working with stereo cameras where P may be different from K due to the transform between the two cameras.</description>
161+
<element name="p_fx" type="double" default="277" required="0">
162+
<description>X focal length for projection matrix(in pixels, overrides fx)</description>
163+
</element>
164+
<element name="p_fy" type="double" default="277" required="0">
165+
<description>Y focal length for projection matrix(in pixels, overrides fy)</description>
166+
</element>
167+
<element name="p_cx" type="double" default="160" required="0">
168+
<description>X principal point for projection matrix(in pixels, overrides cx)</description>
169+
</element>
170+
<element name="p_cy" type="double" default="120" required="0">
171+
<description>Y principal point for projection matrix(in pixels, overrides cy)</description>
172+
</element>
173+
<element name="tx" type="double" default="0.0" required="0">
174+
<description>X translation for projection matrix (in pixels)</description>
175+
</element>
176+
<element name="ty" type="double" default="0.0" required="0">
177+
<description>Y translation for projection matrix (in pixels)</description>
178+
</element>
179+
</element> <!-- End Projection -->
158180
</element> <!-- End Lens -->
159181

160182
<element name="visibility_mask" type="unsigned int" default="4294967295" required="0">
161183
<description><![CDATA[Visibility mask of a camera. When (camera's visibility_mask & visual's visibility_flags) evaluates to non-zero, the visual will be visible to the camera.]]></description>
162184
</element>
163185

186+
<element name="optical_frame_id" type="string" default="" required="0">
187+
<description>An optional frame id name to be used in the camera_info message header.</description>
188+
</element>
189+
164190
<include filename="pose.sdf" required="0"/>
165191
</element> <!-- End Camera -->

sdf/1.9/camera.sdf

+26
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,37 @@
190190
<description>XY axis skew</description>
191191
</element>
192192
</element> <!-- End Intrinsics -->
193+
194+
<element name="projection" required="0">
195+
<description>Camera projection matrix P for overriding camera intrinsic matrix K values so that users can configure P independently of K. This is useful when working with stereo cameras where P may be different from K due to the transform between the two cameras.</description>
196+
<element name="p_fx" type="double" default="277" required="0">
197+
<description>X focal length for projection matrix(in pixels, overrides fx)</description>
198+
</element>
199+
<element name="p_fy" type="double" default="277" required="0">
200+
<description>Y focal length for projection matrix(in pixels, overrides fy)</description>
201+
</element>
202+
<element name="p_cx" type="double" default="160" required="0">
203+
<description>X principal point for projection matrix(in pixels, overrides cx)</description>
204+
</element>
205+
<element name="p_cy" type="double" default="120" required="0">
206+
<description>Y principal point for projection matrix(in pixels, overrides cy)</description>
207+
</element>
208+
<element name="tx" type="double" default="0.0" required="0">
209+
<description>X translation for projection matrix (in pixels)</description>
210+
</element>
211+
<element name="ty" type="double" default="0.0" required="0">
212+
<description>Y translation for projection matrix (in pixels)</description>
213+
</element>
214+
</element> <!-- End Projection -->
193215
</element> <!-- End Lens -->
194216

195217
<element name="visibility_mask" type="unsigned int" default="4294967295" required="0">
196218
<description><![CDATA[Visibility mask of a camera. When (camera's visibility_mask & visual's visibility_flags) evaluates to non-zero, the visual will be visible to the camera.]]></description>
197219
</element>
198220

221+
<element name="optical_frame_id" type="string" default="" required="0">
222+
<description>An optional frame id name to be used in the camera_info message header.</description>
223+
</element>
224+
199225
<include filename="pose.sdf" required="0"/>
200226
</element> <!-- End Camera -->

src/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ if (WIN32)
121121
endif()
122122

123123
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME}
124-
PUBLIC
125-
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
126-
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/..>
127124
PRIVATE
128125
${CMAKE_CURRENT_SOURCE_DIR}
129126
)

0 commit comments

Comments
 (0)