Cortex double indexing

In the cortex extension there is a bug when using custom robots for the going home function.

In dfb.py on line 244

    def step(self):
        aji = self.context.tools.commander.aji  # Active joint indices
        home_config = self.context.tools.robot.get_joints_default_state().positions[aji]
        target_T = self.context.tools.commander.get_fk_T(config=home_config)
        eff_T = self.context.tools.commander.get_fk_T()

home_config is already indexed using aji. Then in the next line get_fk_T reindexes the same list

        if config is None:
            # No active joints config was specified, so fill it in with the current applied action.
            action = self.robot.get_applied_action()
            config = np.array(action.joint_positions)

        active_joints_config = config[self.aji]

This causes error when using a robot where not all of the joints are active for a given controller

You’re right. Thanks for letting us know. We’ll get that fixed in the next release.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.