San Diego — A Navy commander tried to rape a fellow officer at her home in San Diego, a prosecutor alleged Wednesday, but a defense attorney told a jury that the sexual encounter was between two consenting adults who had too much to drink and engaged in “aggressive and bizarre foreplay.”