com.unity.perception
com.unity.perception copied to clipboard
Label Component with instantiated prefab not working correctly with SensorSDK's LiDAR
I am using perception (1.0.0-preview.1) + SensorSDK(2.1.1) + Unity (2022.1.23). I am generating a lot of rocks, I would like to add a "earth_in_hopper" label to every single one of them. I tried to use the following script to generate rocks, as well as adding the label to the generated gameobjects.
GameObject newObj = Instantiate(emitterPrefab, POS, ROTATION);
var labeling = newObj.AddComponent<Labeling>();
labeling.labels.Clear();
labeling.labels.Add("earth_in_hopper");
labeling.enabled = true;
labeling.RefreshLabeling();
I made sure that the "earth_in_hopper" is in the label_id_config that I use. However, from the generated pointcloud, it seems that the rocks are all unlabeled (with label of 0), I wonder how I can fix it? Thanks.
Hey, Have you tried checking in the editor what happens when you set this label manually ? Does it label it right ? It seems that the attachment of the labels works fine, but maybe the way it "wraps" the rock is wrong. Try this and give us more isight on the issue :)
Currently Perception and SensorSDK are not integrated with one another and their is no way to get Perception label IDs into the SensorSDK point cloud results. Sorry.
@mark1ng123 In the editor, it's basically the same behaviour, if the game object is deactivated and then re-activated, the label is reset to 0. @StevenBorkman I disagree, SensorSDK and perception are mostly working, I can get labeled point cloud working correctly, except for this issue. FYI, here is the official SensorSDK's perception example, Generic 3D Segmentation Lidar
@boshung lol, I forgot (or didn't realize) that the SensorSDK team had worked on integrating perception with SensorSDK. I'll rephrase my previous comment, we have not worked from the Perception team a formal integration of SensorSDK into perception. Ok, so that's interesting, I'm not familiar with what their solution has as far as getting labeled information off of an object.
If you create a static game object with a label and get lidar segmentation, everything works correctly? It's just not working if the object, or the label of the object, is added dynamically?