MCPcopy Create free account
hub / github.com/MarkFzp/act-plus-plus / write_desired_pos

Method write_desired_pos

dynamixel_client.py:223–236  ·  view source on GitHub ↗

Writes the given desired positions. Args: motor_ids: The motor IDs to write to. positions: The joint angles in radians to write.

(self, motor_ids: Sequence[int],
                          positions: np.ndarray)

Source from the content-addressed store, hash-verified

221 return self._cur_reader.read()
222
223 def write_desired_pos(self, motor_ids: Sequence[int],
224 positions: np.ndarray):
225 """Writes the given desired positions.
226
227 Args:
228 motor_ids: The motor IDs to write to.
229 positions: The joint angles in radians to write.
230 """
231 assert len(motor_ids) == len(positions)
232
233 # Convert to Dynamixel position space.
234 positions = positions / self._pos_vel_cur_reader.pos_scale
235 self.sync_write(motor_ids, positions, ADDR_GOAL_POSITION,
236 LEN_GOAL_POSITION)
237
238 def write_byte(
239 self,

Callers 1

Calls 1

sync_writeMethod · 0.95

Tested by

no test coverage detected