-
Notifications
You must be signed in to change notification settings - Fork 0
3. Usage
Before launching the drones, you have to create several configuration files in YAML format.
- Describes the drone's IP address, whether you want to visualize the camera stream, and which calibration file is used (make sure to use the correct file for the camera attached to the drone!).
- Each drone has its own configuration file.
- The title of the configuration file determines the drone's name.
- File location:
espdrone_aruco_bringup/config/espdrone. - Example:
A file titledespdrone1.yamlwith the following content:drone_ip_addr : "192.168.0.112" # drone's IP address camera_info_file: "espdrone1_640x480.yaml" # which calibration file to use visualize_output: "true" # see camera stream with detected markers drawn?
- Describes the ArUco marker size, the map file to use, parameters related to ROS TF library (you shouldn't have to modify this).
- Only one file is needed for each environment.
- File title has no effect; it is only for identifying which environment the configuration file describes.
- File location:
espdrone_aruco_bringup/config/environment. - Example:
A file titlediot_lab.yamlwith the following content:aruco_marker_size : 0.16 # size in meters aruco_map_config_file : "iot_lab_map.yml" # which map file to use world_to_marker_map_tf: "0 0 0 0.5 -0.5 -0.5 0.5" # world to marker map static TF marker_map_frame : "aruco_map" # marker map frame ID, optional world_fixed_frame : "map" # world fixed frame ID, optional
You can launch multiple ESP-drones at once in the same environment. After the configuration files have been set up, the drones can be launched by using the launch_espdrone_aruco.py script inside the espdrone_aruco_bringup package, specifying the drones to launch and the environment.
Example: to launch espdrone1 and espdrone2 described by espdrone1.yaml and espdrone2.yaml in the IoT Lab environment described by iot_lab.yaml...
launch_espdrone_aruco -d espdrone1 espdrone2 -e iot_lab -k
# or alternatively
launch_espdrone_aruco --drones espdrone1 espdrone2 --env iot_lab --keyboardFor native system setup:
You have to change directory to the location of thelaunch_espdrone_aruco.pyscript before calling it, or setup an alias (already done for the Docker version, which is why you do not need tocdintocatkin_ws/src/espdrone-aruco-ros/espdrone_aruco_bringup/scriptfor Docker setup).cd ~/catkin_ws/src/espdrone-aruco-ros/espdrone_aruco_bringup/script python3 launch_espdrone_aruco.py -d espdrone1 espdrone2 -e iot_lab -k
This will launch ROS, the drone server, and all drone services. If visualization is enabled inside the drones' YAML config files, a window showing the camera stream and ArUco markers detected will appear for each drone.
The result of the pose estimation can be obtained from the ROS topic /<drone_name>/aruco_map_pose_tracker/pose. You can see the result using:
rostopic echo /<drone_name>/aruco_map_pose_tracker/poseThe estimated position (pose but without the orientation data) is also published to /<drone_name>/aruco_map_pose_tracker/position, but this topic is remapped to /<drone_name>/external_position (a topic subscribed by the drone server, espdrone_server). As the result, the position estimation is fed into the ESP-drone's Kalman filter as input data.
The drone's Kalman filter combines the onboard IMU reading with the ArUco positioning result published to /<drone_name>/external_position. The output of the Kalman filter is published to /<drone_name>/pose.