gokulp01 / ros2-ublox-zedf9p

ROS2 drivers for U-blox ZED F9P
32 stars 15 forks source link

ublox_gps build error #2

Closed KIMRRR closed 1 year ago

KIMRRR commented 1 year ago

when I build packages, there were three types of error

1

In file included from /opt/ros/foxy/include/rclcpp/node.hpp:1224, from /opt/ros/foxy/include/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/foxy/include/rclcpp/executors.hpp:22, from /opt/ros/foxy/include/rclcpp/rclcpp.hpp:146, from /home/nuc/ublox_ws/src/ros2-ublox-zedf9p/ublox_gps/src/node.cpp:42: /opt/ros/foxy/include/rclcpp/node_impl.hpp: In instantiation of ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = rclcpp::ParameterType; std::string = std::__cxx11::basic_string; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’: /home/nuc/ublox_ws/src/ros2-ublox-zedf9p/ublox_gps/src/node.cpp:253:62: required from here /opt/ros/foxy/include/rclcpp/node_impl.hpp:169:23: error: no matching function for call to ‘rclcpp::ParameterValue::get() const’ 169 | ).get(); | ^

2

/opt/ros/foxy/include/rclcpp/parameter_value.hpp:148:3: note: candidate: ‘template constexpr typename std::enable_if<(type == rclcpp::PARAMETER_BOOL), const bool&>::type rclcpp::ParameterValue::get() const’ 148 | get() const | ^~~ /opt/ros/foxy/include/rclcpp/parameter_value.hpp:148:3: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/parameter_value.hpp:159:3: note: candidate: ‘template constexpr typename std::enable_if<(type == rclcpp::PARAMETER_INTEGER), const long int&>::type rclcpp::ParameterValue::get() const’ 159 | get() const | ^~~ /opt/ros/foxy/include/rclcpp/parameter_value.hpp:159:3: note: template argument deduction/substitution failed: /opt/ros/foxy/include/rclcpp/parameter_value.hpp:170:3: note: candidate: ‘template constexpr typename std::enable_if<(type == rclcpp::PARAMETER_DOUBLE), const double&>::type rclcpp::ParameterValue::get() const’ 170 | get() const | ^~~

3

/opt/ros/foxy/include/rclcpp/node_impl.hpp:169:23: required from ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = rclcpp::ParameterType; std::string = std::cxx11::basic_string; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/nuc/ublox_ws/src/ros2-ublox-zedf9p/ublox_gps/src/node.cpp:253:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:254:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const bool&>’ /opt/ros/foxy/include/rclcpp/node_impl.hpp: In instantiation of ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = rclcpp::ParameterType; std::string = std::cxx11::basic_string; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’: /home/nuc/ublox_ws/src/ros2-ublox-zedf9p/ublox_gps/src/node.cpp:253:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:263:3: note: candidate: ‘template constexpr typename std::enable_if<(std::is_integral<_Tp>::value && (! std::is_same<T, bool>::value)), const long int&>::type rclcpp::ParameterValue::get() const’ 263 | get() const | ^~~

I've only copied a portion of the error message because it's too long. I can give you the rest of the error if you need it. I'm not sure which part needs to be modified. I haven't made any modifications to the package you provided. Please give me a solution. Thank you

gokulp01 commented 1 year ago

Hi @KIMRRR thanks for opening an issue. I will be able to help you better if you can copy paste the whole error message. You can paste it into a file and upload the file here by dragging and dropping into your comment.

KIMRRR commented 1 year ago

Thank you for your quick response! error.zip

gokulp01 commented 1 year ago

Hi @KIMRRR I tried to reproduce the error -- but everything is running fine on my machine. Can you try reinstalling the package and update the dependencies and run it again.

gokulp01 commented 1 year ago

Closing this issue because of no responses. Feel free to open it again if things are not working :)