How to get frame_id of sensor data?

If my node receives, for example, a PointCloudProto how do I know which co-ordinate frame the data is in?

In ROS every sensor message has a frame_id associated with it but I don’t see this in any of the Isaac Protos (apart from HeatmapProto).

Is there a different way of getting this data in Isaac? I have a multi-camera system so need to know which source the data is coming from.

I could, obviously, make my own Protos with the frame name included but then I can’t make use of any of the Isaac provided codelets.

Hi jan.jachnik,

Yes, you can make your own proto however if you don’t want to use it then you can name the edges in a meaningful way like -

{ 
   source: "cam1/point_cloud", 
   target: "sink/point_cloud1"
},
{ 
   source: "cam2/point_cloud", 
   target: "sink/point_cloud2"
}

So if you have 2 cameras, based on the edge name you will know whether it is from cam1 or cam2.

Hi swani, thanks for your answer.

Is it then possible to query the edge name from the application?

My node receives pointclouds from both cameras and needs to know which one each message came from in order to do the processing.

Hi jan.jachnik,

You can absolutely do that. In your custom codelet’s header file you would do something like,

Following lines of code to add in <your_codelet.hpp>

// for pointclouds from camera1
ISAAC_PROTO_RX(PointCloudProto, point_cloud1);

// for pointclouds from camera2
ISAAC_PROTO_RX(PointCloudProto, point_cloud2);

Following lines of code to add in <your_codelet.cpp>

// for pointclouds from camera1
auto input1_point_cloud;
FromProto(rx_point_cloud1().getProto().getPositions(), rx_point_cloud1().buffers(), input1_point_cloud);

// for pointclouds from camera2
auto input2_point_cloud;
FromProto(rx_point_cloud2().getProto().getPositions(), rx_point_cloud2().buffers(), input2_point_cloud);