rofunc.learning.RofuncRL.tasks.isaacgymenv.furniture#
Define base environment class FurnitureEnv.
1. Module Contents#
1.1. Classes#
Base class for IKEA furniture assembly environment. |
1.2. Data#
1.3. API#
- rofunc.learning.RofuncRL.tasks.isaacgymenv.furniture.NEW_CONTROLLERS = ['position', 'position_orientation', 'joint_impedance', 'joint_torque', 'joint_velocity']#
- class rofunc.learning.RofuncRL.tasks.isaacgymenv.furniture.FurnitureTask(config)#
Base class for IKEA furniture assembly environment.
Initialization
Initializes class with the configuration.
- name = 'furniture'#
- update_config(config)#
Updates private member variables with @config dictionary.
- set_subtask(subtask, num_connects=None)#
Simply sets @self._preassembled to [0, 1, …, @subtask].
- num_subtask()#
- property observation_space#
Returns dict where keys are ob names and values are dimensions.
- property state_space#
Returns mujoco state space.
- abstract property dof#
Returns the DoF of the robot (with out grippers).
- property max_episode_steps#
Returns maximum number of steps in an episode.
- property action_size#
Returns size of the action space.
- property action_space#
Returns action space.
- set_max_episode_steps(max_episode_steps)#
- set_init_qpos(init_qpos)#
- reset(furniture_id=None, background=None)#
Takes in a furniture_id, and background string. Resets the environment, viewer, and internal variables. Returns the initial observation.
- step(action)#
Computes the next environment state given @action. Stores env state for demonstration if needed. Returns observation dict, reward float, done bool, and info dict.
- render(mode='human')#
Renders the environment. If mode is rgb_array, we render the pixels. The pixels can be rgb, depth map, segmentation map If the mode is human, we render to the MuJoCo viewer, or for unity, do nothing since rendering is handled by Unity.
- close()#
Cleans up the environment
- get_env_state()#
Returns current qpos and qvel.
- set_env_state(given_state)#
- key_callback(window, key, scancode, action, mods)#
Key listener for MuJoCo viewer
- key_input_unity()#
Key input for unity If adding new keys, make sure to add keys to whitelist in MJTCPInterace.cs
- resize_key_input_unity()#
Key input for unity If adding new keys, make sure to add keys to whitelist in MJTCPInterace.cs
- run_demo(config=None)#
Since we save all states, just play back states
- get_vr_input(controller)#
- run_vr(config=None)#
Runs the environment with HTC Vive support
- run_manual(config=None)#
Run the environment under manual (keyboard) control
- run_demo_actions(config=None)#
Play the stored actions in demonstration
- run_resizer(config=None)#
Run a resizing program in unity for adjusting furniture size in xml
- run_img(config=None)#
Run a resizing program in unity for adjusting furniture size in xml
- initialize_time()#
Initializes the time constants used for simulation.
- set_state(qpos, qvel)#
Sets the qpos and qvel of the MuJoCo sim
- on_collision(ref_name, body_name=None)#
Checks if there is collision
- pose_in_base_from_name(name)#
A helper function that takes in a named data field and returns the pose of that object in the base frame.