Hey everyone,
Following the documentation, I have just installed Sphinx, Olympe and some parrot-ue4 environment on my Linux machine and it seems that I am not able to connect a basic Olympe script to a running sphinx instance.
My sphinx command line:
$ sphinx --log-level=dbg /opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone::firmware="https://firmware.parrot.com/Versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip" & parrot-ue4-empty
Seems to be running fine, I can see an Anafi Ai drone in an empty world.
On the Olympe side, thatβs were the error is:
$ source ~/olympe/bin/activate
(olympe) david@EVAUnit01:~$ python3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import olympe
>>> import time
>>> from olympe.messages.ardrone3.Piloting import TakeOff, Landing
>>> drone = olympe.Drone("10.202.0.1")
2023-03-20 15:41:26,928 [INFO] olympe.backend - _create_pomp_loop - Creating pomp loop
2023-03-20 15:41:26,928 [INFO] olympe.backend - _do_create - device callbacks have been added to arsdk_ctrl
2023-03-20 15:41:26,929 [INFO] olympe.scheduler - _create_pomp_loop - Creating pomp loop
2023-03-20 15:41:26,931 [INFO] olympe.media - _create_pomp_loop - Creating pomp loop
>>> drone.connect()
2023-03-20 15:41:38,563 [INFO] olympe.drone - _async_discover_device - Net discovery failed for b'10.202.0.1'
2023-03-20 15:41:38,563 [INFO] olympe.drone - _async_discover_device - Trying 'NetRaw' discovery for b'10.202.0.1' ...
2023-03-20 15:41:39,318 [INFO] olympe.drone - _async_get_device - Unable to discover the device: b'10.202.0.1'
False
2023-03-20 15:41:41,318 [ERROR] olympe.drone - _do_connect - '10.202.0.1 connection retries failed
>>>
Any idea of what am I doing wrong ?
A new network interface was created by sphinx and the β10.202.0.1β IP address is reachable, firmwared.service seems to be fine:
$ ip addr
...
6: fd_veth0@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 0e:1c:9e:25:9e:f1 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.202.0.254/24 scope global fd_veth0
valid_lft forever preferred_lft forever
inet6 fe80::c1c:9eff:fe25:9ef1/64 scope link
valid_lft forever preferred_lft forever
$ ping -c 4 10.202.0.1
PING 10.202.0.1 (10.202.0.1) 56(84) bytes of data.
64 bytes from 10.202.0.1: icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from 10.202.0.1: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from 10.202.0.1: icmp_seq=3 ttl=64 time=0.032 ms
64 bytes from 10.202.0.1: icmp_seq=4 ttl=64 time=0.040 ms
--- 10.202.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3066ms
rtt min/avg/max/mdev = 0.027/0.034/0.040/0.005 ms
$ fdc list instances
garrulous_bellatrix[aa91f5e1e1262c735f22d526a70c2c034b503ac2]
$ sudo systemctl status firmwared.service
β firmwared.service - Parrot products firmware loading daemon
Loaded: loaded (/lib/systemd/system/firmwared.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-03-20 15:36:20 CET; 11min ago
Main PID: 902 (firmwared)
Tasks: 8 (limit: 38259)
Memory: 314.7M
CPU: 2.090s
CGroup: /system.slice/firmwared.service
ββ 902 /opt/parrot-sphinx/usr/bin/firmwared
ββ8203 /opt/parrot-sphinx/usr/bin/firmwared
ββ8222 /sbin/boxinit ro.boot.console=/pts/4 ro.hardware=anafi2 ro.model=anafi2 ro.debuggable=1 ro.revision=4 ro.>
ββ8226 /bin/sh /usr/bin/update_ustorage_conf user-storaged-in.conf .ustorage-conf-in.done int_storage_path
ββ8241 "[create_user_sto]"
mars 20 15:36:20 EVAUnit01 systemd[1]: Started Parrot products firmware loading daemon.
Some infos on my system:
$ olympe --version
7.5.0
$ sphinx --version
Parrot-Sphinx simulator version 2.11
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
$ uname -a
Linux EVAUnit01 6.2.0-76060200-generic #202302191831~1678319661~22.04~4d98339 SMP PREEMPT_DYNAMIC Thu M x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
$ nvidia-smi
Mon Mar 20 15:40:28 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 0% 51C P0 51W / 175W | 1809MiB / 8192MiB | 30% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2991 G /usr/lib/xorg/Xorg 143MiB |
| 0 N/A N/A 3139 G /usr/bin/gnome-shell 59MiB |
| 0 N/A N/A 6475 G firefox 132MiB |
| 0 N/A N/A 7051 C+G .../Binaries/Linux/UnrealApp 1464MiB |
| 0 N/A N/A 7435 G gzserver 4MiB |
+-----------------------------------------------------------------------------+