ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2017-04-04 00:12:46 -0500 | received badge | ● Famous Question (source) |
2016-08-12 04:55:34 -0500 | received badge | ● Enthusiast |
2016-08-10 03:46:54 -0500 | received badge | ● Scholar (source) |
2016-08-10 00:28:40 -0500 | received badge | ● Supporter (source) |
2016-08-09 09:53:12 -0500 | commented answer | Weird serial behavior, and ROS loop rate Thank you so much for your insight William! By thread, you mean std::thread, right? Does ROS support this, and does it have rules to follow in this framework? Also, I'm really not familiar with serial communication. What do you mean by using a timeout, how does it affect the read and how to do? |
2016-08-09 09:47:49 -0500 | received badge | ● Notable Question (source) |
2016-08-08 17:49:34 -0500 | received badge | ● Popular Question (source) |
2016-08-08 04:42:17 -0500 | asked a question | Weird serial behavior, and ROS loop rate Hello everyone. I am currently working on a project which involves me to write a C++ differential driver and encoder publisher for an old custom DSP board, which communicates through serial port. It constantly displays the encoder info in the form of My goal would be to:
- Extract the serial string
- Define which encoder it is about with the For this matter, I am using wjwwood's serial.h library. I've got my DSP board to work correctly on Cutecom and HyperTerminal (Windows), and hence I am 99.99% sure of the accuracy of the info that I receive. So far, I wrote a code that I think should work, but I am facing issues regarding catching the info from the serial port: I get incomplete data. Also I was suspecting the ROS loop rate to play a role on this, which in fact has, but when changing it, either the refresh rate is too low, or the second encoder isn't read, or I loose all the data (and get weird values when I would be eternally thankful if anyone could help me on this. I think I've wasted way too much time on it trying to figure it out, and I'm starting to be really bothered by it. :/ Please find below the entire code I wrote. Note that I have never written a serial driver before, and therefore my knowledge on this matter is quite limited. Thank you ever so much. (more) |