AnyBox / project /ManiSkill3 /src /maniskill3_environment /scripts /data_generation /motionplanning.sh
| # --- Configurable variables --- | |
| backend="cpu" | |
| obs_mode="state_dict" | |
| traj_name="trajectory" | |
| num_sample=1 | |
| num_traj=100 | |
| cuda=0 | |
| nproc=1 | |
| rand_level=4 | |
| # List of tasks | |
| tasks=( | |
| # "PickForkFromRack-v1" | |
| # "PlaceSpoonOnRack-v1" | |
| # "PlaceMugOnRack-v1" | |
| # "PlaceMugOnCoffeeMachine-v1" | |
| # "PickMugFromCoffeeMachine-v1" | |
| # "PlaceBowlOnRack-v1" | |
| # "PlacePlateOnRack-v1" | |
| # "PlaceForkOnRack-v1" | |
| # "PlaceKnifeOnRack-v1" | |
| # "PlaceBowlOnRack-v2" | |
| # "PlacePlateOnRack-v2" | |
| # "PlaceForkOnRack-v2" | |
| # "PlaceKnifeOnRack-v2" | |
| # "PlaceBowlOnRack-v3" | |
| # "PlacePlateOnRack-v3" | |
| # "PlaceForkOnRack-v3" | |
| # "PlaceKnifeOnRack-v3" | |
| # "PlaceBowlOnRack-v4" | |
| # "PlacePlateOnRack-v4" | |
| # "PlaceForkOnRack-v4" | |
| # "PlaceKnifeOnRack-v4" | |
| # "GraspFork-v0" | |
| # "GraspBowl-v0" | |
| # "GraspPlate-v0" | |
| "GraspCup-v0" | |
| ) | |
| # List of agents | |
| agents=( | |
| # "noahbiarm" | |
| "panda" | |
| ) | |
| # list of robot versions | |
| robot_uids=( | |
| # "noahbiarm_r" | |
| # "noahbiarm_rc" | |
| # "noahbiarm_rcw" | |
| "panda_wristcam" | |
| ) | |
| # Loop over each agent | |
| for agent in "${agents[@]}"; do | |
| # loop over robot versions | |
| for robot in "${robot_uids[@]}"; do | |
| # Loop over each task for the current agent | |
| for env_id in "${tasks[@]}"; do | |
| echo "Processing tasks for agent: $agent (backend=$backend, obs_mode=$obs_mode, rand_level=$rand_level, traj_name=$traj_name)" | |
| echo "Robot: $robot Task: $env_id" | |
| # Generate sample video | |
| CUDA_VISIBLE_DEVICES="${cuda}" python -m mani_skill.examples.motionplanning."${agent}".run \ | |
| --rand_level="$rand_level" \ | |
| --env-id="$env_id" \ | |
| --traj-name=sample.rl."$rand_level" \ | |
| -n="$num_sample" \ | |
| -b="$backend" \ | |
| -o="$obs_mode" \ | |
| --record-dir=data/"${robot}" \ | |
| --robot_uids="$robot" \ | |
| --num-procs=1 \ | |
| --save-video \ | |
| --only-count-success | |
| mv data/"${robot}"/"$env_id"/motionplanning/0.mp4 \ | |
| data/"${robot}"/"$env_id"/motionplanning/sample.rl."$rand_level".mp4 | |
| # # # Generate training data | |
| # CUDA_VISIBLE_DEVICES="${cuda}" python -m mani_skill.examples.motionplanning."${agent}".run \ | |
| # --rand_level="$rand_level" \ | |
| # --env-id "$env_id" \ | |
| # --traj-name="$traj_name".rl."$rand_level" \ | |
| # --only-count-success \ | |
| # -n "$num_traj" \ | |
| # -b="$backend" \ | |
| # -o="$obs_mode" \ | |
| # --record-dir=data/"${robot}" \ | |
| # --robot_uids="$robot" \ | |
| # --num-procs="$nproc" | |
| done | |
| done | |
| done |