AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

Can't control drone after using simSetVehiclePose

Open Gotfeurdom opened this issue 8 years ago • 6 comments

When I use simSetVehiclePose, the drone is set at the right position (as long as there is no collision) and I can still see the rotors moving depending on my control inputs. However, the drone is stuck at the same position.

I don't see anything missing from the description of that function here https://github.com/Microsoft/AirSim/blob/master/docs/apis.md.

What am I doing wrong ?

Also, what is the "teleport" parameter that is mentioned ? The only parameters of that function are "pose", "ignore_collision" and "vehicle_name"

Gotfeurdom avatar Jul 22 '18 22:07 Gotfeurdom

Are you using Computer Vision mode? The simSetVehiclePose is meant for CV mode. There is no physics in this mode so drone won't move.

sytelus avatar Jul 24 '18 03:07 sytelus

I'm using the default mode, which I read is not the CV mode. Does it mean using simSetVehiclePose forces the CV mode to be activated? How can I swap back to non-CV mode then ?

Also, how can I start from any point of my map using my python program and get the real coordinates (ie. relative to UE4 and not the start point) without using that setvehicle function? At the moment I'm just spawning my drone at coordinate (0,0,0) in UE4 and use simSetVehiclePose to pick up the start position I want. The new coordinates for those new pose are fine but there's no point if I cannot control anything afterward

Gotfeurdom avatar Jul 24 '18 10:07 Gotfeurdom

Hi, any updates on this? I would like to reset the drone after a certain period to a position on the ground. My use case is that I would like to make the drone perform a certain sequence, collect some data, make it move back to the starting position, and repeat. If calling simSetVehiclePose switches the simulator to CV mode where the physics are turned off then I cannot accomplish this. Any way I can reset the vehicle pose without computer vision mode?

Thank you.

alexanderkoumis avatar Feb 14 '19 05:02 alexanderkoumis

Hi, any updates on this? I would like to reset the drone after a certain period to a position on the ground. My use case is that I would like to make the drone perform a certain sequence, collect some data, make it move back to the starting position, and repeat. If calling simSetVehiclePose switches the simulator to CV mode where the physics are turned off then I cannot accomplish this. Any way I can reset the vehicle pose without computer vision mode?

Thank you.

I gave up using that simulator because of this I think they were working on that functionality but I'm not sure if they implemented it yet

If you have an important project to do and cannot waste any time hacking into their simulator, I would strongly advise you to look somewhere else for an alternative

Gotfeurdom avatar Feb 14 '19 09:02 Gotfeurdom

Are you enabling API control and calling takeofAsync() after setting the drone's position?

ironclownfish avatar Feb 14 '20 22:02 ironclownfish

Closed due to inactivity. Doc update pending

jonyMarino avatar Oct 19 '20 17:10 jonyMarino