ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rclcpp parameter build fail

asked 2018-06-20 17:58:29 -0600

aarushg gravatar image

updated 2018-06-20 18:00:13 -0600

I was trying to build the laser_proc repo for ros2 found here , but I am getting these errors. However it used to build properly until a couple days ago, I am guessing before this PR was merged : https://github.com/ros2/rclcpp/pull/4.. . because the errors pertain to changes made in this PR, however when I include rclcpp header file and use parameters in other codes it builds and works fine, for example talker code from demo_nodes_cpp works fine with parameters callbacks and everything, so what is going wrong in this laser_proc package?

Scanning dependencies of target laser_publisher
[ 25%] Building CXX object CMakeFiles/laser_publisher.dir/src/LaserPublisher.cpp.o
In file included from /home/batman/ros2_ws/install/include/rclcpp/node_interfaces/node_parameters_interface.hpp:26:0,
                 from /home/batman/ros2_ws/install/include/rclcpp/node.hpp:48,
                 from /home/batman/ros2_ws/install/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/batman/ros2_ws/install/include/rclcpp/executors.hpp:22,
                 from /home/batman/ros2_ws/install/include/rclcpp/rclcpp.hpp:144,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/include/laser_proc/LaserPublisher.h:37,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/src/LaserPublisher.cpp:34:
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:65:12: error: expected primary-expression before ‘auto’
   decltype(auto)
            ^
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:65:12: error: expected ‘)’ before ‘auto’
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:65:3: error: expected unqualified-id before ‘decltype’
   decltype(auto)
   ^
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:73:12: error: expected primary-expression before ‘auto’
   decltype(auto)
            ^
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:73:12: error: expected ‘)’ before ‘auto’
/home/batman/ros2_ws/install/include/rclcpp/parameter.hpp:73:3: error: expected unqualified-id before ‘decltype’
   decltype(auto)
   ^
In file included from /home/batman/ros2_ws/install/include/rclcpp/node.hpp:449:0,
                 from /home/batman/ros2_ws/install/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/batman/ros2_ws/install/include/rclcpp/executors.hpp:22,
                 from /home/batman/ros2_ws/install/include/rclcpp/rclcpp.hpp:144,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/include/laser_proc/LaserPublisher.h:37,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/src/LaserPublisher.cpp:34:
/home/batman/ros2_ws/install/include/rclcpp/node_impl.hpp: In member function ‘bool rclcpp::Node::get_parameter(const string&, ParameterT&) const’:
/home/batman/ros2_ws/install/include/rclcpp/node_impl.hpp:233:23: error: ‘class rclcpp::Parameter’ has no member named ‘get_value’
     value = parameter.get_value<ParameterT>();
                       ^
/home/batman/ros2_ws/install/include/rclcpp/node_impl.hpp:233:43: error: expected primary-expression before ‘>’ token
     value = parameter.get_value<ParameterT>();
                                           ^
/home/batman/ros2_ws/install/include/rclcpp/node_impl.hpp:233:45: error: expected primary-expression before ‘)’ token
     value = parameter.get_value<ParameterT>();
                                             ^
In file included from /home/batman/ros2_ws/install/include/rclcpp/rclcpp.hpp:148:0,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/include/laser_proc/LaserPublisher.h:37,
                 from /home/batman/ros2_ws/src/urg_package/laser_proc/src/LaserPublisher.cpp:34:
/home/batman/ros2_ws/install/include/rclcpp/parameter_client.hpp: In member function ‘T rclcpp::SyncParametersClient::get_parameter_impl(const string&, std::function<T()>)’:
/home/batman/ros2_ws/install/include/rclcpp/parameter_client.hpp:207:37 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2018-06-20 18:00:34 -0600

Dirk Thomas gravatar image

The CMake code of that package sets the compiler flag -std=c++11. If you are using the current ROS 2 code base you will need C++ 14.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-06-20 17:58:29 -0600

Seen: 1,226 times

Last updated: Jun 20 '18