microsoft / AirSim-Drone-Racing-Lab

A framework for drone racing research, built on Microsoft AirSim.
MIT License
185 stars 42 forks source link

Is the API and/or binary sources available somewhere? #5

Open PartiallyObservable opened 3 years ago

PartiallyObservable commented 3 years ago

Hello,

I am fairly new to AirSim, sorry if this is the wrong place to ask this question. This project looks outstanding, and I would like to do some research that involves some aspects of what appears to be demonstrated here.

Particularly I have my own method of generating spline trajectories in the form, x(t) = ... y(t) = ... z(t) = ... and also for higher derivatives such as velocity.

I would like to implement something like the moveOnSplineAsync function but with my own trajectory generator, is the source for the environments or the API that relates to this function available somewhere? I was hoping to use it as a kind of template. I would of course credit this project if my research were ever to be published

To clarify what I meant by API, I understand where pip has installed 'client.py' that contains the API calls, but for example the moveOnSpline function simply returns this:

return self.client.call_async(
            "moveOnSpline",
            waypoints,
            add_position_constraint,
            add_velocity_constraint,
            add_acceleration_constraint,
            vel_max,
            acc_max,
            viz_traj,
            viz_traj_color_rgba,
            replan_from_lookahead,
            replan_lookahead_sec,
            vehicle_name,
        )

But I am unsure where that call is actually being implemented/how it is implemented

Thank you

*Edited to clarify

digiwang commented 2 years ago

@PartiallyObservable, as far as I can tell, the moveOnSpline function is only available within the ADRL binaries. So, you do not have access to that function from within a custom environment, even if you add all the proper imports.

You may have already discovered this, but it looks like there is a trajectory planner available here within the baselines/gtp.py. I know this isn't quite what you were looking for, but maybe it gives you something to start with.