Closed marija185 closed 3 years ago
Hello Marija,
no idea who "Alexandre" is but I'm surprised that m_receivedTime
seems to always be zero in your case. I would expect it to be set whenever a header is read.
If I understand you correctly, you suggest to update m_receivedTime
on every call of SerialCommS300::readData
by moving the above assignment to line 256. This will change the semantics of m_receivedTime
though. With this change, m_receivedTime
won't denote the header's time of arrival anymore but rather the time when SerialCommS300::readData
was called. I have a feeling that this is only a spurious fix to the issue you encountered.
Unfortunately I don't have access to an S300 Pro laser scanner anymore (I'm working in a different place now) so I cannot assess the suggested change properly. Can someone else with access to the laser chime in? I'd also be happy to make the above change, or approve a corresponding merge request, if someone with said laser scanner can confirm the change of semantics being unproblematic.
Hello Dimitri I'm sorry for the open issue. I did a mistake. I was looking at the wrong driver. The actual problem was in this driver taken from yours: https://github.com/alexdesaint/Sick300Pro_ROS_TCP
Here m_receivedTime was never set.
best regards
Marija
Hello Alexandre
we found an issue with the driver. The header time of the scan message is always zero so both amcl and gmapping can not work with such a scan message. We solved this by putting the line:
at the line 256 of src/serialcomm_s300.cpp.
Can you please double check this and make the change? If not I can fork this driver and make a merge request later.
best regards
Marija