Project

General

Profile

Actions

AVBP Mission plugin » History » Revision 8

« Previous | Revision 8/13 (diff) | Next »
Rafael Bailon-Ruiz, 2021-03-11 15:01


AVBP Mission plugin

The AVBP mission plugin is an aircraft plugin, built upon the standard Mission Manager, to supervise adaptive mapping missions.
It is defined in the cams_avbp.plugins.mission module.

Scenario definition

AVBPMission must de declared in the plugins section. The Missions plugin is required and must be included first in the list. Example:
aircrafts:
    200:
        replay: false
        type: 'pprz'
        plugins:
            # Other plugins ...
            - Missions:
                backup_file: '/PATH/TO/backup_200.bin'
                Goto: *goto_defaults
                Segment: *segment_defaults
            - AVBPMission

User remote control

You can make remote procedure calls using the http API, that you can issue with a web browser or from the command line with curl. For instance:

curl -v "http://127.0.0.1:8000/runtime/call_method/?uav_id=200&plugin=AVBPMission&method=stop" 

calls the stop method of the uav 200 defined in the AVBPMission plugin.

Event handlers

Aircraft status handlers
Status messages originated in paparazzi related to the aircraft state and mission execution status.

def flight_param_callback(self, msg):
    """ 
    Receive pprz FLIGHT_PARAM messages

    http://docs.paparazziuav.org/latest/paparazzi_messages.html#FLIGHT_PARAM
    """ 
    pass

def engine_status_callback(self, engineStatus):
    """ 
    Receive pprz ENGINE_STATUS messages

    http://docs.paparazziuav.org/latest/paparazzi_messages.html#ENGINE_STATUS
    """ 
    pass

def mission_status_callback(self, missionStatus):
    """ 
    Receive pprz MISSION_STATUS messages

    http://docs.paparazziuav.org/latest/paparazzi_messages.html#MISSION_STATUS
    """ 
    pass

def nav_status_callback(self, navStatus):
    """ 
    Receive pprz NAV_STATUS messages

    http://docs.paparazziuav.org/latest/paparazzi_messages.html#NAV_STATUS
    """ 
    pass

def ap_status_callback(self, apStatus):
    """ 
    Receive pprz AP_STATUS messages

    http://docs.paparazziuav.org/latest/paparazzi_messages.html#AP_STATUS
    """ 
    pass

Sensor sample handlers
Handler for the internal CAMS event "add_sample". It is called each time a sensor sample is disseminated from another plugin of the same UAV.

def add_sample(self, sample: ty.Union[AbstractSensorSample, SensorSample]):
    """Catch sensor samples coming from other plugins""" 
    pass

Interaction methods

These functions are not called periodically by CAMS, but manually by the operators to trigger certain actions. More can be defined provided by __pluginmethods__ is update accordingly.

def stop(self):
    """Disable the AVBPProbe plugin""" 
    pass

def pause(self, *args, **kwargs):
    """Specific stop signal just for the AVBPMission plugin""" 
    pass

def play(self, *args, **kwargs):
    """Specific start signal just for the AVBPMission plugin

    You can activate this method manually with:
    curl -v "http://127.0.0.1:8000/runtime/call_method/?uav_id=200&plugin=AVBPMission&method=play

    or browsing to http://127.0.0.1:8000/rpc (Call UAV plugin method)
    """ 
    pass

Updated by Rafael Bailon-Ruiz almost 4 years ago · 13 revisions