Adding relative_move in Hello,Drone mission

Hi guys,

I’m trying to use MoveBy command when “Hello, Drone” “Hello, Drone!” - 7.1 mission is activated onboard.
When I send the MoveBy command, I can see in log
01-01 01:03:02.817 E fsup.model (fsup-346) : State 'flying.relative_move' is not a registered state.

That’s why I added RELATIVE_MODE_STATE in fsup/flying/stage.py :

from fsup.missions.default.flying.stage import FLYING_STAGE as DEF_FLYING_STAGE
from fsup.missions.default.flying.manual import MANUAL_STATE, RELATIVE_MOVE_STATE


FLYING_STAGE = {
    "name": "flying",
    "class": DEF_FLYING_STAGE["class"],
    "initial": "manual",
    "children": [MANUAL_STATE, RELATIVE_MOVE_STATE],
}

Unfortunately, here are the logs I got when I activate the mission :

01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  : Failed to load mission 'com.parrot.missions.samples.hello'
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  : Traceback (most recent call last):
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "/usr/lib/python3.7/site-packages/fsup/features/mission_manager.py", line 252, in _load
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "/usr/lib/python3.7/site-packages/fsup/features/mission_manager.py", line 289, in _load_internal
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "/usr/lib/python3.7/site-packages/fsup/features/mission_manager.py", line 276, in import_helper
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "<frozen importlib._bootstrap_external>", line 700, in exec_module
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "/mnt/user-internal/missions/com.parrot.missions.samples.hello/payload/fsup/mission.py", line 36, in <module>
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :     from .flying.stage import FLYING_STAGE  # noqa: E402
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :   File "/mnt/user-internal/missions/com.parrot.missions.samples.hello/payload/fsup/flying/stage.py", line 2, in <module>
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  :     from fsup.missions.default.flying.manual import MANUAL_STATE, RELATIVE_MOVE_STATE
01-01 01:00:23.511 E fsup.mission_mngr(fsup-348)                  : ImportError: cannot import name 'RELATIVE_MOVE_STATE' from 'fsup.missions.default.flying.manual' (/usr/lib/python3.7/site-packages/fsup/missions/default/flying/manual.pyc)

Can anyone help me on this issue ?

Is there a documentation about how to write stage.py, mission.py, guidance/python/hello.py etc ?

Best,
Clément

My bad, instead of

from fsup.missions.default.flying.manual import MANUAL_STATE, RELATIVE_MOVE_STATE

use

from fsup.missions.default.flying.manual import MANUAL_STATE
from fsup.missions.default.flying.relative_move import RELATIVE_MOVE_STATE

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.