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.
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:
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.
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.
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: