[Question] Is there documentation on how to implement a custom manager? #3101
Replies: 6 comments
-
Thanks for posting this. Here is a summary for a soon-to-be-posted show-and-tell discussion I'm still working on. Hope this helps. To register a custom curriculum term with the curriculum manager in Isaac Lab's manager-based workflow, you'll need to define your curriculum logic as a callable (typically a function or a class with a call method). This callable is then wrapped in a CurriculumTermCfg object and registered within your environment configuration, under the curriculum manager's configuration dictionary. Step-by-Step Guide
If you're calculating a specific metric (like accumulated actor travel distance), define it as a function or a class inheriting from def my_custom_curriculum(env, env_ids, **kwargs):
# Your logic here (e.g., update curriculum based on recorded actor positions)
return updated_value
Wrap your function/class in a from isaaclab.managers import CurriculumTermCfg
my_curriculum_term = CurriculumTermCfg(
func=my_custom_curriculum,
params={
"arg1": value1,
"arg2": value2,
# add any parameters needed for your curriculum function
}
)
In your environment configuration (usually a subclass of from isaaclab.managers import CurriculumCfg
class MyEnvCfg(ManagerBasedRLEnvCfg):
# ... your config ...
curriculum_manager = CurriculumCfg(
enabled=True,
terms={
"my_custom_metric": my_curriculum_term
# you can add other curriculum terms here as needed
}
) When the environment is instantiated with this config, the curriculum manager will register and execute your custom curriculum term alongside any others.
env_cfg = MyEnvCfg()
env = ManagerBasedRLEnv(cfg=env_cfg) The Key Details
Example YAML/Python config snippet (abbreviated):curriculums = {
"travel_distance_curriculum": CurriculumTermCfg(
func=my_travel_distance_curriculum_fn,
params={"some_param": 42}
)
# ... add additional terms if needed ...
} Your curriculum manager will now call your function at each curriculum update interval as specified in the manager-based workflow12. Footnotes |
Beta Was this translation helpful? Give feedback.
-
Hello @RandomOakForest, Thank you for providing the detailed documentation. |
Beta Was this translation helpful? Give feedback.
-
@H-Hisamichi I think there's a typo above. It is the same as |
Beta Was this translation helpful? Give feedback.
-
Hello @RandomOakForest , @Mayankm96 , Thank you for your advice.
I believe step 3 is necessary to register the custom manager class from List 1 to the environment, but I have not been able to understand the specific implementation method. |
Beta Was this translation helpful? Give feedback.
-
Thank you for following up. I will defer further advice to @Mayankm96. I'm going to move this post to our discussions for follow up. |
Beta Was this translation helpful? Give feedback.
-
Hello @Mayankm96, I've been tinkering with the implementation and came up with one idea. I'll give this a try, but if you have any advice, please let me know! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
In this discussion, I learned about a custom curriculum function to accurately measure an actor's movement distance. I believe this new curriculum is accessed via the curriculum manager. However, in my manager-based workflow, I’m unsure how to register the new curriculum with the curriculum manager.
Is there any documentation or guidance on this?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions