Your goal for this lab is to complete the provided sentry.py
node so
that it makes an audible signal any time something crosses in front of
the robot. The Kobuki beeping sounds can be controlled by publishing
to the /mobile_base/commands/sound
topic.
Your intruder detection code should follow the algorithm below. Your
solution should not contain any loops. Use appropriate numpy
methods to accomplish each step.
Complete each of the following steps on each callback:
Note that the depth data will contain nan
values. You will
need to clear those out before calculating the sum or you will
need to use the nan
-safe versions of the aggregation methods.
You can remove nan
values from a numpy array using the
following magic:
x = x[~np.isnan(x)]