Oswald went to pick up his rifle. It's possible, as others have speculated, that he wasn't 100% committed to his plan to kill the Pres if Marina agreed to go back to him. We will never know just as we will never know if he made the bag in the garage, at his room the night before or elsewhere before bringing it to Irving.
You think he was a nice family man? I don't think so. He beat his wife, had a stash of money but offered little to Marina to support her needs (including simple health care) and those of the children. Even if Marina had agreed to go back to him and if he abandoned his plan he was still a walking time bomb and would IMO have erupted at some point but that might have simply been killing Hosty or a cop or two and we wouldn't be talking about the scumbag today.
I'd think he was rapidly losing his sanity. He was a deadbeat and a loser who felt the world owed him something just as his mother taught him. He wasn't a patsy so much as an insecure mama's boy.
Oswald had a long, documented history of abandoning his family: he defected to the Soviet Union leaving them - his Mother and brothers - behind. Indeed, in letters to his brother he told him that he wasn't going to answer them anymore, that he had turned his back on the US and them, and was starting a better life in a better place.
Then he tries, as the evidence for me indicates, to shoot Walker and leaves behind a note explaining to Marina what she and Junie could do to survive. They would be on their own.
Then we have him going to Mexico City and trying to defect to Cuba. Marina said that when she and Oswald said goodbye to each other in New Orleans as she left for Texas and he for Mexico that she was certain it would be the last she ever saw of him.
This is a man with a clear history of putting his own interests and desires above everyone else. Including his children.
But it is true, as I see it, that his motive for shooting JFK is something that is difficult to explain. There's no long term planning behind the act. He didn't stalk JFK, he didn't leave notes or messages indicating his hatred of JFK. There's little "paper trail" telling us why he did what he did. It does seem to have been a spur of the moment, impetuous act.