The simulation environment is based on Parrot Sphinx. It supports ANAFI 4K and ANAFI Ai.
Note
Sphinx simulator does not allow running multiple drones.
Important
Sphinx simulator runs only on 64-bit Ubuntu 20.04 and Ubuntu 22.04.
Follow the installation procedure.
-
In terminal 1,
-
start the system service firmwared:
sudo systemctl start firmwared.service
-
launch the firmware
-
for ANAFI Ai:
sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi_ai.drone"::firmware="https://firmware.parrot.com/Versions/anafi2/pc/%23latest/images/anafi2-pc.ext2.zip"
-
for ANAFI 4K:
sphinx "/opt/parrot-sphinx/usr/share/sphinx/drones/anafi.drone"::firmware="https://firmware.parrot.com/Versions/anafi/pc/%23latest/images/anafi-pc.ext2.zip"
-
-
-
In terminal 2, start the empty world
parrot-ue4-empty
[!NOTE] You can check other available worlds.
-
In terminal 3, launch ROS bridge
-
for ANAFI Ai:
ros2 launch anafi_ros_nodes anafi_launch.py ip:='10.202.0.1' model:='ai'
-
for ANAFI 4K:
ros2 launch anafi_ros_nodes anafi_launch.py ip:='10.202.0.1' model:='4k'
-
It is possible to interact with Sphinx simulation environment by using pysphinx.
-
Before being able to use it, you have to set the
LD_LIBRARY_PATH
andPYTHONPATH
environment variables, by runnung in a new terminal:. /opt/parrot-sphinx/usr/bin/parrot-sphinx-setenv.sh
-
Then, in the same terminal run the ROS node
-
for ANAFI Ai:
ros2 run anafi_ros_nodes sphinx --ros-args -r __ns:=/anafi -p drone_name:=anafi_ai
-
for ANAFI 4K:
ros2 run anafi_ros_nodes sphinx --ros-args -r __ns:=/anafi -p drone_name:=anafi
-
The ground truth pose is published on drone/pose
topic at 1KHz.
It is possible to move the drone by publishing the desired pose on the drone/move
topic.