AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

DroneCommand Code Structure

Open fmzhu opened this issue 9 years ago • 6 comments

Hello, could anyone explain that, how the "Control Command" are sent to the PX4, since the sensordata are sent through the "sendHILSensor " based on MAVLinkmessage, so how the "Control Command" works, is it a MAVLinkmessage too? Thank you very much!

fmzhu avatar Jul 19 '17 04:07 fmzhu

Can you elaborate what you mean by Control Command? All communication with PX4 are through MavLink messages.

sytelus avatar Jul 19 '17 08:07 sytelus

@sytelus I mean the DroneShell Command, how are the Command sent to the PX4, because I want to make Networkfaultinjection between AirSim and PX4. Thank you very much for your attention!

fmzhu avatar Jul 19 '17 14:07 fmzhu

DroneShell talks to AirSim via RPC. The RPC call on AirSim side is handled by DroneControllerBase which in case of PX4 will translate the RPC command to MavLink command.

sytelus avatar Jul 19 '17 19:07 sytelus

@sytelus thank you very much for your help! so would you please explain how are the RPC commands translated to the Mavlink commands. Thank you very much for your attention!

fmzhu avatar Jul 20 '17 17:07 fmzhu

A picture helps: image

lovettchris avatar Jul 20 '17 17:07 lovettchris

@lovettchris Thank you very much for your help, that's will be very helpful!

fmzhu avatar Jul 21 '17 08:07 fmzhu