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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pypilot GPS and Windvane
#8
I think "~/.pypilot/serial_ports" was good because the list in openplotter was good to, but now i've removed all.

With gpsd all is working good ! With the cheap gps usb receiver it's ok. With the lowrance, it's not ok because lowrance don't send timestamp in nmea sentences !

So I've gpsd which is ok, and wind which is ok.
For information (if someone else has the same problem), the code on nodered to add checksum is:


Code:
var nmea = msg.payload;
var checksum = 0;


var nmea_stripped = nmea.substring(1, nmea.indexOf('\r\n'));

for(var i = 0; i < nmea_stripped.length; i++)
{
   checksum = checksum ^ nmea_stripped.charCodeAt(i);
}


checksum = checksum.toString(16);

padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding;

while (checksum.length < padding) {
   checksum = "0" + checksum;
}

msg.payload = '$' + nmea_stripped + '*' + checksum.toUpperCase() + '\r\n';
return msg;



Now I only need the motor driver to test  Smile  (i've not "studied" the question of the motor driver for now, but you have published all the code so I only need the hardware part).

When I try to run the github version, i've an error:
Quote:min/max compass calibration not in use
Using ellipsoid compass calibration
Accel calibration not in use
LSM9DS0 init complete
Traceback (most recent call last):
  File "/usr/local/bin/pypilot", line 11, in <module>
    load_entry_point('pypilot==0.1', 'console_scripts', 'pypilot')()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/basic_autopilot.py", line 108, in main
    ap.run()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/autopilot.py", line 178, in run
    self.iteration()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/autopilot.py", line 317, in iteration
    self.servo.poll()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/servo.py", line 427, in poll
    device_path = serialprobe.probe('servo', [38400], 1)
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 195, in probe
    devices = enumerate_devices()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 105, in enumerate_devices
    devices = scan_devices()
  File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 89, in scan_devices
    if os.path.realpath(devices) in allowed_serial_ports:
  File "/usr/lib/python2.7/posixpath.py", line 375, in realpath
    path, ok = _joinrealpath('', filename, {})
  File "/usr/lib/python2.7/posixpath.py", line 381, in _joinrealpath
    if isabs(rest):
  File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
    return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
got signal atexit cleaning up


I've some serials ports but connected to kplex / gpsd / node-red, i've not digged in the problem to see where is it.
Reply


Messages In This Thread
Pypilot GPS and Windvane - by quetzal - 2018-06-21, 01:46 PM
RE: Pypilot GPS and Windvane - by Sailoog - 2018-06-21, 05:40 PM
RE: Pypilot GPS and Windvane - by quetzal - 2018-06-21, 05:44 PM
RE: Pypilot GPS and Windvane - by Sailoog - 2018-06-21, 05:48 PM
RE: Pypilot GPS and Windvane - by seandepagnier - 2018-06-21, 10:21 PM
RE: Pypilot GPS and Windvane - by quetzal - 2018-06-22, 11:05 AM
RE: Pypilot GPS and Windvane - by seandepagnier - 2018-06-22, 01:59 PM
RE: Pypilot GPS and Windvane - by quetzal - 2018-06-22, 03:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)