Design and implementation of a mechatronic device for robot-assisted neurosurgery