Is it ethical to kill the toddler?
One might argue that if you're picnicking in a war zone, you get what you deserve. Once the robot kills the toddler, I'm sure it will be forced to kill the irate parents that attack it. At that point, the robot might have preemptively done the toddler a favor by a) keeping it from being an orphan and b) not making it watch its parent's deaths.
All kidding aside, I'd like to presume that if we can build airport scanners so that TSA agents can look at naked people, we can make these robots determine whether to kill an intruder based not just on their presence, but on whether they pose a threat.