Page 13 of 20 FirstFirst ... 391011121314151617 ... LastLast
Results 121 to 130 of 197

Thread: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

  1. #121
    Join Date
    Nov 2010
    Location
    Fresno,CA
    Posts
    170
    Rep Power
    30

    Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Staring at the hex editor the last few hours and trying to figure out this "checksum" made me ask a more fundamental question. Why would you include a checksum on a hard wired serial link? I know the standard answer of good practice, but it seems like a checksum is a complete waste. Data errors are almost non-existent in a scenario like this.

    Maybe we are going about this in the wrong way, perhaps this is not a checksum at all... Or perhaps I just need sleep!

    EDIT: I did not think about the slip ring though, that is a good reason to add a checksum...

    Another EDIT: What has me thinking along this line is the fact that it is really REALLY simple to implement a checksum that works. Complexity seems too high for this to JUST be a checksum... Maybe there is some data being sent here we are not taking into consideration...
    Last edited by hash79; 11-28-2010 at 04:44 AM.

  2. Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Quote Originally Posted by hash79 View Post
    Staring at the hex editor the last few hours and trying to figure out this "checksum" made me ask a more fundamental question. Why would you include a checksum on a hard wired serial link? I know the standard answer of good practice, but it seems like a checksum is a complete waste. Data errors are almost non-existent in a scenario like this.
    [...]
    EDIT: I did not think about the slip ring though, that is a good reason to add a checksum...
    [...]
    Int the white paper, they say :

    Power for the laser module is supplied through a 2-wire
    slip ring on the rotation center. Communication to the
    module is via a short-range radio frequency modem, at
    115 Kbaud, sufficient to send 2-byte data for each
    reading.
    So it looks like enough uncertainty on the communication to add a checksum to me...
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  3. #123
    Join Date
    Nov 2010
    Location
    Sunnyvale, CA
    Posts
    55
    Rep Power
    26

    Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    I believe that between the time of the paper and production the RF link went away and was replaced by the slip ring. The checksum may also be there to detect framing misalignment -- mistaking FA in data for the sync byte. But, I agree, why a complex checksum? Good question.

  4. Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Ok, found it.

    Code:
    def checksum(data):
        # group the data by word, little endian
        data_list = []
        for t in range(10):
            data_list.append( data[2*t] + (data[2*t+1]<<8) )
        
        # compute the checksum.
        chk32 = 0
        for data in data_list:
            chk32 = (chk32 << 1) + data
    
        # return a value wrapped around on 15bits, and truncated to still fit into 15 bits
        checksum = (chk32 & 0x7FFF) + ( chk32 >> 15 ) # wrap around to fit into 15 bits
        checksum = checksum & 0x7FFF # truncate to 15 bits
        return int( checksum )
    This is implemented and tested in the last version of the code here : https://github.com/Xevel/NXV11
    (package attached for your convenience)
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  5. #125
    Join Date
    Nov 2007
    Location
    Sunnyvale
    Posts
    65
    Rep Power
    42

    Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Quote Originally Posted by DaveC View Post
    But, I agree, why a complex checksum? Good question.
    Just guessing here: Some types of links are subject to polarity inversion, and you need more than a simple sum of bytes to detect that kind of problem.

    But I'm not sure this checksum has that property anyway, since it seems like a simple sum of rotated words. That is, you can cancel out a word with addition/subtraction, and the only complicated bit is that the word is rotated as hash demonstrated.

    That kind of checksum only helps if you have a problem with words arriving out of order, or buffers slipping, or something. Maybe it's a guard against buggy code or buggy DMA hardware?

    - Nammo

  6. #126
    Join Date
    Nov 2010
    Location
    Fresno,CA
    Posts
    170
    Rep Power
    30

    Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Nammo - yea, not really sure without knowing the troubles faced by the designers...

    Xevel - Do you want me to test that code with live data? Is there anything displayed regarding the checksum?

    The whitepaper should be looked at as a loose guide, it looks like they made a lot of improvements from that initial device and probably did quite a bit to reduce cost/complexity such as the removal of the RF link. The theory is still the same, but I wouldn't rely too heavily on specifics...

    -Hash

  7. Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Quote Originally Posted by DaveC View Post
    But, I agree, why a complex checksum? Good question.
    M understanding is that you put control data in a data stream for various reasons. Sometimes authentication, sometimes error detection, sometimes error correction...
    The choice of an algorithm is most probably directed by it's ability to check for the problems the system can have (polarity inversion, noise flipping bits, data loss, data ordering, security concerns, etc).

    I guess this particular checksum just does the job for whatever problem this data link might have, and at the same time is way easier to compute than CRCs and fancy stuff like that.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  8. Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Quote Originally Posted by hash79 View Post
    Xevel - Do you want me to test that code with live data? Is there anything displayed regarding the checksum?
    Sure
    If the data is wrong, it will write a message in the python console. However now that I think of it, this approach of signaling the problem is not the best... but it proves the point.
    Last edited by Xevel; 11-28-2010 at 12:39 PM.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

  9. #129
    Join Date
    Nov 2010
    Location
    Fresno,CA
    Posts
    170
    Rep Power
    30

    Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Xevel - As soon as I complete the tasks on the wife checklist I will check it out! If I see some messages I will modify the code to use an error counter instead so we can keep track...

    -Hash

  10. Re: The Open Lidar Project - Hack the Neato XV-11 Lidar for a $200 Bounty!

    Quote Originally Posted by hash79 View Post
    Xevel - As soon as I complete the tasks on the wife checklist I will check it out! If I see some messages I will modify the code to use an error counter instead so we can keep track...
    Yeah nice idea. And I just added it to the code in the repository.


    EDIT: Gallamine, could you check your PM please ?
    Last edited by Xevel; 11-28-2010 at 01:01 PM.
    ---
    Personal blog: http://xevel.org
    USB2AX documentation: http://xevelabs.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •