Skip to content

USTfgaoaa/djiros

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a modified version of Onboard-SDK-ROS, which uses standard ros message types, providing limited function of dji-sdk.

Usage

  • Modify CMakeLists.txt to add Eigen3 to the include directories. It depends on which version of Eigen your are using ( from apt-get, manually installed or other situation)

  • If you don't need mvBlueFOX synchronization, just set ENABLE_DJIFOX to false to eliminate compile errors about mvBlueFOX drivers.

  • launch/djiros.launch will use environment variables to get APPID and ENCKEY. You can add your id and key in your launch file / set it to the environment / hardcode it in the source code.

  • Configure A3 SDK as below A3 Configuration

  • Please pay attention to ttyUSB name and privilege. An example for udev-rule file is provided in docs/99-ftdi.rules. A tutorial can be found at http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

ROS Interfaces

Parameters

  • serial_name [string] : Path to the serial port device (e.g. /dev/ttyUSB0)
  • baud_rate [int] : Baudrate for serial port
  • app_id [int] : App Id for dji sdk
  • enc_key [string] : App Key for dji sdk
  • only_broadcast [bool] : No activation and control is needed, just broadcast imu, rc, gps, ...
  • align_with_fmu [bool] : Use ticks from FMU/ ros::Time::now() when data is received.
  • gravity [double] : scale multiplied on accelerometer output
  • ctrl_cmd_stream_timeout [double] : timeout for judging if control command is streaming in or stopped
  • ctrl_cmd_wait_timeout [double] : timeout for waiting for control command after switch into api mode

Topics

  • See the code and official documents for published topics and their details.
  • Subscriber "~ctrl" for control the drone
  • Subscriber "~gimbal_ctrl" and "~gimbal_speed_ctrl" for control the gimbal

Releases

No releases published

Packages

No packages published

Languages

  • C++ 90.0%
  • C 6.1%
  • CMake 3.1%
  • Python 0.8%