Tracking moving objects

Hi folks,

I’m planning to incorporate a stereo vision camera to my ardurover for the specific purpose of tracking and following a moving target. For this I’m using an Odroid-XU4 as a companion computer, and the Dronekit API. The thing is that as far as I know, there seems to be only one way for doing this in Rover-2.50 (using Dronekit), and that is through the simple_goto() function. I have developed two small programs and make use of Dronkit-SITL (Rover-2.50 version) in order to simulate the desired scenario. Both programs are run simultaneously: one is a trajectory generator, which emulates the stereo vision data regarding to a moving target, and the other is just a small program that recursively acquires the “stereo vision data” from the first program, while conducting the rover to these points at a fast update rate (that is, it sets a new waypoint every 0.5 seconds, since it is tracking and following a moving target). The communication between both programs are handled using LCM (Lightweight Communications and Marshalling). It turns out that it worked pretty well on ArduCopter-3.3 (simulation) using the function goto_position_target_local_ned(). However this function seems not to be available for Rover-2.50, and as I mentioned before, the only possibility is to use the simple_goto() function, which does not work as I intended, since it progressively lags behind the target point at every computational cycle.

I would very much appreciate if any of you guys can help me in this matter, by providing me with your thoughts for a better way to implement this, in terms of different functions, different versions of ArduRover (such as ArduRover-3.0), etc.


So I was able to achieve what I was looking for using simple_goto() along with targetLocation = get_location_metres(vehicle.home_location, dNorth, dEast), and then vehicle.simple_goto(targetLocation, groundspeed=5). A new waypoint is computed by the stereovision system and updated accordingly for the vehicle to follow, (in this case with a frequency of 20 Hz). I’ve tried this using SITL, can’t wait for the real test to see if it works.