Menu

Error code, 127 urg-04lx

Anonymous
2017-01-11
2017-01-30
  • Anonymous

    Anonymous - 2017-01-11

    Hi,

    after some time my sensor (https://www.hokuyo-aut.jp/02sensor/07scanner/urg_04lx_ug01.html) does not give any new measurements, instead it's throwing the error-code 127.
    Is there a list of all error-codes and what they mean?

    best regards
    Philipp

     
  • m-nagata

    m-nagata - 2017-01-13

    Hi,
    I'm sorry, but … there is no "error-code 127" in urg_04 lx_ug01.

    I would like to check the error code by UrgBenri.

    Please download installer from here.

    ① Start an application after installation and connect a sensor.
    ② Click "(i) More".
    ③ Check the "Sensor situation".
    ④ You can check "Sensor works well" or " Trouble!!Error Code=[◯◯->◯◯]".
    The number of "○○" is the error code number of the sensor.

    Best Regards.

     
  • Anonymous

    Anonymous - 2017-01-18

    Unluckily we aren't running the sensor on windows/macos. The sensor works on my computer (ubuntu 14.04) but on our robot we are using an intel nuc (NUC6i5SYB).
    The time I wrote the issue, the data collection failed after some time. Now calling urg_driver::open() the method does not return (no error given). Using the urg library 1.2.0

     
  • m-nagata

    m-nagata - 2017-01-19

    I understood that UrgBenri could not be installed in your environment.
    Then, can you connect to URG with another Serial Communication software (e.g. gtkterm , minicom, etc. )?
    If you can, send "VV", "II", "PP" command and show me the screen capture.(like attachment)

     
  • Anonymous

    Anonymous - 2017-01-19

    If it opens the lidar, get_distance(measurement) returns false, what() says "invalid response". gtk formats the output quite badly, if something is missing please let me know.

     
  • Anonymous

    Anonymous - 2017-01-19

    if it helps,
    open() returns true
    stable() returns false
    state() returns "receive error"

    calling
    stop_measurement();
    start_measurement();
    after the error has been thrown seems to "fix" it as it only happens once. Of course that's not a fix, just a work-around.

     
  • m-nagata

    m-nagata - 2017-01-20

    Thank you for telling me much information.
    "STAT: Sensor works well" is displayed in response to the II command, so the sensor has not failed. Therefore, no error code is displayed.

    And there was a bug in the library.
    Regarding the state (), stable () method of the urg library 1.2.0, it was incompatible with URG-04LX-UG01.
    Although state () has "receive error", it is working normally from the response of "II" command.

    I'm sorry, but … please check that the get_distance program (get_distance.cpp or get_distance.c) in the sample folder of the library works.
    Since state () and stable () are not used, if the sensor is really normal, you can get the distance like an attached file.

    Best Regards.

     
  • phibedy

    phibedy - 2017-01-21

    c/get_distance and cpp/get_distance works. Instead of using std::asyn I am using threads now. It works and I don't get an error (I don't know why, but ok).
    I tried c/get_distance_itensity and cpp/get_distance_itensity, both give me "invalid response".

    Thank you for support :)

     
  • m-nagata

    m-nagata - 2017-01-23

    I am glad that the get_distance sample went well!
    So, the sensor seems to be moving normally.
    There is no particular problem with using threads.

    Also, regarding the "get_distance_itensity" sample,
    The sample uses the "ME" command to obtain the intensity.
    Since "Urg_04lx_ug01" does not correspond to the "ME" command, "invalid response" is displayed.
    To acquire the intensity, please use the "MD", "MS" command without using the sample as it is.
    Communication specification ↓
    Http://www.hokuyo-aut.jp/02sensor/07scanner/download/pdf/URG_SCIP20.pdf
    P.10
    8.1 [MDMS command]

    Best Regards.

     
  • phibedy

    phibedy - 2017-01-23

    Thank you for the pdf, quite useful!
    Where should I change it? In the drivercode ->start_measurement sets it.

    Do I have to change the driver?
    case URG_DISTANCE_INTENSITY:
    ret = send_distance_command(urg, scan_times, skip_scan,
    'G', 'M', 'E');
    break;

    and change the E to an D?

    best regards

     

    Last edit: phibedy 2017-01-23
  • m-nagata

    m-nagata - 2017-01-24

    I'm sorry I mistook the other day's answer.
    I checked the specification sheet that "Urg_04lx_ug01" can not acquire itensity data.
    Therefore, the get_distance_itensity sample does not work.

    Please accept our apologies.

     
  • phibedy

    phibedy - 2017-01-26

    Ah ok thank you :)
    I can't reopen the sensor after the application crashed, was terminated by the user.
    (if urg::close(...) is not called). What's the best way of resetting it? Is it possible to call urg::open() with a timeout?

     
  • Mehrez Kristou

    Mehrez Kristou - 2017-01-30

    Hi Philipp,

    When the sensor is in continous mode, it will send the data until it is stopped by the application. In case the application crashes. The stop command is not receieved and the sensor will be unstopable.
    In the get_distance program, the next code should be changed to handshake mode,

    From this

        urg_start_measurement(&urg, URG_DISTANCE, URG_SCAN_INFINITY, 0);
        for (i = 0; i < CAPTURE_TIMES; ++i) {
            n = urg_get_distance(&urg, data, &time_stamp);
            if (n <= 0) {
                printf("urg_get_distance: %s\n", urg_error(&urg));
                free(data);
                urg_close(&urg);
                return 1;
            }
            print_data(&urg, data, n, time_stamp);
        }
    

    to this

        for (i = 0; i < CAPTURE_TIMES; ++i) {
            urg_start_measurement(&urg, URG_DISTANCE, 1, 0);
            n = urg_get_distance(&urg, data, &time_stamp);
            if (n <= 0) {
                printf("urg_get_distance: %s\n", urg_error(&urg));
                free(data);
                urg_close(&urg);
                return 1;
            }
            print_data(&urg, data, n, time_stamp);
        }
    

    In the secoand variance, every time the application would request a measuement. If the application crashes, the sensor would be responsive for the next reconnection.

    Regards,
    Krtstou

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB