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

Align empty world with upstream #336

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions cpp/scenario/gazebo/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,17 @@ std::string utils::getWorldNameFromSdf(const std::string& fileName,

std::string utils::getEmptyWorld()
{
// The empty world matches default.sdf from upstream without models
const std::string world = R""""(<?xml version="1.0" ?>
<sdf version="1.6">
<world name="default">
<physics default="true" type="dart">
<physics default="true" type="ignored">
Copy link
Member

Choose a reason for hiding this comment

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

This is not a spec compliant SDF, but this is definitely not related to this PR, I opened gazebosim/sdformat#550 for track the actual problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I think that currently Ignition supports selecting physics engine through the PhysicsEnginePlugin introduced in gazebosim/gz-sim#136 (couldn't find the actual PR). I already have a local branch that I'm about to push that introduces that component in our logic. I'm not really sure whether the /world/physics@type attribute is even read nor supported in Ignition.

Copy link
Member Author

Choose a reason for hiding this comment

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

Btw, I'll proceed merging as it is. We can update it as soon as we figure this out, both current and new attributes are not breaking any existing logic.

</physics>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>0.5 0.5 0.5 1</specular>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx/info/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ extracting it from the simulator with :cpp:func:`~scenario::gazebo::GazeboSimula
<?xml version="1.0" ?>
<sdf version="1.7">
<world name="default">
<physics default="true" type="dart">
<physics default="true" type="ignored">
</physics>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>0.5 0.5 0.5 1</specular>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
Expand Down