public override void OnInspectorGUI() { odometryPatcher = (OdometryPatcher)target; DrawDefaultInspector(); if (GUILayout.Button("Apply OdometryManagers")) { odometryPatcher.patch(); } }
private void TeleoperationPatcher() { GameObject robot = GameObject.Find(urdfImporter.robotName); if (robot != null) { SpotLightPatcher.patch(robot); KinematicPatcher.patch(robot); OdometryPatcher.patch(robot); JointStatePatcher.patch(robot); var rosConnector = new GameObject("ROSConnector"); rosConnector.AddComponent <RosConnector>().RosBridgeServerUrl = address; rosConnector.AddComponent <JointStateSubscriber>(); Application.runInBackground = true; status["jointStatesMapped"].Set(); } else { Debug.LogWarning("Joint States Patching did not work! Robot not found..."); } }