olvdhrm / RTK_GPS_NTRIP

System built on ROS2 Humble distribution to utilize NTRIP for a RTK Global Navigation Satelite System (GNSS)
13 stars 5 forks source link

Compile and build issue on Foxy (ublox packages) #1

Open lidarmansiwon opened 1 year ago

lidarmansiwon commented 1 year ago

Hi I'm trying to build ntrip using ublox GPS in an ros2 foxy environment. The following problem occurs in building your package. Please help me. Below is the full text of the error.

--- 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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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(); | ^ 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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:42: /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 | ^~~ /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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_STRING), const std::cxx11::basic_string&>::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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_BYTE_ARRAY), const std::vector<unsigned char, std::allocator >&>::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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_BOOL_ARRAY), const std::vector<bool, std::allocator >&>::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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_INTEGER_ARRAY), const std::vector<long int, std::allocator >&>::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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_DOUBLE_ARRAY), const std::vector<double, std::allocator >&>::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 constexpr typename std::enable_if<(type == rclcpp::PARAMETER_STRING_ARRAY), const std::vector<std::cxx11::basic_string >&>::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 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 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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 | ^~~ /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 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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’: /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:271:3: note: candidate: ‘template 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 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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’: /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:279:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, std::__cxx11::basic_string >::value, const std::cxx11::basic_string&>::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 constexpr typename std::enable_if<std::is_convertible<type, std::cxx11::basic_string >::value, const std::__cxx11::basic_string&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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&>’ /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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:289:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, const std::vector<unsigned char, std::allocator >&>::value, const std::vector<unsigned char, std::allocator >&>::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 constexpr typename std::enable_if<std::is_convertible<type, const std::vector<unsigned char, std::allocator >&>::value, const std::vector<unsigned char, std::allocator >&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 >&>’ /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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:299:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, const std::vector<bool, std::allocator >&>::value, const std::vector<bool, std::allocator >&>::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 constexpr typename std::enable_if<std::is_convertible<type, const std::vector<bool, std::allocator >&>::value, const std::vector<bool, std::allocator >&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 >&>’ /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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:309:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, const std::vector<long int, std::allocator >&>::value, const std::vector<long int, std::allocator >&>::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 constexpr typename std::enable_if<std::is_convertible<type, const std::vector<long int, std::allocator >&>::value, const std::vector<long int, std::allocator >&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 >&>’ /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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:319:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, const std::vector<double, std::allocator >&>::value, const std::vector<double, std::allocator >&>::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 constexpr typename std::enable_if<std::is_convertible<type, const std::vector<double, std::allocator >&>::value, const std::vector<double, std::allocator >&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 >&>’ /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/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260:62: required from here /opt/ros/foxy/include/rclcpp/parameter_value.hpp:329:3: note: candidate: ‘template constexpr typename std::enable_if<std::is_convertible<type, const std::vector<std::cxx11::basic_string >&>::value, const std::vector<std::cxx11::basic_string >&>::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 constexpr typename std::enable_if<std::is_convertible<type, const std::vector<std::__cxx11::basic_string >&>::value, const std::vector<std::cxx11::basic_string >&>::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; rcl_interfaces::msg::ParameterDescriptor = rclinterfaces::msg::ParameterDescriptor<std::allocator >]’ /home/sw/ros2_ws/src/RTK_GPS_NTRIP-main/ublox_gps/src/node.cpp:260: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 >&>’ make[2]: [CMakeFiles/ublox_gps.dir/build.make:154: CMakeFiles/ublox_gps.dir/src/node.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:136: CMakeFiles/ublox_gps.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Failed <<< ublox_gps [4.30s, exited with code 2]

Summary: 23 packages finished [7.42s] 1 package failed: ublox_gps 1 package had stderr output: ublox_gps 1 package not processed

Untitled

olvdhrm commented 1 year ago

Hello @lidarmansiwon ,

have you tried to build the ros2 branch of the ublox packages in Foxy seperately?

https://github.com/KumarRobotics/ublox.git

(ros2 branch or foxy-devel for Foxy distro)

If you can succesfully build the ublox driver packages (including the ublox_gps package), I'd suggest replacing the ublox packages in this repo with it and adopt the ZED F9P parameter file from here.

Hope this helps :)

lidarmansiwon commented 1 year ago

First of all, thank you very much for your quick reply. By the way, the https://github.com/KumarRobotics/ublox.git you suggested I used the package here first. However, unlike you, there is no RTCM subscriber in this package. For example, your code contains // Create subscriber for RTCM correction data to enable RTK this->subscription_ = this->create_subscription("ntrip_client/rtcm", 10, std::bind(&UbloxNode::rtcmCallback, this, std::placeholders::_1)); } This part exists but does not exist in the package. What should I do in this situation? I need your help.

olvdhrm commented 1 year ago

Sorry, I wasn't aware of the issue for the foxy-devel branch missing the RTCM subscriber as I have been fully working on Humble.

If the ros2 branch with the RTCM subscriber cannot be built on Foxy, I found this fork for the foxy-devel branch that has an RTCM subscriber used by other users (https://github.com/KumarRobotics/ublox/issues/202#issuecomment-1425659438) https://github.com/sibalzer/ublox-foxy-RTCM-correction-

// Create subscriber for RTCM correction data to enable RTK
this->subscription_ = this->create_subscription<mavros_msgs::msg::RTCM>("/ntrip_client/rtcm", 10, std::bind(&UbloxNode::rtcmCallback, this, std::placeholders::_1));

The mavros_msgs::msg::RTCM should be altered to rtcm_msgs::msg::Message as this message type is used with the NTRIP client.

Briefly going through the fork, I am not sure whether it would work or not. However, you can give it a try as a replacement for the ublox packages here. Hope this helps :)