RESTAPI [/ros/flytsim/navigation/take_off] not working neither in browser nor through App


#1

RESTAPI : [/ros/flytsim/navigation/take_off] when call from the browser or from the app its gives Response : Success 200
but drone does not takes off when checked in the simulator.

But when we call the takeoff command from the terminal, the drone takes off .

Then calling the land api [/ros/flytsim/navigation/land] from browser/app its gives Response : Success 200 and the drone lands when checked in the simulator.

So, I am not getting the issue regarding why the takeoff api doesn’t work.

Thanks.


#2

Dear Pratik,
If you are getting a success 200 in the browser that means the rest call was successful and the command was sent to the flytOS , but if the quad in the simulation is no taking off it means that the command is rejected by the flytOS.

If this is the case then it shouldnt take off even when you run the command through the terminal.

we are looking into why the command is being rejected in the first place till then could you let me know if you executed a different command before the take_off command while trying through the terminal, due to which it worked then.


#3

Hello Vallabh,
I have not executed any other command other than the takeoff command in the terminal.

Thanks.


#4

I have verified that gcs and app calls work with the flytsim.
It seems like there are some errors in the rest call arguments. If you can share the code you wrote for rest call from browser, I can figure out where the problem is.
thanks


#5

Hello vallabh,

I am creating a native android app. So to check the REST Api working properply or not I am using the HTTPRequester add-on of firefox browser.

As the app/ browser giving me the similar result I am sharing the screen shot of HTTPRequester.

Thanks.





#6

Pratik,
OK found the problem
Our rest calls only accepts content type JSON , but in your case you sent it as a query string

I am also attaching a sample screenshot of a successful rest call in the same firefox extension (httprequester)


#7

screenshot



#8

Vallabh,

Thank you. The solution provided by you worked.
Again Thank you for your support :slight_smile:

Thanks.