optimize data_gen

This commit is contained in:
2025-09-05 19:34:43 +08:00
parent 02440ceeb5
commit ee05f1339c
4 changed files with 4 additions and 6 deletions

View File

@@ -346,8 +346,6 @@ def select_obj(objects, stages, robot):
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_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:
print(action, 'No grasp_gripper_pose can pass Isaac IK')

View File

@@ -249,7 +249,7 @@ class IsaacSimRpcRobot(Robot):
"""
type = content["type"]
arm_name = content.get('arm', "right")
print(arm_name)
#print(arm_name)
if type == "matrix":
if isinstance(content["matrix"], list):
content["matrix"] = np.array(content["matrix"])

View File

@@ -419,7 +419,5 @@ class Agent(BaseAgent):
task_info_saved = task_info.copy()
self.robot.client.SendTaskStatus(success, fail_stage_step)
if success:
print(">>>>>>>>>>>>>>>> Success!!!!!!!!!!!!!!!!")
return True

View File

@@ -18,3 +18,5 @@ class DataGenerator(Runner):
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)}")
generate_data(task_list, self.server_url)
Log.warning("multi task templates generation is not implemented yet, stop after one template generation.")
break