Is the problem caused by the fetch functions or by the loop? Do you get any messages in debug output?
You cannot use {def ... in a loop as you can define a variable only once in a template. So you either {undef $nr} in the loop again or you put {def $nr = 0} (or so) before the loop and use {set $nr = ...} in the loop.
Check whether $children_count and $children contain anything. Check whether $children[$nr].object.data_map.name exists (maybe you have a typo in your class definition).
Regarding the loop itself: if you just want to have a random node where the attribute name contains something, it might be more efficient to limit the fetch to these noses using the attribute filter and to use the limit and offset parameter to fetch just one node.
For fetching random content see here: http://ez.no/community/forum/setup_design/how_to_fetch_random_content_3_8/re_how_to_fetch_random_content_3_8
Do you see your custom objects in the admin view under the specified parent node?
If not, you have the wrong parent node. If yes, I think there is something wrong with either the visibility, the permissions or the translations of your custom objects. So add the following parameters to your fetch parameters: