Xamla / torch-ros

Torch7/lua wrapper of roscpp via ffi.
http://www.xamla.com/
BSD 3-Clause "New" or "Revised" License
20 stars 5 forks source link

node_handle getParam signature build failure #4

Closed mryellow closed 8 years ago

mryellow commented 8 years ago

Building against indigo with catkin workspace environment sourced.

/tmp/luarocks_torch-ros-scm-1-1160/torch-ros/src/ros/node_handle.cpp: In function ‘bool ros_NodeHandle_getParamFloat(ros::NodeHandle*, const char*, float*)’:
/tmp/luarocks_torch-ros-scm-1-1160/torch-ros/src/ros/node_handle.cpp:212:37: error: no matching function for call to ‘ros::NodeHandle::getParam(const char*&, float&)’
   return self->getParam(key, *result);
                                     ^
/tmp/luarocks_torch-ros-scm-1-1160/torch-ros/src/ros/node_handle.cpp:212:37: note: candidates are:
In file included from /home/yellow/work/ros/catkin_ws/src/ros_comm/roscpp/include/ros/ros.h:45:0,
                 from /tmp/luarocks_torch-ros-scm-1-1160/torch-ros/src/ros/torch-ros.h:9,
                 from /tmp/luarocks_torch-ros-scm-1-1160/torch-ros/src/ros/node_handle.cpp:1:

Then it spits out failed attempts at each signature, except the one with float, which is strange.

Should the first param on your end be of type const string&?

Something needs changing in my build environment?

mryellow commented 8 years ago
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works

Have tried 4.6 and 4.8 also.

http://programmers.stackexchange.com/a/190726/176128

This post suggests gcc will treat implicit type conversion more strictly than some...

mryellow commented 8 years ago

This float signature for getParam is missing in roscpp version 1.11.10 release.

indigo-devel branch: https://github.com/ros/ros_comm/blob/cd10ec9cc333e33e12ec753872d6c55b2e6d22be/clients/roscpp/include/ros/node_handle.h#L1614

Missing in 1.11.10: https://github.com/ros/ros_comm/blob/1.11.10/clients/roscpp/include/ros/node_handle.h#L1493-L1504

Fixed in 1.11.14: https://github.com/ros/ros_comm/blob/1.11.14/clients/roscpp/include/ros/node_handle.h#L1602