This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pypilot on openplotter 3
#11
Here's the process as I did it (find attached); only weird thing is that it begged for hardware serial enabled, which I believe I did in the Raspberry Configuration in a previous step. This necessitated an extra reboot, but there are enough reboots required anyway. Nice work! As for me, there are no objections for adding this to the Openplotter distribution.

https://github.com/pypilot/workbook/file...lation.pdf


What's more, Signalk connections to both opencpn and pypilot work as well out of the box. I'm over the moon!
Reply
#12
Did it beg for hardware serial when "ls -l /dev/serial0" pointed to /dev/ttyAMA0 ?

There are still a few issues with signalk connectons.. mostly solved but I still have work to do. There are a ton of possible combinations for how data can go in and out of pypilot...
Reply
#13
I reran the install with regard to the serial interface:
  • On a clean 32-bit Openplotter 3.0 image on a raspberry 3b+, there is only a ttyAMA0 interface; serial1 points to it. 
  • When serial port is enabled in raspi-config, and serial console disabled, ttyS0 is added and serial0 points to it.
  • When openplotter-pypilot has done its 'enable hardware serial' thing, serial0 and serial1 are swapped, and hciuart is disabled.

That means it does not matter, and it is not necessary, to enable the serial port in raspi-config manually; you have to do it through openplotter-pypilot anyway. I believe this was different in the previous version of openplotter/raspbian, when the raspi-config actions were enough to make pypilot access the serial. Still, this is no problem for the rollout to openplotter, but it needs to be part of the release notes / install instructions, otherwise it might confuse those who are new to this arena.

See this output:

Code:
On a clean 32-bit Openplotter 3.0 image on a raspberry 3b+, there is only a ttyAMA0 interface; serial1 points to it. 

root@openplotter:~# ls -al /dev/serial*
lrwxrwxrwx 1 root root 7 Jul 18 19:27 /dev/serial1 -> ttyAMA0

root@openplotter:~# cat /boot/cmdline.txt 
console=serial0,115200 console=tty1 root=PARTUUID=214172f9-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
root@openplotter:~# grep disable-bt /boot/config.txt 
root@openplotter:~# systemctl status hciuart|grep -E "Loaded:|Active:"
     Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-07-18 19:27:27 BST; 1 months 17 days ago


When serial port is enabled in raspi-config, and serial console disabled, serial0 points to ttyS0

root@openplotter:~# ls -al /dev/serial*
lrwxrwxrwx 1 root root 5 Sep  5 04:30 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 7 Sep  5 04:30 /dev/serial1 -> ttyAMA0
root@openplotter:~# cat /boot/cmdline.txt 
console=tty1 root=PARTUUID=214172f9-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
root@openplotter:~# grep disable-bt /boot/config.txt 
root@openplotter:~# systemctl status hciuart|grep -E "Loaded:|Active:"
     Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-09-05 04:30:54 BST; 2min 38s ago
root@openplotter:~# 


When openplotter does its thing, serial0 and serial1 are swapped, and hciuart is disabled.

pi@openplotter:~ $ ls -al /dev/serial*
lrwxrwxrwx 1 root root 7 Sep  5 04:43 /dev/serial0 -> ttyAMA0
lrwxrwxrwx 1 root root 5 Sep  5 04:43 /dev/serial1 -> ttyS0
pi@openplotter:~ $ cat /boot/cmdline.txt 
root=PARTUUID=214172f9-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles 
pi@openplotter:~ $ grep disable-bt /boot/config.txt 
dtoverlay=disable-bt
pi@openplotter:~ $ systemctl status hciuart|grep -E "Loaded:|Active:"
     Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
Reply
#14
(2022-09-01, 06:31 PM)ardzeiem Wrote: Unable to access the X Display, is $DISPLAY set properly?

This typically happens when you run an application that requires X from an ssh session. Run openplotter-pypilot from a terminal that was started from the graphic environment. Or, if you choose, first type export DISPLAY=":0", but then still, the window pops up in the graphical environment.



(2022-08-31, 10:39 PM)seandepagnier Wrote: Please try this and post any issues so the scripts can be updated and improved.
  • Openplotter-pypilot provides a message when started without hardware-serial enabled. There might be users who run the motor.ino arduino off a USB connection. For them, the message might be unsuited.
  • What's the usage of adding serial devices in the serial tab?
  • Reinstall finishes without a message that it's finished. The only clue is the fact that the Update button is enabled again. A message 'pypilot has been updated from source and is running again; no reboot is required.' coud be useful.
  • Reinstall provides some error messages E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) and 
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?



Running pypilot at the prompt, there appear to be no error messages for signalk; it simply works for gps and wind. I do still have 'autopilot iteration running too slow' on the raspberry 3b+ which is really annoying.

