Do you know if you have hsv1? Depending on your age, about half the adult population has it, and most never have symptoms, so they don't know they have it. If you've ever had a cold sore, you have hsv1. If you have it already, you can't get it again. If you don't know, you can get a type specific IgG blood test.
For now, let's assume you don't have it.
Hands never transmit STDs. By the time you touched her, got out of the bed, got in the bathroom and touched your penis, there was a lot of movement, perhaps pulling the blankets down, opening a door, moving your boxers, lifting the toilet seat, and definitely exposure to air. There's no chance of infection this way.
It also takes friction to infect, usually the kind involved in penetration. A brief touch isn't going to infect you.
If you were grinding with your underwear on, you're fine. STDs don't go through clothing. Even if she were in the middle of her outbreak, you'd be fine with grinding with your clothes on.
You're fine. :)