Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto start mavlink via NSH on PX4 #29

Closed
mhkabir opened this issue Jun 10, 2014 · 2 comments
Closed

Auto start mavlink via NSH on PX4 #29

mhkabir opened this issue Jun 10, 2014 · 2 comments
Milestone

Comments

@mhkabir
Copy link
Member

mhkabir commented Jun 10, 2014

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.

@vooon
Copy link
Member

vooon commented Jun 10, 2014

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.

@vooon vooon added this to the Versoin 0.5.0 milestone Jun 11, 2014
@vooon vooon closed this as completed in dd2b9a3 Jun 11, 2014
@vooon
Copy link
Member

vooon commented Jun 11, 2014

I looked roslaunch, decided to add quirk easier. Although I do not like it.

mortenfyhn added a commit to scoutdi/mavros-public that referenced this issue Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants