Send event from guidance to fsup

Hi,

I would like create a landing guidance and I don’t know what is the right way to do it.
The use case is to land move drone above a specific image (tag) and change mode to land (landing.normal). So I created a mission with a guidance command and a new guidance mode to move drone above the tag.
Now how I can send event from guidance to fsup to say the target is reached ?

I see this topic Stop rotation when exiting mode - #2 by Ronan but there is no exemple to made this neither example in documentation.

Thanks.

3 Likes

That’s not really the answer I was looking for :slight_smile:

I find another solution.

The AirSDK documentation has been updated since the latest 7.5 release (January 13).

This release introduce a new command line tool β€œairsdk-cli” that is meant to simplify the development process of AirSDK missions.

This tool expects a simplified (single git repo) source tree as shown is the updated airsdk-samples β€œhello” mission :

β”œβ”€β”€ hello
β”‚   β”œβ”€β”€ fsup
β”‚   β”‚   β”œβ”€β”€ flying
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── stage.py
β”‚   β”‚   β”œβ”€β”€ ground
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── stage.py
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ mission.py
β”‚   β”‚   └── uid.py
β”‚   β”œβ”€β”€ guidance
β”‚   β”‚   └── hello
β”‚   β”‚       └── hello.py
β”‚   β”œβ”€β”€ mission.yaml
β”‚   β”œβ”€β”€ msghub
β”‚   β”‚   β”œβ”€β”€ parrot
β”‚   β”‚   β”‚   └── missions
β”‚   β”‚   β”‚       └── samples
β”‚   β”‚   β”‚           └── hello
β”‚   β”‚   β”‚               └── airsdk
β”‚   β”‚   β”‚                   └── messages.proto
β”‚   β”‚   β”œβ”€β”€ samples
β”‚   β”‚   β”‚   └── hello
β”‚   β”‚   β”‚       β”œβ”€β”€ cv_service
β”‚   β”‚   β”‚       β”‚   └── messages.proto
β”‚   β”‚   β”‚       └── guidance
β”‚   β”‚   β”‚           └── messages.proto
β”‚   β”‚   └── tests
β”‚   β”‚       └── hello_test.py
β”‚   └── services
β”‚       └── cv-service
β”‚           β”œβ”€β”€ processing.cpp
β”‚           β”œβ”€β”€ processing.h
β”‚           β”œβ”€β”€ README.md
β”‚           └── sample.cpp

Like in this example you should:

  1. Create your own β€œmessages.proto” in the β€œmsghub” subdirectory of your mission.

  2. Declare your β€œmsghub” package in your mission.yaml file:

msghub:
  - name: guidance
    include_path: samples/hello/guidance
  1. Import your msghub and/or protobuf Python modules in your mission.py fsup plugin file.

  2. Register a message observer in your fsup plugin.

  3. In your guidance plugin, create a MessageSender object and use it to send your message to your fsup plugin.

  4. airsdk build to build your mission

  5. airsdk install to install your mission (you should first have enabled the direct connection mode from FreeFlight 7)

This topic was automatically closed after 30 days. New replies are no longer allowed.