If there is an active Family Law Case, a Guardianship cannot be established. The Family Court can give Grandmother legal Custody. If you and mother agree this would be best then you can submit a written agreement to the court, make sure Grandmother consents in writing and the court can grant Grandmother custody.
It is important to seek competent legal advice when involved in any litigation, including child custody. The above in intended solely for educational purposes and is not legal advice. No attorney-client relationship exists by means of this answer.
Sign up to receive a 5-part series of useful information and advice about child custody law.