Error while installing SICK LIDAR C++/MATLAB toolbox

asked 2016-03-24 18:28:55 -0600

cybodroid gravatar image

updated 2016-03-24 18:33:25 -0600

Hello, As discussed on http://sicktoolbox.sourceforge.net/in... , I went to https://sourceforge.net/project/showf... and downloaded the source code configure it by ./configure

and then I did make

But on doing make, I am getting errors. They look like this:

../../../../c++/drivers/base/src/SickBufferMonitor.hh: In member function 'void SickToolbox::SickBufferMonitor<SICK_MONITOR_CLASS, SICK_MSG_CLASS>::_readBytes(uint8_t*, int, unsigned int) const':
../../../../c++/drivers/base/src/SickBufferMonitor.hh:359:47: error: there are no arguments to 'getdtablesize' that depend on a template parameter, so a declaration of 'getdtablesize' must be available [-fpermissive]
       num_active_files = select(getdtablesize(),&file_desc_set,0,0,(timeout_value > 0) ? &timeout_val : 0);
                                               ^
../../../../c++/drivers/base/src/SickBufferMonitor.hh:359:47: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../../../c++/drivers/base/src/SickBufferMonitor.hh:373:73: error: there are no arguments to 'read' that depend on a template parameter, so a declaration of 'read' must be available [-fpermissive]
      num_bytes_read = read(_sick_fd,&dest_buffer[total_num_bytes_read],1);
                                                                         ^
../../../../c++/drivers/base/src/SickBufferMonitor.hh: In static member function 'static void* SickToolbox::SickBufferMonitor<SICK_MONITOR_CLASS, SICK_MSG_CLASS>::_bufferMonitorThread(void*)':
../../../../c++/drivers/base/src/SickBufferMonitor.hh:459:18: error: there are no arguments to 'usleep' that depend on a template parameter, so a declaration of 'usleep' must be available [-fpermissive]
       usleep(1000);
                  ^
../../../../c++/drivers/base/src/SickBufferMonitor.hh: In instantiation of 'void SickToolbox::SickBufferMonitor<SICK_MONITOR_CLASS, SICK_MSG_CLASS>::_readBytes(uint8_t*, int, unsigned int) const [with SICK_MONITOR_CLASS = SickToolbox::SickLDBufferMonitor; SICK_MSG_CLASS = SickToolbox::SickLDMessage; uint8_t = unsigned char]':
SickLDBufferMonitor.cc:59:2:   required from here
../../../../c++/drivers/base/src/SickBufferMonitor.hh:359:47: error: 'getdtablesize' was not declared in this scope
       num_active_files = select(getdtablesize(),&file_desc_set,0,0,(timeout_value > 0) ? &timeout_val : 0);
                                               ^
../../../../c++/drivers/base/src/SickBufferMonitor.hh:373:73: error: 'read' was not declared in this scope
      num_bytes_read = read(_sick_fd,&dest_buffer[total_num_bytes_read],1);

How to resolve this error and successfully install SICK LIDAR toolbox?

edit retag flag offensive close merge delete

Comments

I am having the same problem. Did you manage to resolve it?

SRG gravatar image SRG  ( 2016-08-17 09:09:03 -0600 )edit

We can solve this issue by adding line: #include <unistd.h> into 2 source files: c++/drivers/base/src/SickLIDAR.hh c++/drivers/base/src/SickBufferMonitor.hh

holetri gravatar image holetri  ( 2016-08-26 02:42:17 -0600 )edit

For what its worth Holetri's suggestion worked for me.

hipystix gravatar image hipystix  ( 2016-11-20 22:02:08 -0600 )edit