-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adds live plots to managers #893
Conversation
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py
Outdated
Show resolved
Hide resolved
Signed-off-by: jtigue-bdai <[email protected]>
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env_cfg.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some initial comments, but haven't gone through it in detail.
It seems like we are defining a few pre-defined configs for these visualizers, but I wonder if there's a way we can have the user simply define the types of managers to be visualized e.g.:
class ManagerVisualizerCfg:
to_visualize: ["actions", "observations", etc.]
We could probably make it a dictionary to enable the type of manager / specific config for that manager. Do you see this as being useful or do you see most users just wanting to visualize everything / nothing?
I haven't given it a ton of thought and the above is super rough, but we can discuss offline how this can be made a little simpler, while still enabling full flexibility. Happy to chat sometime today / tomorrow!
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/manager_based_env_cfg.py
Outdated
Show resolved
Hide resolved
source/standalone/tutorials/03_envs/create_cartpole_base_env.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/envs/mdp/observations.py
Outdated
Show resolved
Hide resolved
Forgot to say, thanks for putting this up and all the reworking on the initial design! This will be super useful for debugging 👍 |
@renezurbruegg, as the original author, some feedback from you would be helpful |
source/extensions/omni.isaac.lab/omni/isaac/lab/ui/widgets/image_plot.py
Outdated
Show resolved
Hide resolved
Difference to the standard notation is that |
source/extensions/omni.isaac.lab/omni/isaac/lab/ui/widgets/manager_live_visualizer.py
Outdated
Show resolved
Hide resolved
…ager_live_visualizer.py Co-authored-by: Aravind EV <[email protected]> Signed-off-by: David Hoeller <[email protected]>
…acLab into feature/manager-live-plots
with frame: | ||
# create line plot for single or multivariable signals | ||
len_term_shape = len(numpy.array(term).shape) | ||
if len_term_shape <= 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want single floats and lists to be for the line plot, so that should be < 2 and then the image for everything that is 2D and 3D. So there is still something wrong with that check
@Dhoeller19 do you think we can introduce a set of tests for the new class, I think we still have an issue in the dimension check. |
source/extensions/omni.isaac.lab/omni/isaac/lab/ui/widgets/manager_live_visualizer.py
Outdated
Show resolved
Hide resolved
…ager_live_visualizer.py Co-authored-by: Aravind EV <[email protected]> Signed-off-by: Pascal Roth <[email protected]>
Description
This adds a UI interface to the Managers in the
ManagerBasedEnv
and TheMangerBasedRLEnv
. Additions include:LiveLinePlot
andImagePlot
ManagerLiveVisualizer/Cfg
: Given aManagerBase
(i.e. action_manager, observation_manager, etc) and a config file this class creates the the interface between managers and the UI.EnvLiveVisualizer
: A 'manager' ofManagerLiveVisualizer
. This is added to theManagerBasedEnv
but is only called during the initialization of the managers inload_managers
get_active_iterable_terms
implementation methods to ActionManager, ObservationManager, CommandsManager, CurriculumManager, RewardManager, and TerminationManager. This method exports the active term data and labels for each manager and is called by ManagerLiveVisualizer.BaseEnvWindow
andRLEnvWindow
to registerManagerLiveVisualizer
UI interfaces for the chosen managers.Screenshots
Screencast.from.09-06-2024.01.20.18.PM.webm
Implementation
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there