SICKAG / sick_scan

sick_scan is an open-source project to support the laser scanner of the company SICK using the ROS-framework
Apache License 2.0
130 stars 104 forks source link

The timelimit in the launch file does not take effect #160

Closed FlyHan closed 2 years ago

FlyHan commented 2 years ago

The timeout is determined by const(timeout = 30000), but it has nothing to do with timelimit

sick_scan_common_tcp.cpp:

int SickScanCommonTcp::get_datagram(ros::Time &recvTimeStamp, unsigned char *receiveBuffer, int bufferSize,
                                      int *actual_length,
                                      bool isBinaryProtocol, int *numberOfRemainingFifoEntries)
    ...  
     /*
     * Write a SOPAS variable read request to the device.
     */
    std::vector<unsigned char> reply;

    // Wait at most 5000ms for a new scan
    size_t timeout = 30000;
    bool exception_occured = false;

    char *buffer = reinterpret_cast<char *>(receiveBuffer);

    if (readWithTimeout(timeout, buffer, bufferSize, actual_length, &exception_occured, isBinaryProtocol) !=
        ExitSuccess)
    ...
rostest commented 2 years ago

We recommend to use sick_scan_xd for further development. Regarding the issue, there are two different timelimits: