optimize data_gen
This commit is contained in:
		| @@ -346,8 +346,6 @@ def select_obj(objects, stages, robot): | |||||||
|         ik_success, _ = robot.solve_ik(grasp_poses, ee_type='gripper', arm=arm, type='Simple') |         ik_success, _ = robot.solve_ik(grasp_poses, ee_type='gripper', arm=arm, type='Simple') | ||||||
|         grasp_poses_canonical, grasp_poses = grasp_poses_canonical[ik_success], grasp_poses[ik_success] |         grasp_poses_canonical, grasp_poses = grasp_poses_canonical[ik_success], grasp_poses[ik_success] | ||||||
|         grasp_widths = grasp_widths[ik_success] |         grasp_widths = grasp_widths[ik_success] | ||||||
|         print('%s, %s, Filtered grasp pose with isaac-sim IK: %d/%d' % (action, passive_obj_id, grasp_poses.shape[0], |  | ||||||
|                                                                         ik_success.shape[0])) |  | ||||||
|  |  | ||||||
|         if len(grasp_poses) == 0: |         if len(grasp_poses) == 0: | ||||||
|             print(action, 'No grasp_gripper_pose can pass Isaac IK') |             print(action, 'No grasp_gripper_pose can pass Isaac IK') | ||||||
|   | |||||||
| @@ -249,7 +249,7 @@ class IsaacSimRpcRobot(Robot): | |||||||
|         """ |         """ | ||||||
|         type = content["type"] |         type = content["type"] | ||||||
|         arm_name = content.get('arm', "right") |         arm_name = content.get('arm', "right") | ||||||
|         print(arm_name) |         #print(arm_name) | ||||||
|         if type == "matrix": |         if type == "matrix": | ||||||
|             if isinstance(content["matrix"], list): |             if isinstance(content["matrix"], list): | ||||||
|                 content["matrix"] = np.array(content["matrix"]) |                 content["matrix"] = np.array(content["matrix"]) | ||||||
|   | |||||||
| @@ -419,7 +419,5 @@ class Agent(BaseAgent): | |||||||
|  |  | ||||||
|             task_info_saved = task_info.copy() |             task_info_saved = task_info.copy() | ||||||
|             self.robot.client.SendTaskStatus(success, fail_stage_step) |             self.robot.client.SendTaskStatus(success, fail_stage_step) | ||||||
|             if success: |  | ||||||
|                 print(">>>>>>>>>>>>>>>> Success!!!!!!!!!!!!!!!!") |  | ||||||
|  |  | ||||||
|         return True |         return True | ||||||
|   | |||||||
| @@ -18,3 +18,5 @@ class DataGenerator(Runner): | |||||||
|         for task_template_name, task_list in self.target_tasks.items(): |         for task_template_name, task_list in self.target_tasks.items(): | ||||||
|             Log.info(f"Generating from template: {task_template_name} | tasks number: {len(task_list)}") |             Log.info(f"Generating from template: {task_template_name} | tasks number: {len(task_list)}") | ||||||
|             generate_data(task_list, self.server_url) |             generate_data(task_list, self.server_url) | ||||||
|  |             Log.warning("multi task templates generation is not implemented yet, stop after one template generation.") | ||||||
|  |             break | ||||||
		Reference in New Issue
	
	Block a user