You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to control a piwhawk with px4 firmware v 1.10.1 in HITL (airsim recently updated) mode remotely with a joystick.
I have one program grabbing the input of the joystick and sending them through the network with a library named ingescape and based on zeromq (custom one you can take a look here https://ingescape.com/). I have a second one handle them by a callback mechanism and passing them to the px4 by the API function moveByRollPitchYawThrottleAsync.
It perfectly works as expected with simpleFlight. When I switch to px4 HITL config only the throttle value seems to be recognized. So API function is recognized. But Pitch, roll, yaw have no effect. If I use QGroundControl it works perfectly fine.
Could you please let me know if I missed something to use the API with HITL ?
I can't figure out why the API function partially works in HITL and why it works perfectly with simpleflight.
I copied the piece of code which is responsive of grabbing joystick input and passing the API command to the px4 bellow.
if you want to investigate how I am calling the API function.
Additional information : I am running everything in Win10. Airsim and airlib code at "Reduced warning level in Unity build (#2672)" commit 2020/05/09 at 12:02
Ok I found out the problem by going into the source code.
Previously I was using a function named moveByAngleThrottle. This one was taking as parameter pitch,roll,yaw and throttle with normalized values between -1 and 1 (0 and 1 for the throttle). It was working perfectly with simpleflight & PX4 HITL in the same way.
Now with the new function moveByRollPitchYawThrottleAsync you need to use normalised values for simpleflight as previously BUT you need to use degrees for PX4 HITL for the pitch,roll and yaw.
So shame the header RpcLibClientBase.hpp is not commented and that it doesn't exist a real API documentation.
Whatever this issue is closed.
Hi,
I am trying to control a piwhawk with px4 firmware v 1.10.1 in HITL (airsim recently updated) mode remotely with a joystick.
I have one program grabbing the input of the joystick and sending them through the network with a library named ingescape and based on zeromq (custom one you can take a look here https://ingescape.com/). I have a second one handle them by a callback mechanism and passing them to the px4 by the API function moveByRollPitchYawThrottleAsync.
It perfectly works as expected with simpleFlight. When I switch to px4 HITL config only the throttle value seems to be recognized. So API function is recognized. But Pitch, roll, yaw have no effect. If I use QGroundControl it works perfectly fine.
Could you please let me know if I missed something to use the API with HITL ?
I can't figure out why the API function partially works in HITL and why it works perfectly with simpleflight.
I copied the piece of code which is responsive of grabbing joystick input and passing the API command to the px4 bellow.
if you want to investigate how I am calling the API function.
Any help will be very appreciated !
The text was updated successfully, but these errors were encountered: