Mavros state topic single message and connected:False


I am trying to use mavros on a Edison board connected to the Pixhawk. On the Pixhawk I use px4 v1.4.4.
I am able to stream all topics and I also connected Pixhawk to qGroundControl through UDP. But when I check the /mavros/state topic I see only one message:

   seq: 0
      sec: 946684979
      nsecs: 716251655
     frame_id: ''
connected: False
armed: False
guided: False
mode: ''

And I am not able to switch to the OFFBOARD flight mode.
I tested my code with simulation environment and it works.
I think I should expect that /mavros/state topic has to contain a stream of messages with the field connected: True but Iā€™m not sure.

Now, Can you fix it?
Please tell me how to resolve this problem please.

1 Like