I'm using an ardusimple board, it has an ublox f9p receiver. I'm using kumar driver t get /fix topic I fuse GPS data with IMU and wheel encoders using two instance of robot_localization package and navsat_node. The robot runs ubuntu 22.04 and ros iron on a Jetson Nano without internet connections. I spend some time to debug a problem, EKF was not consuming GPS data. If I set the current date and time on the ubuntu OS everything start to work ok. So I would like to know possible solutions for that. Right now I'm setting date and time manually looking at my cell phone to get current data, but I would like to automate this process.
1 Answer
$\begingroup$
$\endgroup$
3
Jetson Nano doesn't have a Real Time Clock so you can't get right date and time when you shutdown and restart it. Here are some solutions :
- Add a RTC to your jetson nano
- Use GPS time as source of truth and set time on your device using "date" CLI
-
$\begingroup$ is there a way to automate that? $\endgroup$ Commented Feb 19 at 14:35
-
$\begingroup$ Yes of course ! Subscribe to the GPS data and when you see that you receive the correct date and time (you can observe that because it will go from system date to correct date and consequently you will receive a jump in time), you set it with "date" CLI. In python, something like "subprocess.run( ["date", "-u", "--set", dt.strftime("%Y-%m-%d %H:%M:%S")], check=True, capture_output=True, )" with "dt" the datetime retrieved in the GPS data header. $\endgroup$ Commented Feb 19 at 14:52
-
$\begingroup$ Thank you very much! I finally found this post: forums.developer.nvidia.com/t/… I will try both method. $\endgroup$ Commented Feb 20 at 1:52