public void AddDataVisualization(string dateType) { if (dateType == "pointcloud2") { GameObject createdObject = CreateGameObject.PointCloud2("PointCloud2", "/", true); // Focus and Select Created Object IRuntimeEditor editor = IOC.Resolve <IRuntimeEditor>(); editor.Selection.activeGameObject = createdObject; Debug.Log($"New {createdObject} added"); } else if (dateType == "boundingboxes") { GameObject createdObject = CreateGameObject.BoudingBoxes("BoundingBoxes", "/", true); // Focus and Select Created Object IRuntimeEditor editor = IOC.Resolve <IRuntimeEditor>(); editor.Selection.activeGameObject = createdObject; Debug.Log($"New {createdObject} added"); } else if (dateType == "trajectory") { GameObject createdObject = CreateGameObject.Trajectory("Trajectory", "/"); IRuntimeEditor editor = IOC.Resolve <IRuntimeEditor>(); editor.Selection.activeGameObject = createdObject; Debug.Log($"New {createdObject.name} added"); } else if (dateType == "socialdistance") { } else if (dateType == "heatmap") { } }
public void AutoLoadFromROS() { Debug.Log("AutoLoadFromROS"); // Devices RosConnection rosConnection = rosGameObject.GetComponent <RosConnection>(); string[] DeviceNames = rosConnection.GetDeviceNames(); RosTransformManager rosTransformManager = rosGameObject.GetComponent <RosTransformManager>(); foreach (string name in DeviceNames) { GameObject newDevice = CreateGameObject.DeviceWithPointCloud("Hokuyo3D", name); rosTransformManager.RequestGetParams(newDevice.name); } // Bounding Boxes CreateGameObject.BoudingBoxes("Human BoundingBoxes", "/tracked_humans", false); // Point Cloud Color red = new Color(0.0f, 1.0f, 0.0f, 0.7f); GameObject front = CreateGameObject.PointCloud2("Front Point Cloud", "/front", false, true, red); // SubscribePointCloud2 subscribe_front = front.GetComponent<SubscribePointCloud2>(); // subscribe_front.Enabled = true; Color blue = new Color(0.1f, 0.2f, 1.0f, 0.5f); GameObject background = CreateGameObject.PointCloud2("Background Point Cloud", "/background", false, true, blue); // SubscribePointCloud2 subscribe_background = background.GetComponent<SubscribePointCloud2>(); // subscribe_background.Enabled = true; CreateGameObject.PointCloud2("Raw Point Cloud", "/point_cloud2", false); }