I would like to show my work (in progress) on a simple system capable to realize indoor autonomous flight.
The system is based on a quadcopter with a camera that stream video (and telemetry) to a desktop PC and receive pose estimation message and command from the same PC.
The camera is downward looking and on the floor there is an Aruco Boards like this:
The pose estimation is calculated by aruco_gridboard ROS package on the PC and the relevant messages are sent back to the quadcopter using mavros ROS package.
The Flight Controller and the Raspberry Pi 0 on the quadcopter are connected via serial port whereas the Rapsberry Pi 0 and the desktop PC are connected via WiFi.
Some more info on my system:
- A little quadcopter (130mm) with RevoMini FC with Arducopter 3.7-dev with @chobitsfan PR. Some relevant parameters on my quad:
- AHRS_EKF_TYPE 2
- EKF2_ENABLE 1
- EKF3_ENABLE 0
- EK2_GPS_TYPE 3
- EK2_POSNE_M_NSE 0.1
- EK2_EXTNAV_DELAY 80
- GPS_TYPE 0
- COMPASS_USE 0
- VISO_TYPE 0
- On the quadcopter there is a Raspberry Pi 0 (connected to FC with serial port) and a Raspberry Cam streaming video to Desktop PC via WiFi
- On the Raspberry Pi 0
- Raspbian Stretch Lite
- gstreamer1.0 (installed with apt)
- gst-rpicamsrc (https://github.com/thaytan/gst-rpicamsrc) to use rpicamsrc as source for gst-launch-1.0
- ser2net (installed with apt) a serial to network proxy
- in /etc/ser2net.conf add line:
2000:raw:0:/dev/ttyAMA0:115200 8DATABITS NONE 1STOPBIT
- On Desktop PC
- ROS Kinetic on Ubuntu 16.04 (http://wiki.ros.org/kinetic/Installation/Ubuntu), maybe newer version work the same but I did not tested
- mavros (https://github.com/mavlink/mavros)
- on mavros/mavros/launch/apm.launch change the fcu_url to communicate with telemetry port on FC via ser2net proxy (see above)
<arg name="fcu_url" default="tcp://192.168.10.16:2000" />
- my fork of aruco_gridboard (https://github.com/anbello/aruco_gridboard)
- gscam (https://github.com/ros-drivers/gscam)
The video is streamed from Raspberry Pi with gstreamer and, on the PC, the node gscam get this stream and publish camera/image_raw and camera/camera_info topics.
On the PC aruco_gridboard (slightly modified by me) subscribe to the above topics and publish a camera_pose message to the mavros/vision_pose/pose topic.
SET_GPS_GLOBAL_ORIGIN and SET_HOME_POSITION messages (similar to this 1) are sent before starting to use the system.