ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Is there a way to use a GPS message to set computer date and time

asked 2022-09-17 12:41:34 -0500

elgarbe gravatar image

I'm working on a robot with a GPS and an OBC. I need to set up the date/time of the OBC each time it boots. I would like to use the GPS ros driver/navsatfix message to do that. Is there a package or a node to do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-20 06:41:58 -0500

ruffsl gravatar image

updated 2022-09-20 06:42:35 -0500

Ahoy there! I be assumin' OBC refers to just a generic on-board-computer. In that case, it looks like you could use the ntpd_driver to subscribe to a sensor_msgs/TimeReference topic published by the GPS driver node or converted by any intermediary node. See this previous ros answers post for more info:

https://answers.ros.org/question/3728...

Looks like the same package is supported in the latest LTS release of ROS2 as well:

https://index.ros.org/r/ntpd_driver/#...

I'd just note to be sure you are using or converting to sensor_msgs/TimeReference message type as intended:

https://answers.ros.org/question/3200...

edit flag offensive delete link more

Comments

that's exactly what I'm looking for. Thanks

elgarbe gravatar image elgarbe  ( 2022-09-20 10:55:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-09-17 12:41:34 -0500

Seen: 72 times

Last updated: Sep 20 '22