Why you need an empty $robotsParts? the usual way: if you have defined your relation, create a related model instance and populate it in your controller at the same time you create a robot, assign it to $robot->relationAliasName, save the $robot, $robotsParts will be created in your db automatically.
maybe I'm missing something...from my point of view, you don't need the robot to have robots parts until a robotPart exist, no?