在ros fox中安装pcl_ros



我一直在尝试为ROS 2 fox安装PCL_ROS包。每当我尝试时,都会出现以下错误:

enter code here[0.482s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:

'pcl_conversions' is in: /home/juan-orozco/ros2_ws/install/pcl_conversions, /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.
If you understand the risks and want to override a package anyways, add the following to the command line:
--allow-overriding pcl_conversions
This may be promoted to an error in a future release of colcon-override-check.
Starting >>> pcl_conversions
Finished <<< pcl_conversions [19.1s]                       
Starting >>> pcl_ros
--- stderr: pcl_ros                               
/home/juan-orozco/ros2_ws/src/perception_pcl/pcl_ros/tools/pcd_to_pointcloud.cpp: In constructor ‘pcl_ros::PCDPublisher::PCDPublisher(const rclcpp::NodeOptions&)’:
/home/juan-orozco/ros2_ws/src/perception_pcl/pcl_ros/tools/pcd_to_pointcloud.cpp:88:66: error: no matching function for call to ‘pcl_ros::PCDPublisher::declare_parameter<std::string>(const char [10])’
88 |     file_name_ = this->declare_parameter<std::string>("file_name");
|                                                                  ^
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/juan-orozco/ros2_ws/src/perception_pcl/pcl_ros/tools/pcd_to_pointcloud.cpp:57:
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note: candidate: ‘auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool) [with ParameterT = std::__cxx11::basic_string<char>; std::string = std::__cxx11::basic_string<char>; rcl_interfaces::msg::ParameterDescriptor = rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> >]’
157 | Node::declare_parameter(
| ^~~~
/opt/ros/foxy/include/rclcpp/node_impl.hpp:157:1: note:   candidate expects 4 arguments, 1 provided
/home/juan-orozco/ros2_ws/src/perception_pcl/pcl_ros/tools/pcd_to_pointcloud.cpp:99:42: error: ‘using element_type = class rclcpp::node_interfaces::NodeTopicsInterface’ {aka ‘class rclcpp::node_interfaces::NodeTopicsInterface’} has no member named ‘resolve_topic_name’
99 |       this->get_node_topics_interface()->resolve_topic_name(cloud_topic_);
|                                          ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/pcd_to_pointcloud_lib.dir/build.make:63: CMakeFiles/pcd_to_pointcloud_lib.dir/tools/pcd_to_pointcloud.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/pcd_to_pointcloud_lib.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< pcl_ros [18.6s, exited with code 2]
Summary: 1 package finished [38.0s]
1 package failed: pcl_ros
1 package had stderr output: pcl_ros
2 packages not processed

我刚刚安装了ROS2 Foxy,我真的不知道发生了什么

请帮帮我。

我建议使用最新稳定版本的ROS Humble。并将pcl_ros包更新到最新版本。你能给我更多关于你如何构建包和ROS2的信息吗?

最新更新