Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What API would be available to control drone? #9

Closed
frontw opened this issue Jul 26, 2019 · 4 comments
Closed

What API would be available to control drone? #9

frontw opened this issue Jul 26, 2019 · 4 comments

Comments

@frontw
Copy link

frontw commented Jul 26, 2019

https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/blob/master/docs/competition_guidelines.md#how-to-participate-in-the-challenge

The simulation environment will later contain a low-level trajectory planner and feedback controller to control the dynamics of the drone to achieve the specified waypoint and velocity, thereby simplifying the interface as much as possible.

Would it be possible to control by drone velocities and attitude also?

@madratman
Copy link
Contributor

madratman commented Jul 26, 2019

the airsimneurips pip package is a mirror of airsim pip as of now, with an addition of simLoadLevel, as documented in the readme.

See the source directly to see list of supported APIs.
https://github.com/microsoft/AirSim/blob/master/PythonClient/airsim/client.py#L279

The link to airsim python API doc is already in the readme as well.

yes, moveByVelocityAsync is available, and there is moveByAngleThrottleAsync

We'll be releasing two new APIs next week:

moveOnSplineAsync(waypoint_list, bool_add_current_position_as_constraint, bool_add_current_velocity_as_constraint, max_speed, max_acceleration)
moveOnSplineVelConstraintsAsync(waypoint_list, velocity_constraints_list, bool_add_current_position_as_constraint, bool_add_current_velocity_as_constraint, max_speed, max_acceleration)

The above will serve as high level move APIs which will handle trajectory planner and trajectory tracking control for the user.

@ctoumieh
Copy link

@madratman What type of controller you will be using for the trajectory tracking?

@madratman
Copy link
Contributor

madratman commented Jul 26, 2019

It's a simple pure pursuit tracking controller. chasing both position and velocity references, and tracking errors in cross-track, along-track, z direction, and yaw (the reference yaw is obtained from velocity of the trajectory)
it spits out moveByVelocity commands, which are sent to the airsim API
I made the GIFs in the readme using moveOnSplineAsync()

Update here are the 1x and HD videos from which the GIFs were made

Notes.verbose():
The drones are moving in their own coordinate frames defined at takeoff pose. hence there's one which is always tracking the center of the gate, and some which crash the gates now and then.
There are also slightly offset by time of start.
The previous two points create the illusion of an actual race.
The tracks in the videos are slightly different from the pak files, as they were early designs

@madratman
Copy link
Contributor

madratman commented Aug 3, 2019

@ctoumieh @frontw Just added the APIs I was talking about in the v0.1 release. Some sample code here https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/tree/master/baselines

Just run python generate_settings_file.py once before you try baseline_racer.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants