I am using this open source software for working with Sick Lidar Devices:
https://github.com/rhuitl/sicktoolbox/tree/master/trunk/c%2B%2B/drivers/lms5xx/sicklms5xx
and this documentation which provides information on the data:
I am trying to use the C++ implementation to parse already written files in the "CoLa B" format from SickLMS5xx, mentioned in said documentation. However, this toolbox appears to have been written to deal with the device directly, and not files that are outputted from it (like what I am working with).
It appears I can use the functions in the SickLMS5xxMessage (ParseMessage() etc.) to achieve what I want. I made a main method to interract with this class (and it's SickMessage() superclass) like so:
#include <iostream>
#include <fstream>
#include <boost/thread/thread.hpp>
#include "SickLMS5xxMessage.cc"
void run() {
SickLMS5xxMessage msg(uint8_t * const telegramFileBuffer[]);
std::ifstream telegramFile("MMS21_01");
if(telegramFile.is_open()) {
uint8_t telegramFileBuffer[msg.GetMessageLength()];
for(int i = 0; i < msg.GetMessageLength(); ++i) {
telegramFile >> telegramFileBuffer[i];
}
}
msg.Print();
}
int main (int argc, char** argv) {
run();
return (0);
}
But it doesn't appear to work properly, as it cannot recognise the GetMessageLength() and Print() functions from SickLMS5xxMessage, and gives me an unresolved method error?
Maybe it's an error with my C++ coding (because I come from a Java background and so C++ is still relatively new to me).
Any help will be appreciated though, thank you :)