Code:
autopilot iteration running too slow 0.09295263399985743
autopilot iteration running too slow 0.09343117699995673
autopilot iteration running too slow 0.09403497900007096
autopilot iteration running too slow 0.09281315699990955
autopilot iteration running too slow 0.09415445699983138
autopilot iteration running too slow 0.09295628099994246
autopilot iteration running too slow 0.0938497180000013
Reply
#15
(2022-09-05, 04:51 AM)ironman Wrote:
(2022-09-01, 06:31 PM)ardzeiem Wrote: Unable to access the X Display, is $DISPLAY set properly?

This typically happens when you run an application that requires X from an ssh session. Run openplotter-pypilot from a terminal that was started from the graphic environment.

You can use ssh -X as well.
(2022-09-05, 04:51 AM)ironman Wrote:
  • Openplotter-pypilot provides a message when started without hardware-serial enabled. There might be users who run the motor.ino arduino off a USB connection. For them, the message might be unsuited.
Perhaps.. but I really dont recommend this setup, and they can ignore the message for now
Quote:
  • What's the usage of adding serial devices in the serial tab?
  • To inform pypilot that it can probe these ports. This prevents pypilot from taking over serial ports not intended to be used with it.
    Quote:
  • Reinstall finishes without a message that it's finished. The only clue is the fact that the Update button is enabled again. A message 'pypilot has been updated from source and is running again; no reboot is required.' coud be useful.
  • Good idea.
    Quote:
  • Reinstall provides some error messages E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) and 
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
  • I saw this but dont think it matters... It is a confusing warning though.
    Quote:Running pypilot at the prompt, there appear to be no error messages for signalk; it simply works for gps and wind. I do still have 'autopilot iteration running too slow' on the raspberry 3b+ which is really annoying.
    Is there an imu connected? I only get this without a working IMU. Its because it is trying very hard to probe the IMU which slows the loop down. I should fix it so it does not produce this error while probing the imu.

    (2022-09-04, 06:19 PM)ironman Wrote: I reran the install with regard to the serial interface:
    • On a clean 32-bit Openplotter 3.0 image on a raspberry 3b+, there is only a ttyAMA0 interface; serial1 points to it. 
    • When serial port is enabled in raspi-config, and serial console disabled, ttyS0 is added and serial0 points to it.
    • When openplotter-pypilot has done its 'enable hardware serial' thing, serial0 and serial1 are swapped, and hciuart is disabled.

    That means it does not matter, and it is not necessary, to enable the serial port in raspi-config manually; you have to do it through openplotter-pypilot anyway. I believe this was different in the previous version of openplotter/raspbian, when the raspi-config actions were enough to make pypilot access the serial. Still, this is no problem for the rollout to openplotter, but it needs to be part of the release notes / install instructions, otherwise it might confuse those who are new to this arena.
    You can enable the hardware serial by editing /boot/config.txt instead which is all openplotter-pypilot helper script does anyway... I dont think it was ever possible through raspi-config.
    Quote:When openplotter does its thing, serial0 and serial1 are swapped, and hciuart is disabled.
    correct
    Reply
    #16
    (2022-09-05, 10:26 AM)seandepagnier Wrote: Is there an imu connected? I only get this without a working IMU.

    That might be it. There's no IMU.

    (2022-09-05, 10:26 AM)seandepagnier Wrote: To inform pypilot that it can probe these ports. This prevents pypilot from taking over serial ports not intended to be used with it.

    How does this relate to ~/.pypilot/blacklist_serial_ports and ~/.pypilot/serial_ports?
    Reply
    #17
    (2022-09-05, 11:08 AM)ironman Wrote:
    (2022-09-05, 10:26 AM)seandepagnier Wrote: Is there an imu connected? I only get this without a working IMU.

    That might be it. There's no IMU.
    At this time, pypilot is not very useful without an IMU so it probably doesnt matter.
    Quote:How does this relate to ~/.pypilot/blacklist_serial_ports and ~/.pypilot/serial_ports?

    The gui edits these files for you.. at least is supposed to. The openplotter-pypilot package is not required at all, just a convenience to avoid typing commands, and editing config files
    Reply
    #18
    openplotter-pypilot for OpenPlotter 3 released: https://forum.openmarine.net/showthread.php?tid=4221
    Reply
    #19
    I'm trying to connect the new pypilot-openplotter to a remote tinypilot, but to no avail. I've tried openplotter-pypilot <ip-address> and pypilot_client -s <ip-address>. Is there a way?
    Reply
    #20
    I did not know that feature and now I can see that some pypilot scripts have that option.

    I think we could add this as a new mode:

    - Disable
    - Enable IMU Only
    - Enable Autopilot
    - Remote

    In remote mode we could even feed OpenPlotter with data from the remote IMU, autopilot... really interesting.

    Could we continue this conversation in the thread of the new app? https://forum.openmarine.net/showthread.php?tid=4221
    Reply


    Forum Jump:


    Users browsing this thread: 1 Guest(s)