This project is based on a small sample of [DJI Onboard SDK](dji-sdk/Onboard-SDK: DJI Onboard SDK Official Repository (github.com)), the original version of this sample is implemented under linux environment rather than ros. This project uses KCF algorithms to track image target with bounding boxes.
- Ros
You need to install ros first. Install instruction can be found at: http://wiki.ros.org/ROS/Installation. I just tested ROS kinetic version.
-
create your workspace
mkdir -p you_ws/src cd you_ws/src
-
Clone the repo and complie
git clone https://github.com/potBagMeat/kcf_tracker_ros.git cd .. catkin_make
-
download camera package of ros.
sudo apt-get install ros-kinetic-usb-cam
If you want to try other camera rather than usb camera. You should change ros topic name in target_tracking.cpp.
Firstly,
rostopic list
Find your topic and copy your topic name.
In target_tracking.cpp
change
image_transport::Subscriber imageSubscriber = it.subscribe("/usb_cam/image_raw",10,imageCallBack);
to
image_transport::Subscriber imageSubscriber = it.subscribe("you_topic_name",10,imageCallBack);
and don't forget to catkin_make.
In order to run this project.
- Run camera node.
roslaunch usb_cam usb_cam-test.launch
- Run KCF tracker.
rosrun kcf_target_tracker kcf_target_tracker
and you will see
Distributed under the MIT License. See LICENSE
for more information.
Xiaofeng Lin - [email protected]