gokulp01 / ros2-ublox-zedf9p

ROS2 drivers for U-blox ZED F9P
27 stars 13 forks source link

Can not build ublox_gps #4

Closed Rikyugo closed 6 months ago

Rikyugo commented 7 months ago

Hi,I tried to build packages(ublox_gps) but errors occured This is my environments: Nvidia Orin ,arm 64 ubuntu20.04 foxy(ros1 noetic alse be installed) rclcpp:

antobot@antobot-desktop:~/antobot_ws_ros2$ dpkg -l|grep rclcpp
ii  ros-foxy-examples-rclcpp-minimal-action-client  0.9.4-1focal.20230527.081911          arm64        Minimal action client examples
ii  ros-foxy-examples-rclcpp-minimal-action-server  0.9.4-1focal.20230527.081913          arm64        Minimal action server examples
ii  ros-foxy-examples-rclcpp-minimal-client         0.9.4-1focal.20230527.082306          arm64        Examples of minimal service clients
ii  ros-foxy-examples-rclcpp-minimal-composition    0.9.4-1focal.20230527.083901          arm64        Minimalist examples of composing nodes in the same process
ii  ros-foxy-examples-rclcpp-minimal-publisher      0.9.4-1focal.20230527.075616          arm64        Examples of minimal publisher nodes
ii  ros-foxy-examples-rclcpp-minimal-service        0.9.4-1focal.20230527.082308          arm64        A minimal service server which adds two numbers
ii  ros-foxy-examples-rclcpp-minimal-subscriber     0.9.4-1focal.20230527.075636          arm64        Examples of minimal subscribers
ii  ros-foxy-examples-rclcpp-minimal-timer          0.9.4-1focal.20230527.075645          arm64        Examples of minimal nodes which have timers
ii  ros-foxy-examples-rclcpp-multithreaded-executor 0.9.4-1focal.20230527.075724          arm64        Package containing example of how to implement a multithreaded executor
ii  ros-foxy-rclcpp                                 2.4.3-1focal.20230527.072753          arm64        The ROS client library in C++.
ii  ros-foxy-rclcpp-action                          2.4.3-1focal.20230527.081314          arm64        Adds action APIs for C++.
ii  ros-foxy-rclcpp-components                      2.4.3-1focal.20230527.082118          arm64        Package containing tools for dynamically loadable components
ii  ros-foxy-rclcpp-lifecycle                       2.4.3-1focal.20230527.082123          arm64        Package containing a prototype for lifecycle implementation

This is my error:


antobot@antobot-desktop:~/antobot_ws_ros2$ colcon build
Starting >>> ublox_serialization
Starting >>> lslidar_msgs                         
Starting >>> bno055                                               
Finished <<< ublox_serialization [2.63s]                                  
Starting >>> ublox_msgs
Finished <<< lslidar_msgs [3.72s]                                  
Starting >>> lslidar_driver
Finished <<< bno055 [3.98s]                          
Finished <<< lslidar_driver [1.49s]                                 
Finished <<< ublox_msgs [7.15s]                      
Starting >>> ublox_gps
--- stderr: ublox_gps                               
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/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/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<rclcpp::ParameterType>() const’
  169 |     ).get<ParameterT>();
      |                       ^
