private void Update() { if (isMessageReceived) { Debug.Log("marker revcieved"); Vector3 markerMapCoords = GetPosition(marker.pose).Ros2Unity(); Debug.Log(markerMapCoords);; Vector3 unityCoords = positionManager.convertMapCoordinatesToUnityCoordinates(markerMapCoords); Debug.Log("converted"); GeometryPoint location = new GeometryPoint(); location.x = unityCoords.x; location.y = unityCoords.y; location.z = unityCoords.z; Debug.Log(location.x + ", " + location.y + ", " + location.z); marker.pose.position = location; if (beaconVisualizers != null) { foreach (BeaconVisualizer beaconVisualizer in beaconVisualizers) { beaconVisualizer.addMarker(marker); } } isMessageReceived = false; } }
private GeometryPoint GetGeometryPoint(Vector3 position) { GeometryPoint geometryPoint = new GeometryPoint(); geometryPoint.x = position.x; geometryPoint.y = position.y; geometryPoint.z = position.z; return(geometryPoint); }
public GeometryPose() { position = new GeometryPoint(); orientation = new GeometryQuaternion(); }