Reading .DAT files from SICK Laser

297 views
Skip to first unread message

Yamanoor Sai Ram

unread,
Sep 18, 2011, 12:32:40 AM9/18/11
to hbrob...@googlegroups.com, chi...@yahoogroups.com
Hello All,

I have a data file that consists of a single sweep of data from a SICK Laser (180 degrees). I was able to find information on the web that I could use the GNU Plot tool or MST demo tool from SICK Laser to visualize it. I tried doing that but I got some errors mentioning that file was invalid. I did try plotting the 2D sweep using Matlab and I am not sure whether I got it right. 

Are there any standard techniques to plot 2D sweeps from LASERs?

Sai

Rafael Skodlar

unread,
Sep 18, 2011, 2:57:39 AM9/18/11
to hbrob...@googlegroups.com
On 09/17/2011 09:32 PM, Yamanoor Sai Ram wrote:
> Hello All,
>
> I have a data file that consists of a single sweep of data from a SICK
> Laser (180 degrees). I was able to find information on the web that I
> could use the GNU Plot tool or MST demo tool from SICK Laser to
> visualize it. I tried doing that but I got some errors mentioning that
> file was invalid. I did try plotting the 2D sweep using Matlab and I am
> not sure whether I got it right.
>

You need to send data through some kind of parser in order to feed it to
gnuplot. See examples of gnuplot files:
http://gnuplot.sourceforge.net/demo/

> Are there any standard techniques to plot 2D sweeps from LASERs?
>
> Sai

I'm not familiar with that device or data from it. However, you simply
need to get the data in format for processing no matter where it comes
from. Pay attention to record separator(s), line terminators, and any
escape sequences. I doubt you could simply dump it to gnuplot command
without reformatting.

It's a good idea to check unfamiliar files with Unix utilities like od
(octal dump or other formats), or mc (midnight commander) for any
unprintable characters.

Question like this could be better answered had you included a few lines
of that file or better yet, provide a link to it. It would also be
helpful had you provided the commands you used to test the file etc. to
see if it behaves the same on other systems.

--
Rafael

Yamanoor Sai Ram

unread,
Sep 18, 2011, 11:39:09 AM9/18/11
to hbrob...@googlegroups.com
Thanks for the reply. You were right. I tried using gnuplot but I could not use the data as it is to plot those points. I am attaching a copy of the file. 

 I used a C# code to interpret the file. I was not able to understand the file content as they mostly contained digits for several lines. There were no delimiter strings or any of that sort.

I didnt know how to interpret the data.

Sai




--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.


scan0000 (1).dat

Rafael Skodlar

unread,
Sep 19, 2011, 1:04:09 AM9/19/11
to hbrob...@googlegroups.com
On 09/18/2011 08:39 AM, Yamanoor Sai Ram wrote:
> Thanks for the reply. You were right. I tried using gnuplot but I could
> not use the data as it is to plot those points. I am attaching a copy of
> the file.
>

I looked at the file and immediately noticed it's in binary format. That
means it's going to be a bit hard to decode unless you know what program
put it together. I learned from one of first search responses on the
Internet: http://users.isr.ist.utl.pt/~vale/english/projects/sick/sick.html
that Sick Laser communicates over RS-232 or RS422 wires which makes it
relatively slow. It's important to know that
"Sick Laser has two modes of operation: the Installation Mode and
Operation Mode. The Installation Mode is defined for configurations and
the Operation Mode for acquisitions."

"The information or data exchanged with the Sick Laser is carried by
telegrams. There are two types of telegrams,

telegrams to the Sick Laser:
STX ADR LENG_L LENG_H CMD MODE CRC_L CRC_H

and telegrams from the Sick Laser:
STX LMI LENG_L LENG_H ...body... CRC_L CRC_H"

It's not obvious from your file if it contains telegrams as described above.

> I used a C# code to interpret the file. I was not able to understand
> the file content as they mostly contained digits for several lines.
> There were no delimiter strings or any of that sort.
>

To go forward, one needs to know if:
- the file is a dump of a single record, i.e. telegram sent from the LMS
- data represents a snapshot of data communication between the LMS and PC
- the file contains only raw data; i.e. data from LMS stripped of header
- what mode the LMS was set at:
http://www.pages.drexel.edu/~kws23/tutorials/sick/LMS_Quick_Manual_V1_1.pdf

Nowhere in the file I can find string "02 80" which indicates telegram
or packet start. You may want to poke around
http://www.pages.drexel.edu/~kws23/tutorials/sick/sick.html for more
information and try their VB program.

> I didnt know how to interpret the data.
>
> Sai
>

I suspect a less expensive HBRC laser scanner with open protocol is much
needed :-)

Sorry I could not be of more help.

--
Rafael

Reply all
Reply to author
Forward
0 new messages