In file included from /opt/ros/foxy/include/rclcpp/parameter.hpp:26,
                 from /opt/ros/foxy/include/rclcpp/node_interfaces/node_parameters_interface.hpp:28,
                 from /opt/ros/foxy/include/rclcpp/node.hpp:51,
                 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/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:42:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:148:3: note: candidate: ‘template<rclcpp::ParameterType type> 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<rclcpp::ParameterType type> 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<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_DOUBLE), const double&>::type rclcpp::ParameterValue::get() const’
  170 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:170:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:181:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_STRING), const std::__cxx11::basic_string<char>&>::type rclcpp::ParameterValue::get() const’
  181 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:181:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:193:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_BYTE_ARRAY), const std::vector<unsigned char, std::allocator<unsigned char> >&>::type rclcpp::ParameterValue::get() const’
  193 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:193:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:205:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_BOOL_ARRAY), const std::vector<bool, std::allocator<bool> >&>::type rclcpp::ParameterValue::get() const’
  205 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:205:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:217:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_INTEGER_ARRAY), const std::vector<long int, std::allocator<long int> >&>::type rclcpp::ParameterValue::get() const’
  217 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:217:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:229:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_DOUBLE_ARRAY), const std::vector<double, std::allocator<double> >&>::type rclcpp::ParameterValue::get() const’
  229 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:229:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:241:3: note: candidate: ‘template<rclcpp::ParameterType type> constexpr typename std::enable_if<(type == rclcpp::PARAMETER_STRING_ARRAY), const std::vector<std::__cxx11::basic_string<char> >&>::type rclcpp::ParameterValue::get() const’
  241 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:241:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:254:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_same<T, bool>::value, const bool&>::type rclcpp::ParameterValue::get() const’
  254 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:254:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_same<T, bool>::value, const bool&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:263:3: note: candidate: ‘template<class type> 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
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:263:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<(std::is_integral<_Tp>::value && (! std::is_same<T, bool>::value)), const long int&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:263:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const long int&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:271:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_floating_point<_Tp>::value, const double&>::type rclcpp::ParameterValue::get() const’
  271 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:271:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_floating_point<_Tp>::value, const double&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:271:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const double&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:279:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, std::__cxx11::basic_string<char> >::value, const std::__cxx11::basic_string<char>&>::type rclcpp::ParameterValue::get() const’
  279 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:279:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, std::__cxx11::basic_string<char> >::value, const std::__cxx11::basic_string<char>&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:279:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::__cxx11::basic_string<char>&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:289:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<unsigned char, std::allocator<unsigned char> >&>::value, const std::vector<unsigned char, std::allocator<unsigned char> >&>::type rclcpp::ParameterValue::get() const’
  289 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:289:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<unsigned char, std::allocator<unsigned char> >&>::value, const std::vector<unsigned char, std::allocator<unsigned char> >&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:289:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::vector<unsigned char, std::allocator<unsigned char> >&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:299:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<bool, std::allocator<bool> >&>::value, const std::vector<bool, std::allocator<bool> >&>::type rclcpp::ParameterValue::get() const’
  299 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:299:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<bool, std::allocator<bool> >&>::value, const std::vector<bool, std::allocator<bool> >&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:299:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::vector<bool, std::allocator<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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:309:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<long int, std::allocator<long int> >&>::value, const std::vector<long int, std::allocator<long int> >&>::type rclcpp::ParameterValue::get() const’
  309 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:309:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<long int, std::allocator<long int> >&>::value, const std::vector<long int, std::allocator<long int> >&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:309:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::vector<long int, std::allocator<long int> >&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:319:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<double, std::allocator<double> >&>::value, const std::vector<double, std::allocator<double> >&>::type rclcpp::ParameterValue::get() const’
  319 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:319:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<double, std::allocator<double> >&>::value, const std::vector<double, std::allocator<double> >&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:319:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::vector<double, std::allocator<double> >&>’
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’:
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:329:3: note: candidate: ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<std::__cxx11::basic_string<char> >&>::value, const std::vector<std::__cxx11::basic_string<char> >&>::type rclcpp::ParameterValue::get() const’
  329 |   get() const
      |   ^~~
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:329:3: note:   template argument deduction/substitution failed:
/opt/ros/foxy/include/rclcpp/parameter_value.hpp: In substitution of ‘template<class type> constexpr typename std::enable_if<std::is_convertible<type, const std::vector<std::__cxx11::basic_string<char> >&>::value, const std::vector<std::__cxx11::basic_string<char> >&>::type rclcpp::ParameterValue::get() const [with type = rclcpp::ParameterType]’:
/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<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
/home/antobot/antobot_ws_ros2/src/ros2-ublox-zedf9p-master/ublox_gps/src/node.cpp:253:62:   required from here
/opt/ros/foxy/include/rclcpp/parameter_value.hpp:329:3: error: no type named ‘type’ in ‘struct std::enable_if<false, const std::vector<std::__cxx11::basic_string<char> >&>’
make[2]: *** [CMakeFiles/ublox_gps.dir/build.make:154: CMakeFiles/ublox_gps.dir/src/node.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:276: CMakeFiles/ublox_gps.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< ublox_gps [19.3s, exited with code 2]
gokulp01 commented 7 months ago

Hi, the issue could be because Galactic uses static param types as described here, Foxy might fail to build sometimes with ARM. You can try this:

Replace this line with this:

#ifdef ROS_DISTRO_FOXY
this->declare_parameter("usb.in");
#else
this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER);
#endif
Rikyugo commented 7 months ago

Hi, the issue could be because Galactic uses static param types as described here, Foxy might fail to build sometimes with ARM. You can try this:

Replace this line with this:

#ifdef ROS_DISTRO_FOXY
this->declare_parameter("usb.in");
#else
this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER);
#endif

I modified all codes include “rclcpp::(PARAMETER_INTEFER, PARAMETER_INTEFER ,etc.)” in node.cpp, like this:

this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER);
⬇️
this->declare_parameter("usb.in");

Colcon build shows a successful compilation. Then I modified the serial port name(/dev/ttyTHS0) and baud rate(38400) in the YAML file, but encountered the following error:

ros2 launch ublox_gps ublox_gps_node_zedf9p-launch.py
[INFO] [launch]: All log files can be found below /home/antobot/.ros/log/2024-01-25-10-11-04-892106-antobot-desktop-19076
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ublox_gps_node-1]: process started with pid [19078]
[ublox_gps_node-1] [INFO] [1706148665.310462691] [ublox_gps_node]: U-Blox: Opened serial port /dev/ttyTHS0
[ublox_gps_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ublox_gps_node-1]   what():  Could not configure serial baud rate
[ERROR] [ublox_gps_node-1]: process has died [pid 19078, exit code -6, cmd '/home/antobot/antobot_ros2/install/ublox_gps/lib/ublox_gps/ublox_gps_node --ros-args --params-file /home/antobot/antobot_ros2/install/ublox_gps/share/ublox_gps/config/zed_f9p.yaml'].

How is the data type determined in the new param declaration method? Could this be cause?

This is my serial port information:

stty -F /dev/ttyTHS0
speed 38400 baud;line=0;
min = 1;time = 0;
-barking -iconography -imaxbel
-opost
-isight -icanon -iexten -echo -echoe -echok -echoctl -echoke 
gokulp01 commented 6 months ago

this could be because of permissions issue, try sudo usermod -a -G dialout $USER and log out and log back in