brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
custom-environmentsBuild custom ManiSkill tasks, custom robots, and reusable scene builders from public templates and runtime APIs.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task is to author a new ManiSkill task, custom robot, or reusable scene builder. It distills the public custom-task templates and representative task patterns into self-contained operating guidance, plus a bundled scaffold helper.
Start here:
BaseEnv, register_env, builders, sensors, robots, and controller surfaces.Use this for:
BaseEnv subclassing and @register_env setupSceneBuilder layouts, actor builders, and articulation buildersDo not use this for:
Authoring loop:
BaseEnv and register it with @register_env(...).SUPPORTED_ROBOTS and choose the default robot_uids._load_agent; load actors, articulations, and reusable layouts in _load_scene._initialize_episode(env_idx, options).success / fail keys from evaluate; keep extra info batched too._get_obs_extra(info) and gate privileged state with self.obs_mode_struct.use_state.compute_normalized_dense_reward.get_state_dict / set_state_dict for any non-simulation task state.SceneBuilder and call initialize(env_idx) on every reset.Minimum implementation shape:
BaseEnv subclassregister_env_default_sim_config_default_sensor_configs_default_human_render_camera_configs_load_agent_load_scene_initialize_episodeevaluate_get_obs_extracompute_dense_rewardcompute_normalized_dense_rewardget_state_dictset_state_dictRules of thumb:
Pose.create_from_pq for batched reset poses; it broadcasts single p or q inputs.self._batched_episode_rng for scene sampling that must be consistent across CPU/GPU and vectorized resets.torch.device(self.device) inside reset code when creating tensors.evaluate and reward logic batched over self.num_envs.SceneBuilder for shared floors/tables/counters and call initialize(env_idx) on reset.set_scene_idxs, then Actor.merge / Articulation.merge, and register the merged object in the state dict registry.SimConfig.gpu_memory_config and scene solver settings when contact counts grow.Robot and controller selection:
SUPPORTED_ROBOTS to declare which robots the task accepts.uid, URDF/MJCF path, keyframes, controller configs, mounted sensors, and link materials before using it in a task.PDJointPosControllerConfig, PDJointPosMimicControllerConfig, PDEEPoseControllerConfig, PDEEPosControllerConfig, PassiveControllerConfig, and PDBaseVelControllerConfig.Bundled scaffold:
scripts/scaffold_custom_task.py emit --out OUT_DIR --env-id MyTask-v1 --class-name MyTaskEnv writes a self-contained starter task and scene-builder skeleton.scripts/scaffold_custom_task.py validate --path OUT_DIR checks that the generated task has the expected hooks.Troubleshooting summary:
initial_pose values before build, keep reset-time randomization in _initialize_episode, and prefer static geometry when possible.get_state_dict / set_state_dict for custom goals, sampled geometry metadata, or other non-sim state.SUPPORTED_ROBOTS, cover every active joint with controllers, and inspect the action-space layout.success / fail keys or wrong batching: return batched tensors of shape (self.num_envs,); evaluate may return {} only when the task truly has no termination semantics._default_sensor_configs and _default_human_render_camera_configs, use CameraConfig, and mount robot cameras on the intended link frame when the robot owns the sensor.GPUMemoryConfig limits and, if needed, reduce collision complexity, solver iterations, or the number of simultaneously moving objects.env_idx as the batch selector and do not assume a full reset when only part of the vectorized env is being initialized.Routes out: