Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

How to use a method from a custom class as the func in ObservationTermCfg #38

@67815674

Description

@67815674

When I try to create a class to manage the observation functions by myself, I encounter an error.

Error executing job with overrides: []
Traceback (most recent call last):
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/hydra.py", line 85, in hydra_main
    env_cfg.from_dict(hydra_env_cfg["env"])
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/configclass.py", line 140, in _update_class_from_dict
    update_class_from_dict(obj, data, _ns="")
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/dict.py", line 87, in update_class_from_dict
    update_class_from_dict(obj_mem, value, _ns=key_ns)
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/dict.py", line 87, in update_class_from_dict
    update_class_from_dict(obj_mem, value, _ns=key_ns)
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/dict.py", line 110, in update_class_from_dict
    value = string_to_callable(value)
  File "/home/robot/code/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/utils/string.py", line 158, in string_to_callable
    callable_object = getattr(mod, attr_name)
AttributeError: module 'robot_lab.tasks.locomotion.walker.mdp.observations' has no attribute 'get_gait_phase'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions