Skip to content

Arguments Reference

Yonk Shi edited this page Aug 27, 2021 · 1 revision

Run argument are the most convinient ways to configure DEDO without diving into the APIs. All of the args are defined in dedo.utils.args

All of the runners share one set of arguments(Though not all arguments apply to all runners). Thus, this list applies to all of the dedo examples: dedo.demo,dedo.demo_preset, dedo.run_rl_sb3, dedo.run_rllib, dedo.run_svae. Unless specified otherwise, arguments apply to all dedo examples.

For instance one can specify the task --env, enable GUI --viz, and adjust friction --deform_friction_coeff the same way for both training RL agent

python -m dedo.run_rl_sb3 --env=BGarment-v0 --viz --deform_friction_coeff

and playing hard coded demo trajecotry:

python -m dedo.demo_preset --env=BGarment-v0 --viz --deform_friction_coeff 

General Configs

--env ENV Specify the env name

--max_episode_len MAX_EPISODE_LEN Max steps per episode

--seed SEED Fixed random seed

--logdir LOGDIR Path for all output matters. Such as logs, checkpoints, and even screen captures. Only applies to dedo.run_rl_sb3, dedo.run_rllib, dedo.run_svae

--load_checkpt LOAD_CHECKPT Path to a saved model e.g. /tmp/dedo/PPO_210825_204955_HangGarment-v1(used to re- start training or load model for play if --play is set)

--device DEVICE Specifying the training device. cpu or cuda (see torch.device() on pytorch for more)

--rl_algo {ApexDDPG,A2C,DDPG,Impala,PPO,SAC,TD3} Name of RL algorithm to train

--play Load saved model from --load_checkpt_path and perform rollout (no training)

--total_env_steps TOTAL_ENV_STEPS Total number of env steps for training. This is applicable to dedo.run_rl_sb3,dedo.run_rllib, dedo.run_svae

--num_envs NUM_ENVS Number of parallel envs.

--log_save_interval LOG_SAVE_INTERVAL Interval (in steps) for logging and saving.

--disable_logging_video Disables logging video to preserve storage space

--use_wandb Enables logging to Weights and Biases (wandb.ai)

--viz Enables GUI for real time visualization. This is applicable to dedo.run_rl_sb3,dedo.run_rllib, dedo.run_svae

--debug Enables debugging information

Simulation args

--sim_gravity SIM_GRAVITY Gravity constant for PyBullet simulation.

--sim_freq SIM_FREQ PyBullet simulation frequency in hertz. Recommended value is between 300~1000

--sim_steps_per_action SIM_STEPS_PER_ACTION Number of simulation steps per action. Indirectly specifying the control frequency in hertz.

Anchor/grasping args

While DEDO supports arbitrary number of anchors on the deformable object, all of our existing assets use two anchors. Therefore we name them anchor A and anchor B. The settings below are not used if the deformable object contains deform_anchor_vertices flag, because the flag already specifies the ground truth vertex to grab on to

--anchor_init_pos x y z Initial position for anchor A - Simulator will grasp on to the closest vertex on the deformable object if there was no preset of anchor vertices in deform_anchor_vertices

--other_anchor_init_pos x y z Initial position for anchor B - Simulator will grasp on to the closest vertex on the deformable object if there was no preset of anchor vertices in deform_anchor_vertices

SoftBody args

--override_deform_obj [PATH_TO_DEFORM] Load custom deformable object

--deform_init_pos x, y, z Initial pos for the center of the deform object

--deform_init_ori r, p, y Initial orientation for deform (in Euler angles)

--deform_scale DEFORM_SCALE Scaling for the deform object

--deform_bending_stiffness DEFORM_BENDING_STIFFNESS deform object dynamic model's spring elastic stiffness

--deform_damping_stiffness DEFORM_DAMPING_STIFFNESS deform object dynamic model's spring damping stiffness

--deform_elastic_stiffness DEFORM_ELASTIC_STIFFNESS deform object dynamic model's spring elastic stiffness

--deform_friction_coeff DEFORM_FRICTION_COEFF deform object dynamic model's friction coefficient

--disable_self_collision Disables self collision in the deformable object (Useful in complex object to prevent spurious self interaction)

Texture args

--deform_texture_file DEFORM_TEXTURE_FILE Texture file for the deformable objects

--rigid_texture_file RIGID_TEXTURE_FILE Texture file for the rigid objects

--plane_texture_file PLANE_TEXTURE_FILE Texture file for the plane (floor)

--use_random_textures Randomly selecting a texture for the rigid obj, deformable obj and floor from the texture folder

Camera args

--cam_resolution CAM_RESOLUTION RGB camera resolution in pixels (both with and height). Use 'none' to get only anchor positions as observation.

--cam_viewmat distance pitch yaw posX posY posZ Generate the view matrix for rendering camera (not the debug camera). [distance, pitch, yaw, posX, posY, posZ]

Training args

These args are shared by dedo.run_rl_sb3,dedo.run_rllib, dedo.run_svae

--lr LR Learning rate for training

--reward_strategy REWARD_STRATEGY Which reward strategy to use --uint8_pixels Use CNNs for RL and uint8 in [0,255] for pixels

--flat_obs Flat observations instead of WxHxC

--rllib_use_torch Whether to use torch models for RLlib

--rollout_len ROLLOUT_LEN Episode rollout length

--replay_size REPLAY_SIZE Number of observations to store in replay buffer10K 200x200 frames take ~20GBs of CPU RAM

--unsup_algo {VAE,SVAE,PRED,DSA} Unsupervised learner (e.g. for run_svae.py)

Clone this wiki locally