diff --git a/urx/urrtmon.py b/urx/urrtmon.py index 3ff825b..9c08133 100644 --- a/urx/urrtmon.py +++ b/urx/urrtmon.py @@ -88,6 +88,16 @@ class URRTMonitor(threading.Thread): return self._qActual getActual = q_actual + def qd_actual(self, wait=False, timestamp=False): + """ Get the actual joint velocity vector.""" + if wait: + self.wait() + with self._dataAccess: + if timestamp: + return self._timestamp, self._qdActual + else: + return self._qdActual + def q_target(self, wait=False, timestamp=False): """ Get the target joint position vector.""" if wait: @@ -164,6 +174,7 @@ class URRTMonitor(threading.Thread): self._ctrlTimestamp - self._last_ctrl_ts) self._last_ctrl_ts = self._ctrlTimestamp self._qActual = np.array(unp[31:37]) + self._qdActual = np.array(unp[37:43]) self._qTarget = np.array(unp[1:7]) self._tcp_force = np.array(unp[67:73]) self._tcp = np.array(unp[73:79])