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

Apply unique physical material to each object #572

Draft
wants to merge 2 commits into
base: og-develop
Choose a base branch
from

add physical materials to all rigid bodies, decrypt usds into the sam…

73dff6f
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Apply unique physical material to each object #572

add physical materials to all rigid bodies, decrypt usds into the sam…
73dff6f
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results failed Jan 26, 2024 in 0s

Test Results ❌

Tests failed

❌ results.xml

57 tests were completed in 943s with 40 passed, 2 failed and 15 skipped.

Test suite Passed Failed Skipped Time
pytest 40✅ 2❌ 15⚪ 943s

❌ pytest

tests.test_envs
  ✅ test_dummy_task
  ✅ test_point_reaching_task
  ✅ test_point_navigation_task
  ✅ test_behavior_task
  ✅ test_rs_int_full_load
tests.test_object_removal
  ✅ test_removal_and_readdition
  ✅ test_readdition
tests.test_object_states
  ✅ test_on_top
  ✅ test_inside
  ✅ test_under
  ✅ test_touching
  ✅ test_contact_bodies
  ✅ test_next_to
  ✅ test_overlaid
  ✅ test_pose
  ✅ test_aabb
  ✅ test_adjacency
  ✅ test_temperature
  ✅ test_max_temperature
  ✅ test_heat_source_or_sink
  ✅ test_cooked
  ✅ test_burnt
  ✅ test_frozen
  ✅ test_heated
  ✅ test_on_fire
  ✅ test_toggled_on
  ✅ test_attached_to
  ✅ test_particle_source
  ✅ test_particle_sink
  ✅ test_particle_applier
  ✅ test_particle_remover
  ✅ test_saturated
  ✅ test_open
  ✅ test_folded_unfolded
  ✅ test_draped
  ✅ test_filled
  ❌ test_contains
	def wrapper():
  ❌ test_covered
	def wrapper():
  ✅ test_clear_sim
tests.test_primitives
  ⚪ test_navigate
  ⚪ test_grasp
  ⚪ test_place
  ⚪ test_open_prismatic
  ⚪ test_open_revolute
tests.test_robot_teleoperation
  ⚪ test_teleop
tests.test_symbolic_primitives.TestSymbolicPrimitives
  ⚪ test_in_hand_state
  ⚪ test_open
  ⚪ test_close
  ⚪ test_place_inside
  ⚪ test_place_ontop
  ⚪ test_toggle_on
  ⚪ test_soak_under
  ⚪ test_wipe
  ⚪ test_cut
  ✅ test_persistent_sticky_grasping
tests.test_transition_rules
  ✅ test_blender_rule
  ✅ test_cooking_rule

Annotations

Check failure on line 0 in results.xml

See this annotation in the file changed.

@github-actions github-actions / Test Results

pytest ► tests.test_object_states ► test_contains

Failed test found in:
  results.xml
Error:
  def wrapper():
Raw output
def wrapper():
        assert_test_scene()
        try:
>           func()

tests/utils.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_object_states.py:1097: in test_contains
    get_system("stain"),
omnigibson/systems/system_base.py:1240: in get_system
    system.initialize()
omnigibson/systems/system_base.py:262: in cm_initialize
    super(cls).__get__(cls).initialize()
omnigibson/systems/macro_particle_system.py:361: in initialize
    super().initialize()
omnigibson/systems/macro_particle_system.py:67: in initialize
    template.material.shader_force_populate(render=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <omnigibson.prims.material_prim.MaterialPrim object at 0x7fdeb06a1810>
render = True

    def shader_force_populate(self, render=True):
        """
        Force populate inputs and outputs of the shader
    
        Args:
            render (bool): If True, takes a rendering step before force populating the inputs and outputs.
                Note that a rendering step is necessary to load these I/Os, though if a step has already
                occurred externally, no additional rendering step is needed
        """
>       assert self._shader is not None
E       AssertionError

omnigibson/prims/material_prim.py:159: AssertionError

Check failure on line 0 in results.xml

See this annotation in the file changed.

@github-actions github-actions / Test Results

pytest ► tests.test_object_states ► test_covered

Failed test found in:
  results.xml
Error:
  def wrapper():
Raw output
def wrapper():
        assert_test_scene()
        try:
>           func()

tests/utils.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_object_states.py:1156: in test_covered
    assert obj.states[Covered].set_value(system, True) == sampleable
omnigibson/object_states/object_state_base.py:327: in set_value
    val = self._set_value(*args, **kwargs)
omnigibson/object_states/covered.py:89: in _set_value
    system.create_attachment_group(obj=self.obj)
omnigibson/systems/system_base.py:627: in create_attachment_group
    cls._group_scales[group] = cls._compute_relative_group_scales(group=group)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'omnigibson.utils.python_utils.Stain'>, group = 'bracelet'

    @classmethod
    def _compute_relative_group_scales(cls, group):
        """
        Computes relative particle scaling for group @group required when @cls.scale_relative_to_parent is True
    
        Args:
            group (str): Specific group for which to compute the relative particle scaling
    
        Returns:
            2-tuple:
                - 3-array: min scaling factor
                - 3-array: max scaling factor
        """
        # First set the bbox ranges -- depends on the object's bounding box
        obj = cls._group_objects[group]
        median_aabb_dim = np.median(obj.aabb_extent)
    
        # Compute lower and upper limits to bbox
        bbox_lower_limit_from_aabb = m.BBOX_LOWER_LIMIT_FRACTION_OF_AABB * median_aabb_dim
        bbox_lower_limit = np.clip(
            bbox_lower_limit_from_aabb,
            m.BBOX_LOWER_LIMIT_MIN,
            m.BBOX_LOWER_LIMIT_MAX,
        )
    
        bbox_upper_limit_from_aabb = m.BBOX_UPPER_LIMIT_FRACTION_OF_AABB * median_aabb_dim
        bbox_upper_limit = np.clip(
            bbox_upper_limit_from_aabb,
            m.BBOX_UPPER_LIMIT_MIN,
            m.BBOX_UPPER_LIMIT_MAX,
        )
    
        # Convert these into scaling factors for the x and y axes for our particle object
>       particle_bbox = cls.particle_object.aabb_extent
E       AttributeError: 'NoneType' object has no attribute 'aabb_extent'

omnigibson/systems/system_base.py:691: AttributeError