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

Added Scene Python interfaace #992

Merged
merged 9 commits into from
Jun 21, 2022
Merged

Added Scene Python interfaace #992

merged 9 commits into from
Jun 21, 2022

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Apr 20, 2022

Signed-off-by: ahcorde ahcorde@gmail.com

🎉 New feature

This PR is part of this mete ticket #931

Summary

Added Scene Python interface

Test it

from sdformat import Scene

scene = Scene()

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde added scripting Scripting interfaces to Ignition mujoco labels Apr 20, 2022
@ahcorde ahcorde self-assigned this Apr 20, 2022
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Apr 20, 2022
@ahcorde ahcorde mentioned this pull request Apr 20, 2022
62 tasks
@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2022

Codecov Report

Merging #992 (f047feb) into main (7baa3ee) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #992   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files           2        2           
  Lines          27       27           
=======================================
  Hits           18       18           
  Misses          9        9           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7baa3ee...f047feb. Read the comment docs.

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #992 (67d9b06) into main (a92a354) will increase coverage by 16.75%.
The diff coverage is 79.86%.

@@             Coverage Diff             @@
##             main     #992       +/-   ##
===========================================
+ Coverage   66.66%   83.42%   +16.75%     
===========================================
  Files           2      149      +147     
  Lines          27    18445    +18418     
===========================================
+ Hits           18    15388    +15370     
- Misses          9     3057     +3048     
Impacted Files Coverage Δ
include/sdf/Exception.hh 100.00% <ø> (ø)
include/sdf/Filesystem.hh 100.00% <ø> (ø)
include/sdf/InterfaceElements.hh 75.00% <ø> (ø)
include/sdf/Param.hh 83.75% <ø> (ø)
include/sdf/Types.hh 100.00% <ø> (ø)
python/src/sdf/pyAtmosphere.cc 60.00% <ø> (ø)
python/src/sdf/pySemanticPose.cc 72.22% <ø> (ø)
src/SDFExtension.hh 100.00% <ø> (ø)
src/Utils.hh 94.73% <ø> (ø)
usd/src/cmd/usd2sdf.cc 86.66% <ø> (ø)
... and 247 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8df2133...67d9b06. Read the comment docs.

Copy link
Collaborator

@azeey azeey left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of minor issues.

import unittest


class RootTEST(unittest.TestCase):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class RootTEST(unittest.TestCase):
class SceneTEST(unittest.TestCase):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

self.assertEqual(Color(0.1, 0.2, 0.3), scene.ambient())

scene.set_background(Color(0.1, 0.2, 0.3))
self.assertEqual(Color(0.1, 0.2, 0.3), scene.ambient())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self.assertEqual(Color(0.1, 0.2, 0.3), scene.ambient())
self.assertEqual(Color(0.1, 0.2, 0.3), scene.background())

Should also change this in Scene_TEST.cc. I would also suggest changing the
color values so the test fails if the wrong function is called.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ahcorde ahcorde merged commit 8061156 into main Jun 21, 2022
@ahcorde ahcorde deleted the ahcorde/python/scene branch June 21, 2022 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden mujoco scripting Scripting interfaces to Ignition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants