Send GPS data from a computer
Can I send GPS data (computed somehow) to a UART port from a computer i.e. physically connecting the UART to USB?
Asked by Trishant_Roy_221b on 2018-10-10 15:39:38 UTC
Answers
Hi
you can publish GPS data in two way by micro or you connect GPS too pc via ftdi(or somthing else)
in firs way you can use rosserial and send GPS data too pc in ros topic
in second way you need write node c++ or python that communication to GPS sensor via ftdi(or something else) and get sensor data and publish too ros
Asked by Hamid Didari on 2018-10-11 00:47:17 UTC
Comments
Hey... Thanks for the reply. The methods that you have mentioned are when we want to get data from the GPS module. I want to send data (of GPS type) to a particular port (hardware UART port).
Asked by Trishant_Roy_221b on 2018-10-11 00:57:18 UTC
with rosserial you can send data to uart and simply you can send data in your node too usb with sreial lib
Asked by Hamid Didari on 2018-10-11 01:09:41 UTC
Ohkay.. Can you send an example/tutorial where this has been implemented?
I found a different approach (not ROS): http://www.catb.org/gpsd/gpsfake.html But this is a long approach since I would first have to publish the data in a text file and then use it. Not preferable.
Asked by Trishant_Roy_221b on 2018-10-12 11:39:55 UTC
i don't realize your problem correctly , your question about how to use serial port in ros and send data via serial port?
Asked by Hamid Didari on 2018-10-12 13:18:12 UTC
I am getting GPS-type data on a ROS topic. I want to send this data to a UART port in some controller from my computer. So there should be a connection (hardware) between my computer's USB port to the UART port in the controller and then send data. Did you understand the question?
Asked by Trishant_Roy_221b on 2018-10-13 04:05:33 UTC
According to you, this can be done using rosserial, right? If possible can you send an example/tutorial where this has been done?
Asked by Trishant_Roy_221b on 2018-10-13 04:06:54 UTC
in this link you can see an example of rosseria with arduino a simple way write an python node that subscribe gps data and send data to your port
Asked by Hamid Didari on 2018-10-13 04:22:58 UTC
rosserial_arduino would require an Arduino as well, right? Is there a way to communicate with only the computer and the UART port on a controller?
Asked by Trishant_Roy_221b on 2018-10-13 04:53:25 UTC
do you know how to use serial port in c++ or python app?
Asked by Hamid Didari on 2018-10-13 05:45:17 UTC
No. I haven't worked with serial ports.
Asked by Trishant_Roy_221b on 2018-10-13 05:49:20 UTC
you need to know how to use serial port and then just write a node . here is some example of how to use serial port in python or c++
Asked by Hamid Didari on 2018-10-13 06:02:06 UTC
Thank you. So I can write a C++ code directly to send data to a UART port, right? Can I use the code in the ROS node also?
Asked by Trishant_Roy_221b on 2018-10-13 06:05:43 UTC
yes , you can
Asked by Hamid Didari on 2018-10-13 06:07:24 UTC
Thanks a lot... I will look at the example you have sent.
Asked by Trishant_Roy_221b on 2018-10-13 06:18:29 UTC
Comments
I'm tempted to close this question as off-topic. What does this have to do with ROS? If you are asking about specific hardware devices with ROS support, are dealing with specific ROS packages, or something specific to ROS, please edit your question to include that vital information.
Asked by jarvisschultz on 2018-10-10 15:53:48 UTC
It sounds like you are asking about generic communication between a microcontroller's UART and a PC. If that is the case, this may not be the right place to ask.
Asked by jarvisschultz on 2018-10-10 15:54:53 UTC
It might be that you are looking for a particular piece of hardware that allows USB-to-UART communication. Perhaps you are interested in something like an FTDI cable
Asked by jarvisschultz on 2018-10-10 15:56:03 UTC
I want to send GPS data that I am getting in ROS. I want to know if anyone has done this i.e. send GPS data. I understand that ROS isn't an essential part of the problem. But there may be people in this community who can solve this problem.
Asked by Trishant_Roy_221b on 2018-10-10 16:01:10 UTC
Is this forum totally for ROS-centric doubts? If yes, I will close/delete the topic and my apologies!
Asked by Trishant_Roy_221b on 2018-10-10 16:05:25 UTC
Certainly this Q&A site is specifically for ROS topics. In me eyes, this is a borderline case. You are using ROS, but the answer to your question may have nothing to do with ROS, and the original question gave no ROS context. Since you received an answer concerning a ROS package, I suppose it's ok.
Asked by jarvisschultz on 2018-10-11 09:00:06 UTC