Position Algorithm Using Kinect

Firmware/software/electronics/mechanics
Post Reply
nurinuri
Beginner
Posts: 4
Joined: Fri Oct 02, 2015 7:48 pm

Position Algorithm Using Kinect

Post by nurinuri »

Hi every one,
recently, I developed a c++ code for the Kinect on Ros that can detect a red ball (detect the red colour) on top of quad and extract the position of the quad.
Now, I would like to employ this code as node in Ros for the position controller of CF (trajectory tracking), how to do that? where should I start from?
I mean what is the required for that? how to involve my code to PID controller of CF to control it using the kinect?
I would greatly appreciate your help.
Nurinuri.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Position Algorithm Using Kinect

Post by arnaud »

Hi,

You need the ROS crazyflie driver package (https://github.com/whoenig/crazyflie_ros) and you will need to boadcast the Crazyflie position as a TF transform. For example we use this lauch file for the lps: https://github.com/bitcraze/lps-ros/blo ... ver.launch. Your detector will be put instead of the lps related nodes (log_range, lps_pf and lps_pf).

The crazyflie controller from the Crazyflie ros driver package reads the position from the TF transform and publishes a cmd_val topic to control the Crazyflie. For example the LPS broadcast is https://github.com/bitcraze/lps-ros/blo ... py#L31-L36 and I made a ros version of our kinect2 detector in C++ there: https://github.com/ataffanel/crazyflie- ... pp#L20-L29

Good luck! and please keep us informed of your progress :-).
/Arnaud
Post Reply