Ask Your Question
0

win_ros, image_transport not compiling due to class_loader

asked 2013-11-05 04:03:24 -0500

Flos gravatar image

I have to use a camera which has only windows drivers (Ladybug5). I thought I can use WIN_ROS for this together with the image_transport package to publish the images over the network to a Linux system where I want to do some post processing.

I used this guide to setup WIN_ROS on a Windows 8 Host: *ttp://wiki.ros.org/win_ros/hydro/Msvc%20Compiled%20SDK

After checking that the samples where working, I started to install the Dependencys for image_transport with the wstool:

wstool set image_common --git *ttps://github.com/ros-perception/image_common.git --version=hydro-devel
wstool set pluginlib --git *ttps://github.com/ros/pluginlib --version=groovy-devel
wstool set class_loader --git *ttps://github.com/ros/class_loader.git --version= hydro-devel

Additionally I installed the console_bridge and poco to:

C:\work\non-catkin\console_bridge
C:\poco

And I Added the lib paths of both to the Windows Enviroment variable

PATH=C:\Python27\;C:\Python27\Scripts;C:\poco\lib;C:\work\non-catkin\install\lib

When I try to compile it I get stuck at:

[  4%] Built target rosconsole
Scanning dependencies of target plugin_tool
[  4%] Building CXX object pluginlib/CMakeFiles/plugin_tool.dir/src/plugin_tool.cpp.obj
plugin_tool.cpp
c:\work\ws\src\ros\core\roslib\include\ros/package.h(43) : warning C4005: 'ROS_FORCE_INLINE' : macro redefinition
        c:\work\ws\src\roscpp_core\cpp_common\include\ros/macros.h(36) : see previous definition of 'ROS_FORCE_INLINE'
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : error C2059: syntax error : '('
        c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(298) : see reference to class template instantiation 'pluginlib::ClassLoader
<T>' being compiled
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : error C2059: syntax error : ')'
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : error C2143: syntax error : missing ';' before ')'
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : warning C4183: '__attribute__': missing return type; assumed to be a member fu
nction returning 'int'
c:\work\ws\src\pluginlib\include\pluginlib/class_loader.h(83) : error C2238: unexpected token(s) preceding ';'
c:\work\ws\src\pluginlib\include\pluginlib\class_loader_imp.h(121) : error C2039: 'createClassInstance' : is not a member of 'pluginlib::Class
Loader<T>'
c:\work\ws\src\pluginlib\src\plugin_tool.cpp(37) : fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
Stop.

Questions:

Has anyone image_transport working with WIN_ROS? How?

Any suggestions how to fix it?

If its not working, what would be the next best option to transport the images over network to ROS?

Thanks allot!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2013-11-05 17:42:15 -0500

Daniel Stonier gravatar image

Any package beyond that which win_ros is configured for hasn't been ported for windows yet. This would probably be inclusive of everything that is a library as it needs windows style declspec header declarations...at least. Quite often the packages will be trying to reference posix headers or function calls and that needs porting too.

While it's not hard, it is a considerable effort. If you do wish to tackle it, you can look at the winros stacks as a reference to see what is required (ask questions on the winros mailing list) and start hacking. If it's a core ros stack, the guys at OSRF are usually pretty quick and ready to accept pull requests which assist in this effort.

Getting the publishing part of the image pipeline working would be a really useful addition to the current winros stacks.

edit flag offensive delete link more

Comments

Hi,

I am trying to port class_loader lib to windows (Visual Studio). I followed the daniel´s suggestion and I tried to put some __declspec(dllexport) header declarations in plugin´s classes but nothing worked. Does anyone have some tips to help?

f.carvalho gravatar image f.carvalho  ( 2015-05-01 09:44:24 -0500 )edit
0

answered 2017-06-13 14:58:40 -0500

Gianpaolo gravatar image

Hi, I think that the problem is the __attribute__((deprecated)) function attribute on line 83. I cut it and the problem disappeared. At least, this worked to me on windows xp.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-11-05 04:03:24 -0500

Seen: 748 times

Last updated: Jun 13 '17