Skip to content

Commit

Permalink
Merge pull request #894 from ignitionrobotics/merge12main
Browse files Browse the repository at this point in the history
Merge 12 -> main
  • Loading branch information
scpeters authored Mar 22, 2022
2 parents e648189 + 4128545 commit 6e7336c
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 4 deletions.
94 changes: 94 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,100 @@

## libsdformat 11.X

### libsdformat 11.4.1 (2022-03-21)

1. Install sdf/1.8 to versioned path
* [Pull request #898](https://github.com/ignitionrobotics/sdformat/pull/898)

### libsdformat 11.4.0 (2022-03-14)

1. Added option to visualize light on the GUI
* [Pull request #877](https://github.com/ignitionrobotics/sdformat/pull/877)

1. Fix joint parent/child frame existence checks to include interface elements
* [Pull request #855](https://github.com/ignitionrobotics/sdformat/pull/855)

1. Added to light whether it is on or off
* [Pull request #851](https://github.com/ignitionrobotics/sdformat/pull/851)

1. Allow model frames (__model__) to be used as joint parent or child
* [Pull request #833](https://github.com/ignitionrobotics/sdformat/pull/833)

1. Add ParserConfig flag for preserveFixedJoint
* [Pull request #815](https://github.com/ignitionrobotics/sdformat/pull/815)

1. Fix compiler warnings
* [Pull request #808](https://github.com/ignitionrobotics/sdformat/pull/808)

1. `sdf_custom`: fix nested model expectations
* [Pull request #807](https://github.com/ignitionrobotics/sdformat/pull/807)

1. Fix test compilation with `USE_INTERNAL_URDF`
* [Pull request #800](https://github.com/ignitionrobotics/sdformat/pull/800)

1. Replace custom CMake code with `ign-cmake2`
* [Pull request #780](https://github.com/ignitionrobotics/sdformat/pull/780)

1. Fix loading nested include with custom attributes
* [Pull request #789](https://github.com/ignitionrobotics/sdformat/pull/789)

1. Documentation
1. Clarify behavior of `//model/model/static`
* [Pull request #713](https://github.com/ignitionrobotics/sdformat/pull/713)
1. Only allow one `canonical_link` attribute for model
* [Pull request #716](https://github.com/ignitionrobotics/sdformat/pull/716)
1. Don't mention elements that can't be included
* [Pull request #715](https://github.com/ignitionrobotics/sdformat/pull/715)
1. Clarify documentation on `//pose/@relative_to` in the spec
* [Pull request #666](https://github.com/ignitionrobotics/sdformat/pull/666)
1. Remove duplicate link documentation
* [Pull request #702](https://github.com/ignitionrobotics/sdformat/pull/702)

1. Fix URDF fixed joint reduction of plugins
* [Pull request #745](https://github.com/ignitionrobotics/sdformat/pull/745)

1. Add `enable_orientation` to 1.6 spec
* [Pull request #686](https://github.com/ignitionrobotics/sdformat/pull/686)

1. Remove outdated deprecation note from `parser_urdf.hh`
* [Pull request #740](https://github.com/ignitionrobotics/sdformat/pull/740)

1. Add Joint DOM API to access joint sensors
* [Pull request #517](https://github.com/ignitionrobotics/sdformat/pull/517)

1. Add force torque sensor
* [Pull request #393](https://github.com/ignitionrobotics/sdformat/pull/393)
* [Pull request #669](https://github.com/ignitionrobotics/sdformat/pull/669)

1. Check joint parent link names in `Model::Load`
* [Pull request #726](https://github.com/ignitionrobotics/sdformat/pull/726)

1. Check joint parent/child names in `Root::Load`
* [Pull request #727](https://github.com/ignitionrobotics/sdformat/pull/727)

1. Remove empty `//inertial/pose/@relative_to` during 1_7->1.8 conversion
* [Pull request #720](https://github.com/ignitionrobotics/sdformat/pull/720)

1. Fix `xyz` and `rpy` offsets in fixed joint reduction
* [Pull request #500](https://github.com/ignitionrobotics/sdformat/pull/500)

1. Infrastructure updates
* [Pull request #674](https://github.com/ignitionrobotics/sdformat/pull/674)
* [Pull request #650](https://github.com/ignitionrobotics/sdformat/pull/650)
* [Pull request #626](https://github.com/ignitionrobotics/sdformat/pull/626)
* [Pull request #258](https://github.com/ignitionrobotics/sdformat/pull/258)
* [Pull request #237](https://github.com/ignitionrobotics/sdformat/pull/237)
* [Pull request #730](https://github.com/ignitionrobotics/sdformat/pull/730)

1. Translate poses of nested models inside other nested models
* [Pull request #596](https://github.com/ignitionrobotics/sdformat/pull/596)

1. Fix flattening logic for nested model names
* [Pull request #597](https://github.com/ignitionrobotics/sdformat/pull/597)

1. Parse `rpyOffset` as radians
* [Pull request #497](https://github.com/ignitionrobotics/sdformat/pull/497)

### libsdformat 11.3.0 (2021-09-10)

1. Fix world-complete.sdf and add particle_scatter_ratio to v1.8
Expand Down
8 changes: 8 additions & 0 deletions include/sdf/Light.hh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ namespace sdf
/// \param[in] _cast True to indicate that the light is on, False otherwise.
public: void SetLightOn(const bool _isLightOn);

/// \brief Whether light visualization in the GUI is enabled.
/// \return True if visualization is enabled.
public: bool Visualize() const;

/// \brief Set whether light visualization in the GUI is enabled.
/// \param[in] _visualize True to view the light on the GUI.
public: void SetVisualize(const bool _visualize);

/// \brief Get the light intensity
/// \return The light intensity
public: double Intensity() const;
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.8/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ add_custom_target(schema1_8 ALL DEPENDS ${SDF_SCHEMA})

set_source_files_properties(${SDF_SCHEMA} PROPERTIES GENERATED TRUE)

install(FILES 1_7.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${SDF_MAJOR_VERSION}/1.8)
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${SDF_MAJOR_VERSION}/1.8)
install(FILES 1_7.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.8)
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.8)
4 changes: 4 additions & 0 deletions sdf/1.8/light.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<description>When true, the light is on.</description>
</element>

<element name="visualize" type="bool" default="true" required="0">
<description>If true, the light is visualized in the GUI</description>
</element>

<element name="intensity" type="double" default="1" required="0">
<description>Scale factor to set the relative power of a light.</description>
</element>
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.9/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ add_custom_target(schema1_9 ALL DEPENDS ${SDF_SCHEMA})

set_source_files_properties(${SDF_SCHEMA} PROPERTIES GENERATED TRUE)

install(FILES 1_8.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${SDF_MAJOR_VERSION}/1.9)
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${SDF_MAJOR_VERSION}/1.9)
install(FILES 1_8.convert ${sdfs} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.9)
install(FILES ${SDF_SCHEMA} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/1.9)
18 changes: 18 additions & 0 deletions src/Light.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class sdf::Light::Implementation

/// \brief Is light on ?
public: bool isLightOn = true;

/// \brief is visual light enabled ?
public: bool visualize = true;
};

/////////////////////////////////////////////////
Expand Down Expand Up @@ -148,6 +151,9 @@ Errors Light::Load(ElementPtr _sdf)
this->dataPtr->isLightOn = _sdf->Get<bool>("light_on",
this->dataPtr->isLightOn).first;

this->dataPtr->visualize = _sdf->Get<bool>("visualize",
this->dataPtr->visualize).first;

this->dataPtr->castShadows = _sdf->Get<bool>("cast_shadows",
this->dataPtr->castShadows).first;

Expand Down Expand Up @@ -335,6 +341,18 @@ void Light::SetLightOn(const bool _isLightOn)
this->dataPtr->isLightOn = _isLightOn;
}

/////////////////////////////////////////////////
bool Light::Visualize() const
{
return this->dataPtr->visualize;
}

/////////////////////////////////////////////////
void Light::SetVisualize(const bool _visualize)
{
this->dataPtr->visualize = _visualize;
}

/////////////////////////////////////////////////
ignition::math::Color Light::Diffuse() const
{
Expand Down
12 changes: 12 additions & 0 deletions src/Light_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ TEST(DOMLight, DefaultConstruction)
light.SetLightOn(false);
EXPECT_FALSE(light.LightOn());

EXPECT_TRUE(light.Visualize());
light.SetVisualize(false);
EXPECT_FALSE(light.Visualize());

EXPECT_FALSE(light.CastShadows());
light.SetCastShadows(true);
EXPECT_TRUE(light.CastShadows());
Expand Down Expand Up @@ -118,6 +122,7 @@ TEST(DOMLight, CopyConstructor)
light.SetPoseRelativeTo("ground_plane");
light.SetCastShadows(true);
light.SetLightOn(false);
light.SetVisualize(false);
light.SetDiffuse(ignition::math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(ignition::math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetAttenuationRange(3.2);
Expand All @@ -137,6 +142,7 @@ TEST(DOMLight, CopyConstructor)
EXPECT_EQ("ground_plane", light2.PoseRelativeTo());
EXPECT_TRUE(light2.CastShadows());
EXPECT_FALSE(light2.LightOn());
EXPECT_FALSE(light2.Visualize());
EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 1), light2.Diffuse());
EXPECT_EQ(ignition::math::Color(0.8f, 0.9f, 0.1f, 1), light2.Specular());
EXPECT_DOUBLE_EQ(3.2, light2.AttenuationRange());
Expand All @@ -160,6 +166,7 @@ TEST(DOMLight, CopyAssignmentOperator)
light.SetPoseRelativeTo("ground_plane");
light.SetCastShadows(true);
light.SetLightOn(false);
light.SetVisualize(false);
light.SetDiffuse(ignition::math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(ignition::math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetAttenuationRange(3.2);
Expand All @@ -180,6 +187,7 @@ TEST(DOMLight, CopyAssignmentOperator)
EXPECT_EQ("ground_plane", light2.PoseRelativeTo());
EXPECT_TRUE(light2.CastShadows());
EXPECT_FALSE(light2.LightOn());
EXPECT_FALSE(light2.Visualize());
EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 1), light2.Diffuse());
EXPECT_EQ(ignition::math::Color(0.8f, 0.9f, 0.1f, 1), light2.Specular());
EXPECT_DOUBLE_EQ(3.2, light2.AttenuationRange());
Expand All @@ -203,6 +211,7 @@ TEST(DOMLight, MoveConstructor)
light.SetPoseRelativeTo("ground_plane");
light.SetCastShadows(true);
light.SetLightOn(false);
light.SetVisualize(false);
light.SetDiffuse(ignition::math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(ignition::math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetAttenuationRange(3.2);
Expand All @@ -222,6 +231,7 @@ TEST(DOMLight, MoveConstructor)
EXPECT_EQ("ground_plane", light2.PoseRelativeTo());
EXPECT_TRUE(light2.CastShadows());
EXPECT_FALSE(light2.LightOn());
EXPECT_FALSE(light2.Visualize());
EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 1), light2.Diffuse());
EXPECT_EQ(ignition::math::Color(0.8f, 0.9f, 0.1f, 1), light2.Specular());
EXPECT_DOUBLE_EQ(3.2, light2.AttenuationRange());
Expand All @@ -245,6 +255,7 @@ TEST(DOMLight, MoveAssignment)
light.SetPoseRelativeTo("ground_plane");
light.SetCastShadows(true);
light.SetLightOn(false);
light.SetVisualize(false);
light.SetDiffuse(ignition::math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(ignition::math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetAttenuationRange(3.2);
Expand All @@ -265,6 +276,7 @@ TEST(DOMLight, MoveAssignment)
EXPECT_EQ("ground_plane", light2.PoseRelativeTo());
EXPECT_TRUE(light2.CastShadows());
EXPECT_FALSE(light2.LightOn());
EXPECT_FALSE(light2.Visualize());
EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 1), light2.Diffuse());
EXPECT_EQ(ignition::math::Color(0.8f, 0.9f, 0.1f, 1), light2.Specular());
EXPECT_DOUBLE_EQ(3.2, light2.AttenuationRange());
Expand Down

0 comments on commit 6e7336c

Please sign in to comment.