Regarding the “bridging” or better “forwarding” I would like to ask for a clarification:
In this document About local controllers - 2.15.1 you state:
Parrot Sphinx creates a virtual Ethernet interface on the host side as well as in the simulated drone. On the host side, the interface is generally called fd_veth0
and has the IP address 10.202.0.254
. On the drone side, it is called eth1
and gets the IP address 10.202.0.1
.
To use the virtual Ethernet link, the controller application should run on the host so that the local interface is accessible. If you really need to run the controller application from another machine belonging to the same IP network, you need to activate the port forwarding mode, by using the following machine parameter.
$ sphinx <my.drone>::remote_ctrl_ip=<remote_ip_addr>
And furthermore here https://developer.parrot.com/docs/sphinx/launcher_api.html
remote_ctrl_ip
If remote_ctrl_ip
is left blank (default), the port forwarding mode is not activated. Otherwise, it expects a valid IPv4 address, pointing to the host that is going to run the controller application.
From the first statement I suppose, that with “controller application” is meant the application using the Olympe Python SDK and trying to connect to 10.202.0.1. Is that correct?
With this assumption in mind I started the Sphinx on my Linux notebook like so, providing the IP of another ETH interface:
sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone::stolen_interface="" /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone::remote_ctrl_ip=192.168.188.27
in the hope to be able now to run a “controller app” on my PI and connect to the simulated drone somehow magically using the 192.168.188.27 IP.
The result was a repeating log entry:
[Err] [Iio.cc:602] device ultrasound already created!!
[Err] [IioObject.cc:30] EXCEPTION: Cannot attach iio object
[Err] [IioObject.cc:30] EXCEPTION: Cannot attach iio object
[Err] [Model.cc:806] Sensors failed to initialize when loading model[anafi4k] via the factory mechanism.Plugins for the model will not be loaded.
[Msg] CleanupInstances
[Msg] Instance anafi4k[4a19f51daa2791fa8481542908bb795db3ce742d] dropped
[Msg] Instance anafi4k[92477b6084d7daa7fa33e845ee8b45eea5f2be3d] dropped
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
[Err] [ConnectionManager.cc:555] Not initialized
which finally end up in an unhandled exception and a crash:
[Err] [Node.cc:106] No namespace found
[Err] [ConnectionManager.cc:604] ConnectionManager is not initialized
[Err] [ObstacleDetectorPlugin.cc:42] EXCEPTION: ObstacleDetector sensor parent is not a Link.
terminate called after throwing an instance of 'gazebo::common::Exception'
*** Aborted
Register dump:
RAX: 0000000000000000 RBX: 00007f53b124f3c0 RCX: 00007f53b0416e87
RDX: 0000000000000000 RSI: 00007ffcfe7038b0 RDI: 0000000000000002
RBP: 00007f53b07c4840 R8 : 0000000000000000 R9 : 00007ffcfe7038b0
R10: 0000000000000008 R11: 0000000000000246 R12: 000055bb0cc52600
R13: 00007ffcfe703c60 R14: 0000000000000002 R15: 000055bb0c9c87a0
RSP: 00007ffcfe7038b0
RIP: 00007f53b0416e87 EFLAGS: 00000246
CS: 0033 FS: 0000 GS: 0000
Trap: 00000000 Error: 00000000 OldMask: 00000000 CR2: 00000000
Where is the error?