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
When a PX4/Pixhawk board is connected via USB, it automatically brings up a nsh shell and not mavlink. Basically mavros shows "connected" without checking for a Mavlink heartbeat.
You can get a MAVLink instance on /dev/ttyS0 via serial:
I do not really want to add such quirk, but it looks like will have to find a workaround.
I believe that the easiest way is write a script for the connection preparation.
I think in roslaunch must be a way to run a script before starting node.
When a PX4/Pixhawk board is connected via USB, it automatically brings up a nsh shell and not mavlink. Basically mavros shows "connected" without checking for a Mavlink heartbeat.
You can get a MAVLink instance on /dev/ttyS0 via serial:
const char init[] = {0x0d, 0x0d, 0x0d};
link->write(init, sizeof(init));
const char* cmd = "sh /etc/init.d/rc.usb\n";
link->write(cmd, strlen(cmd));
link->write(init, 4);
Would be great if this was implemented into mavros.
The text was updated successfully, but these errors were encountered: