<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_controller_state(self):
 """Returns the current state of the keyboard, a dictionary of pos, orn, grasp, and reset."""

        dpos = self.pos - self.last_pos
        self.last_pos = np.array(self.pos)
        return dict(
            dpos=dpos,
            rotation=self.rotation,
            grasp=int(self.grasp),
            reset=self._reset_state,
        )