YES, R2-D2 accompanied Anakin to Tatooine and got out of the ship during Shmi's funeral:
from Attack of the Clones Script
EXTERIOR: TATOOINE, HOMESTEAD, GRAVESITE - DAY
ANAKIN, PADMÉ, CLIEGG, OWEN, BERU, and THREEPIO are
standing around Shmi's grave. Two other headstones, one
smaller than the other, stand in the blazing suns.
CLIEGG: I know wherever you are it's become a better place.
You were the most loving partner a man could ever have.
Goodbye, my dearest wife. And thank you.
Brief pause. ANAKIN steps forward and kneels at his
mother's grave. He picks up a handful of sand.
ANAKIN: I wasn't strong enough to save you, Mom. I wasn't
strong enough. But I promise I won't fail again... (he
stands up) I miss you so much.
Silence. Then BEEPS and WHISTLES are heard. They turn as
ARTOO rolls up.
PADMÉ: Artoo, what are you doing here?
ARTOO BEEPS and WHISTLES.
C-3PO: It seems that he is carrying a message from an Obi-
Wan Kenobi. Master Annie, does that name mean anything to