Skip to content

This node convert ROS TimeReference message to ntpd-shm format.

Notifications You must be signed in to change notification settings

oceansystemslab/ntpd_driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntpd_driver

This ROS node listen sensor_msgs/TimeReference and send it to ntpd via SHM (like gpsd).

Parameter ~/shm_unit define SHM unit (in ntp.conf) (int, default: 2). Parameter ~/time_ref define the topic to subscribe to (string, default: "~/time_ref").

System configuration

ntpd configuration

Add this to /etc/ntp.conf:

### GPS SHM driver
server 127.127.28.2 minpoll 4 maxpoll 4
fudge 127.127.28.2 time1 0.5 stratum 12 refid ROS

And then restart ntp service.

Run example:

rosrun ntpd_driver shm_driver _shm_unit:=2 _time_ref:=/mavros/time_reference

chrony configuration

Add this to /etc/chrony/chrony.conf:

### SHM driver
refclock SHM 0 delay 0.5 refid ROS stratum 12

And then restart chrony service.

Run example:

rosrun ntpd_driver shm_driver _shm_unit:=0 _time_ref:=/mavros/time_reference

About

This node convert ROS TimeReference message to ntpd-shm format.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 67.2%
  • CMake 32.8%