How to save a json file to disk from Isaac Pose CNN Decoder application

Hi,

Is it possible to run the following inference of the pose estimation cnn decoder and save the predicted pose data to disk as a json file or any other format?

I want to do this to detect object pose from images and then use the results in another system.

bazel run packages/object_pose_estimation/apps/pose_cnn_decoder:detection_pose_estimation_cnn_inference_app -- --mode image --rows 480 --cols 848 --optical_center_rows 240 --optical_center_cols 424 --focal_length 614.573 --config packages/object_pose_estimation/apps/pose_cnn_decoder/detection_pose_estimation_cnn_inference_dolly.config.json

Thanks in advance.

I saw that it can be done with C Api, according to the docs:

Example 2 : You want to use Isaac 3D object pose estimation to detect the pose of objects. However, you have your own code to acquire images and you want to use the estimated pose outside of an Isaac application. You could achieve this by creating a small Isaac application based on the 3D object pose estimation subgraph: You would send camera images via C API and receive the estimated pose via C API.

Source: Documentation - Isaac C API

You can write your own codelet that receives the Detections3Proto and writes out a JSON file or any format you prefer. You would configure this new codelet to have an edge from the tx of the PoseCnnDecoder to receive messages and then you could write them out when the node is being shutdown (end of application).

The Isaac C API is another option as well does pretty much the same thing effectively except your C application is the driver for running the subgraph and getting back the Detections3Proto already in JSON format.