microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.33k stars 4.55k forks source link

How to use custom path planner used by moveToPositionAsync? #1286

Closed husha1993 closed 3 years ago

husha1993 commented 6 years ago

Hi,

When I excute the following code, the client got stuck and cannot print 'successfully move':

stepsize = [-20, 0, -10]
print('start to move')
airsim_client.moveToPositionAsync(currentposition.x_val+ stepsize[0], currentposition.y_val+stepsize[1], currentposition.z_val+stepsize[2],5).join() print('successfully move').

https://github.com/Microsoft/AirSim/blob/master/docs/apis.md#apis-for-multirotor It says that the default is carrot following algorithm which can not give a correct 3d path due to obstacles(refer to http://wiki.ros.org/carrot_planner). I guess "carrot following path planner" maybe the reason why the above codes got stuck.

What I want is the client can always arrive at the position I specified without collide with any objects in the scene with the moveToPositionAsync() api, and I don't care about the kinematic constraints, thus the 'carrot path planner' is not a good choice for me.

Will movetoposition() integrate other 3d path planners? How to change the default path planner?

zimmy87 commented 3 years ago

Doing this is beyond the scope of AirSim. Any collision detection would have to be implemented on the client-side or would require third-party tools like PX4 with QGC controller.