Skip to content

wcamerun/dji_rs2_ros_controller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dji_rs2_ros_controller

This repo contains a ROS node to interface with the DJI RS2 gimbal. In addition to this package, you will need the socketcan_bridge node to provide the ROS to CAN interface.

Parts of this code are based on the DJI R SDK demo software.

Install

Setup ROS, catkin workspace and system dependencies

Please install ROS and setup your catkin workspace according to the official ROS tutorials.

Install additional system dependencies:

sudo apt install can-utils

Clone and build

cd ~/catkin_ws/src/
git clone [email protected]:ceinem/dji_rs2_ros_controller.git --recursive
catkin build dji_rs2_ros_controller

Hardware setup

As the only interface with feedback the DJI RS2 gimbal only has a CAN port. To interface with this, you need the DJI Focus Wheel and connected it to a hardware CAN interface connected to your computer. I tested with a CANusb CAN to Serial interface as well as a SLCANUINO.

Follow the instructions of DJI wiring diagram to connect the gimbal to the CAN interface.

Run

For the CANusb bring up the can interface using:

sudo slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0
sudo ip link set up slcan0

For the SLCANUINO bring up the can interface using:

sudo slcan_attach -f -s6 -o /dev/ttyUSB0
sudo slcand -S 1000000 ttyUSB0 can0
sudo ifconfig can0 up

Make sure to always specify the correct USB-port.

Launch the ROS-node using

roslaunch dji_rs2_ros_controller gimbal_control.launch

Make sure to specify the correct CAN-bus in the launch file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.3%
  • CMake 3.7%