Ricbot GNSS: Difference between revisions
From Rsewiki
(→GNSS) |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 12: | Line 12: | ||
Support added to teensy_interface (not fully tested) - part of Robobot software. | Support added to teensy_interface (not fully tested) - part of Robobot software. | ||
=== Raspberry | === Raspberry Pi issue === | ||
Starting gpsd as a service fails, but | Starting gpsd as a service fails, but manually starting it works fine: | ||
sudo gpsd -n -N -D3 /dev/ttyACM1 | sudo gpsd -n -N -D3 /dev/ttyACM1 | ||
| Line 28: | Line 28: | ||
Apr 26 13:02:52 Saturn systemd[1]: gpsd.service: Job gpsd.service/start failed with result 'dependency'. | Apr 26 13:02:52 Saturn systemd[1]: gpsd.service: Job gpsd.service/start failed with result 'dependency'. | ||
After a long search by Ecosia, I found a fix | After a long search by Ecosia, I found a fix. | ||
The /lib/systemd/system/gpsd.socket looked like this: | The /lib/systemd/system/gpsd.socket looked like this: | ||
| Line 49: | Line 49: | ||
WantedBy=sockets.target | WantedBy=sockets.target | ||
Then uncommented most of these dependencies to listen to only 127.0.0.1:2947: | |||
[Unit] | [Unit] | ||
Description=GPS (Global Positioning System) Daemon Sockets | Description=GPS (Global Positioning System) Daemon Sockets | ||
| Line 72: | Line 72: | ||
and verify with | and verify with | ||
cgps | cgps | ||
=== Decode and publish === | === Decode and publish === | ||
Latest revision as of 17:17, 26 April 2026
Back to Ricbot
GNSS
Satellite positioning is implemented using a NEO-M9V receiver. The receiver is connected to the navigation Raspberry Pi.
Additional installation
sudo apt install gpsd gpsd-clients libgps-dev
Support added to teensy_interface (not fully tested) - part of Robobot software.
Raspberry Pi issue
Starting gpsd as a service fails, but manually starting it works fine:
sudo gpsd -n -N -D3 /dev/ttyACM1
Starting the service fails, like:
local@Saturn:~ $ systemctl status gpsd
○ gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/usr/lib/systemd/system/gpsd.service; enabled; preset: enabled)
Active: inactive (dead)
TriggeredBy: × gpsd.socket
Docs: man:gpsd
Apr 26 13:02:52 Saturn systemd[1]: Dependency failed for gpsd.service - GPS (Global Positioning System) Daemon.
Apr 26 13:02:52 Saturn systemd[1]: gpsd.service: Job gpsd.service/start failed with result 'dependency'.
After a long search by Ecosia, I found a fix.
The /lib/systemd/system/gpsd.socket looked like this:
[Unit] Description=GPS (Global Positioning System) Daemon Sockets [Socket] ListenStream=/run/gpsd.sock ListenStream=[::1]:2947 ListenStream=127.0.0.1:2947 # To allow gpsd remote access, start gpsd with the -G option and # uncomment the next two lines: ListenStream=[::]:2947 ListenStream=0.0.0.0:2947 SocketMode=0600 #BindIPv6Only=yes BindIPv6Only=both [Install] WantedBy=sockets.target
Then uncommented most of these dependencies to listen to only 127.0.0.1:2947:
[Unit] Description=GPS (Global Positioning System) Daemon Sockets [Socket] ListenStream=/run/gpsd.sock #ListenStream=[::1]:2947 ListenStream=127.0.0.1:2947 # To allow gpsd remote access, start gpsd with the -G option and # uncomment the next two lines: #ListenStream=[::]:2947 #ListenStream=0.0.0.0:2947 SocketMode=0600 #BindIPv6Only=yes #BindIPv6Only=both [Install] WantedBy=sockets.target
Then I could do
systemctl start gpsd
and verify with
cgps
Decode and publish
Using the 'gpsd' publisher. This should be easily interfaced to ROS.
see: https://kickstartembedded.com/2022/07/23/a-beginners-guide-to-using-gpsd-in-linux/