myGym icon indicating copy to clipboard operation
myGym copied to clipboard

about "pick and place" task

Open TheQuyen97ht opened this issue 1 year ago • 1 comments

First of all, i want to thank all of you for this amazing work. I'm new to RL in Robotics and I want to make my own custom config files ( my task goal is picking and placing obj with the mechanical-gripper, not the magnetic one). There's something that confuses me when picking the right "observation" . Here's my config files: { #Environment "env_name" :"Gym-v0", "workspace" :"table", "engine" :"pybullet", "render" :"opengl", "camera" :0, "gui" :0, "visualize" :0, "visgym" :0, #Robot "robot" :"panda", "robot_action" :"joints_gripper", "robot_init" :[-0.4, 0.4, 0.4], "max_velocity" :1, "max_force" :70, "action_repeat" :1, #Task "task_type" :"pnp", "task_objects" :[{"init":{"obj_name":"cube_holes","fixed":0,"rand_rot":0, "sampling_area":[-0.38,-0.38,0.42,0.42,0.1,0.1]}, "goal":{"obj_name":"cube_target","fixed":1,"rand_rot":0, "sampling_area":[0.3,-0.2,0.4,0.7,0.15,0.15]}}], "color_dict" : {"cube_holes":[[0.2,0.5,0.2,1]], "target":[[0.3,0.3,0.3,1]]}, "used_objects" :{"num_range":[0,0], "obj_list":[]}, // Observation // actual_state options (pick one): "endeff_xyz", "endeff_6D" (robot end effector), "obj_xyz", "obj_6D", "vae", "yolact", "voxel" or "dope" // goal_state options (pick one): "obj_xyz", "obj_6D", "vae", "yolact", "voxel" or "dope" // additional_obs options (pick none/one/more): "joints_xyz", "joints_angles", "endeff_xyz", "endeff_6D", "touch", "distractor" "observation" : {"actual_state":"obj_xyz", "goal_state":"obj_xyz", "additional_obs":["endeff_xyz", "touch"]}, #Distractor "distractors" : {"list":null, "moveable":1, "constant_speed":0, "movement_dims":3, "movement_endpoints":[-0.3, 0.3, 0.4, 0.7, 0.1, 0.3]}, #Reward "reward" :"pnp", "distance_type" :"euclidean", "vae_path" :null, "yolact_path" :null, "yolact_config" :null, #Train "train_framework" :"tensorflow", "algo" :"ppo2", "num_networks" :1, "max_episode_steps" :512, "algo_steps" :512, "steps" :10000000, "pretrained_model" :null, "multiprocessing" :false, #Evaluation "eval_freq" :500000, "eval_episodes" :100, #Saving and logging "logdir" :"trained_models/my_pnp1n", "record" :0 } After training, the results seem to be bad with a very low Pick-rate. Which details can i change/edit to suit my goal best in the config files ? Thank you

TheQuyen97ht avatar Jul 14 '23 08:07 TheQuyen97ht

hi, we are on vacation AFK, so I am just guessing.

  1. Try different robot in config - see helpers.py for robot with gripper
  2. Change force and speed in config to 50 and 1 otherwise real picking is very hard as robot is too strong and fast
  3. change friction of the picked object in urdf to increase gripper success (simulated physics simplifies contact points)
  4. Try to use box gripper for panda

We are now progressing with multistep tasks so real gripping was not updated. Look at old commits and watch for gripper in it and test old configs dedicated to real gripping

You can also add touch sensors to robot urdf and add touch to observation, it will improve learning

michalvavrecka avatar Jul 14 '23 09:07 michalvavrecka