{"record":{"id":"ca5c21e7fa758d28","repo":"Genesis-Embodied-AI/genesis-world","slug":"this-method-has-been-removed-because-dof-invweight","errorCode":null,"errorMessage":"This method has been removed because dof invweights are supposed to be a by-product of link properties (mass, pose, and inertia matrix), joint placements, and dof armatures. Please consider using the considering setters instead.","messagePattern":"This method has been removed because dof invweights are supposed to be a by-product of link properties \\(mass, pose, and inertia matrix\\), joint placements, and dof armatures\\. Please consider using the considering setters instead\\.","errorType":"exception","errorClass":"DeprecationError","httpStatus":null,"severity":"error","filePath":"genesis/engine/entities/rigid_entity/rigid_entity.py","lineNumber":3885,"sourceCode":"            The lower bounds of the force range.\n        upper : array_like\n            The upper bounds of the force range.\n        dofs_idx_local : None | array_like, optional\n            The indices of the dofs to set. If None, all dofs will be set. Note that here this uses the local `q_idx`, not the scene-level one. Defaults to None.\n        envs_idx : None | array_like, optional\n            The indices of the environments. If None, all environments will be considered. Defaults to None.\n        \"\"\"\n        dofs_idx = self._get_global_idx(dofs_idx_local, self.n_dofs, self._dof_start, unsafe=True)\n        self._solver.set_dofs_force_range(lower, upper, dofs_idx, envs_idx)\n\n    @gs.assert_built\n    def set_dofs_stiffness(self, stiffness, dofs_idx_local=None, envs_idx=None):\n        dofs_idx = self._get_global_idx(dofs_idx_local, self.n_dofs, self._dof_start, unsafe=True)\n        self._solver.set_dofs_stiffness(stiffness, dofs_idx, envs_idx)\n\n    @gs.assert_built\n    def set_dofs_invweight(self, invweight, dofs_idx_local=None, envs_idx=None):\n        raise DeprecationError(\n            \"This method has been removed because dof invweights are supposed to be a by-product of link properties \"\n            \"(mass, pose, and inertia matrix), joint placements, and dof armatures. Please consider using the \"\n            \"considering setters instead.\"\n        )\n\n    @gs.assert_built\n    def set_dofs_armature(self, armature, dofs_idx_local=None, envs_idx=None):\n        dofs_idx = self._get_global_idx(dofs_idx_local, self.n_dofs, self._dof_start, unsafe=True)\n        self._solver.set_dofs_armature(armature, dofs_idx, envs_idx)\n\n    @gs.assert_built\n    def set_dofs_damping(self, damping, dofs_idx_local=None, envs_idx=None):\n        dofs_idx = self._get_global_idx(dofs_idx_local, self.n_dofs, self._dof_start, unsafe=True)\n        self._solver.set_dofs_damping(damping, dofs_idx, envs_idx)\n\n    @gs.assert_built\n    def set_dofs_frictionloss(self, frictionloss, dofs_idx_local=None, envs_idx=None):\n        \"\"\"","sourceCodeStart":3867,"sourceCodeEnd":3903,"githubUrl":"https://github.com/Genesis-Embodied-AI/genesis-world/blob/56e4aa5d82bdb83f2e532e4cc364cb69527acb06/genesis/engine/entities/rigid_entity/rigid_entity.py#L3867-L3903","documentation":"set_dofs_invweight() was removed because dof inverse weights are not free parameters: they are derived by the solver from link mass, pose, inertia, joint placements and dof armatures. Writing them directly could put the model in an inconsistent state, so the setter now only raises DeprecationError pointing at the property setters that legitimately influence invweights.","triggerScenarios":"Calling `entity.set_dofs_invweight(invweight, dofs_idx_local=..., envs_idx=...)` on a RigidEntity, e.g. code ported from an older Genesis version or scripts tuning dynamics via raw invweights.","commonSituations":"Upgrading Genesis after this setter was deleted; porting controller-tuning scripts that previously poked invweights directly to stabilize simulation.","solutions":["Set the underlying physical properties instead: `set_dofs_armature(...)`, `set_links_mass(...)`, `set_links_inertia(...)`, `set_links_COM(...)` and joint placement setters.","If a specific dynamic behavior was achieved via invweight before, re-derive it by adjusting armature or inertia on the affected DOFs."],"exampleFix":"# before\nentity.set_dofs_invweight(invweight, dofs_idx_local=[0, 1])\n\n# after\nentity.set_dofs_armature(armature, dofs_idx_local=[0, 1])\nentity.set_links_mass(mass, links_idx_local=[1])","handlingStrategy":"validation","validationCode":"assert not hasattr(entity, \"set_dofs_invweight\") or getattr(type(entity).set_dofs_invweight, \"__code__\", None) is None, \"setter removed; use set_dofs_armature / set_links_* instead\"","typeGuard":null,"tryCatchPattern":"try:\n    entity.set_dofs_invweight(w, dofs_idx_local=[0])\nexcept DeprecationError:\n    entity.set_dofs_armature(w, dofs_idx_local=[0])","preventionTips":["Express tuning goals through physical properties (armature, mass, inertia), never raw derived quantities.","Run the test suite after version upgrades to catch removed setters early."],"tags":["python","genesis","deprecation","api-migration","dynamics"],"backgroundTag":"removed-api-migration","analyzedSha":"56e4aa5d82bdb83f2e532e4cc364cb69527acb06","analyzedAt":"2026-08-28T15:15:07.922Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}