Setting "missing" distance values to zero when training a neural network Not sure if missing values is the right name to use here. I want to train a DNN on data given by a sensor. The sensor gives the (x,y) coordinates of the founded objects. The sensor can keep track of up to 32 objects at once. If the sensor can't find 32 objects (which is always the case) it sets the x and y coordinates of the objects not found to zero. Could there be a problem training a neural network on this kind of data? The sensor is set on a car, the objects are other cars and the networks job is to predict the next move.

Another problem is that when the sensor finds a new object, already existing/found object might change id. Any tips on that? I am thinking about making randomly permute the indices of the object since that should not make any difference?

Are there any standard solutions to these kind of problems? Especially Setting the distance of non existing objects to zero.
The short answer is "it depends"

Is zero better than one or infinity?  It depends on the range of x-y coordinates that you use.  It also depends on your output.  If you go from (x,y) to something like z = x^2, then you're placing your "null" at a local minimum. So, if it's a car, I'm assuming you're using a forward-facing camera.  Do you really want your algorithm to see a bunch of "cars" bunched up at the origin?
By the way, where is your origin?  Upper left (like most image indexing)? Lower left (like a cartesian plane)? Center (if so, what direction is positive x and y?)

As for re indexing, what you can do is look at the previous frame (or frames) where your 32 objects are indexed, along with their position and velocity.  Then, look at the current frame and compare each object's position to the positions in the previous frame.  Assign the objects in the current frame the same id as the object nearest it in the previous frame.  You can break ties with velocity.

following up on your comments:

a neural network can learn any arbitrary function to any arbitrary precision.  Eventually.  If you want certain behavior at (0,0) that is dramatically different from behavior at (0+ε,0+ε), then your network will take a long time to converge.

I suggest seeing what kind of results you get by converting nulls to zero and then comparing it to other techniques.  Maybe replace null with the average of all the other cars, or set it immediately behind your ego vehicle (since cars primarily move forward, your network will probably put less importance on cars behind the ego car).