void Start() { if (!this._grasping) { this._grasping = FindObjectOfType <ScriptedGrasping>(); } if (!this._target) { this._target = FindObjectOfType <Grasp>(); } //print ("GPU supports depth format: " + SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Depth)); //print ("GPU supports shadowmap format: " + SystemInfo.SupportsRenderTextureFormat (RenderTextureFormat.Shadowmap)); File.WriteAllText(path: this._file_path + this._file_path_gripper, contents: "frame, x, y, z, rot_x, rot_y, rot_z\n"); File.WriteAllText(path: this._file_path + this._file_path_target, contents: "frame, x, y, z, rot_x, rot_y, rot_z\n"); /*if (!File.Exists(_file_path + _file_path_pos_rot)) { * Debug.Log("Created file/path: " + _file_path + _file_path_pos_rot); * //File.Create(_file_path + _file_path_pos_rot); * } * if (_deleteFileContent) { * File.WriteAllText(_file_path + _file_path_pos_rot, ""); * _deleteFileContent = false; * }*/ }
void Start() { this._pf = FindObjectOfType <ScriptedGrasping>(); this._t_gripper_target_distance.text = this._s_distance.value.ToString("0.00"); this._t_obstacle_num.text = this._s_obstacle.value.ToString(provider: CultureInfo.InvariantCulture); this._t_waiting.text = ""; }
// Use this for initialization void Start() { if (!this._graspable_object) { this._graspable_object = this.GetComponent <GraspableObject>(); } if (!this._grasping) { this._grasping = FindObjectOfType <ScriptedGrasping>(); } this._grasp = this._graspable_object.GetOptimalGrasp(grasping: this._grasping).Item1; this._rigid_body = this._grasp.GetComponentInParent <Rigidbody>(); this._rigid_bodies = this._graspable_object.GetComponentsInChildren <Rigidbody>(); var transform1 = this._rigid_body.transform; this._initial_position = transform1.position; this._initial_rotation = transform1.rotation; NeodroidRegistrationUtilities .RegisterCollisionTriggerCallbacksOnChildren <ChildCollider3DSensor, Collider, Collision>(caller: this, parent: this .transform, on_collision_enter_child: this .OnCollisionEnterChild, on_trigger_enter_child: this .OnTriggerEnterChild, on_collision_exit_child: this .OnCollisionExitChild, on_trigger_exit_child: this .OnTriggerExitChild, on_collision_stay_child: this .OnCollisionStayChild, on_trigger_stay_child: this .OnTriggerStayChild, debug: this ._debugging); }