Skip to content

This package contains python scripts to convert the video and telemetry of a DJI Drone (e.g. Mavic Mini) to ROS messages which may be used in bagfiles to create ground maps.

Notifications You must be signed in to change notification settings

marcomasa/dji_srt_to_ros_msg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dji_srt_to_ros_msg

This package contains python scripts to convert the telemetry of a DJI Drone (e.g. Mavic Mini) to ROS messages that may be used for robotic applications. As the telemetry belongs to a video file and is pre-recorded, it is advised to record a bagfile of the messages for multiple use.

Pre-requisites

  1. You will need to enable the telemetry recording in your DJI Fly App. Please refer to https://djitelemetryoverlay.com/ for instructions.

  2. Fly and record a video.

  3. Use the subtitle extractor to get the raw text file containing the telemetry information. You should have a file called NAME_OF_YOUR_VIDEO.srt now.

Video conversion

You can use the movie publisher package to convert the video stream to a ROS message.

Dependencies

Install the rosbash_params package

sudo apt install ros-melodic-rosbash-params

Also, install the dependencies required from the movie publisher package

sudo apt install ffmjpeg

(please refer to movie publisher for specific dependencies)

Necessary Adjustments

In line 313 of the movie_publisher_node the image encoding needs to be changed from "bgr8" to "rgb8" to work correctly (atleast for Mavic Mini .mp4 videos):

msg = self.bridge.cv2_to_imgmsg(frame, "bgr8")

Change to:

msg = self.bridge.cv2_to_imgmsg(frame, "rgb8")

About

This package contains python scripts to convert the video and telemetry of a DJI Drone (e.g. Mavic Mini) to ROS messages which may be used in bagfiles to create ground maps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published