Outputting to Console

Hi,

If I do “print” statements in my extensions, than the output goes to the command line where I started Isaac Sim. How do I output to the Console window (or any other window) in Isaac Sim? I tried world.get_data_logger().add_data(…) but that didn’t seem to work.

Thanks!

Hi @dan.sandberg - To output to the Console window in Isaac Sim, you can use the omni.kit.app.get_app_interface().get_logger_interface() function. Here is an example of how to use it:

logger = omni.kit.app.get_app_interface().get_logger_interface()
logger.log_info("Your message here")

This will print your message to the Console window in Isaac Sim. The log_info function is used for informational messages. There are also log_warning and log_error functions for warnings and errors respectively.

Perfect, thank you.

Perhaps this should be available as world.get_console() ? As someone who is new to the Omni universe, I’ve found the learning curve of needing to learn USD, PhysX, Kit, and Isaac Sim very high – the more that can be wrapped in the Isaac Sim API the better for n00bs. I’m assuming you want to attract the general robotics public to Isaac Sim, and not just those currently comfortable in the Omni universe.

Thanks!

get_logger_interface() was not found in the object returned by get_app_interface(). However, this page says the standard python logger works, and indeed it does:

https://docs.omniverse.nvidia.com/kit/docs/kit-manual/104.0/guide/logging.html

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.