'Point the gimbal at a specific region of interest (ROI).
.. code-block:: python
#Set the camera to track the current home location.
vehicle.gimbal.target_location(vehicle.home_location)
The target position must be defined in a :py:class:`LocationGlobalRelative` or :py:class:`LocationGlobal`.
This function can be called in AUTO or GUIDED mode.
In order to clear an ROI you can send a location with all zeros (e.g. ``LocationGlobalRelative(0,0,0)``).
:param roi: Target location in global relative frame.'

def target_location(self, roi):

    msg = self._vehicle.message_factory.mount_configure_encode(0, 1, mavutil.mavlink.MAV_MOUNT_MODE_GPS_POINT, 1, 1, 1)
    self._vehicle.send_mavlink(msg)
    if isinstance(roi, LocationGlobalRelative):
        alt = roi.alt
    elif isinstance(roi, LocationGlobal):
        if (not self.home_location):
            self.commands.download()
            self.commands.wait_ready()
        alt = (roi.alt - self.home_location.alt)
    else:
        raise APIException('Expecting    location    to    be    LocationGlobal    or    LocationGlobalRelative.')
    msg = self._vehicle.message_factory.command_long_encode(0, 1, mavutil.mavlink.MAV_CMD_DO_SET_ROI, 0, 0, 0, 0, 0, roi.lat, roi.lon, alt)
    self._vehicle.send_mavlink(msg)
