Skip to content

编译时遇到问题 #3

@1716775457damn

Description

@1716775457damn

twx@wp:~/ros2_ws/src/wpr_simulation2/scripts$ cd ~/ros2_ws
colcon build --symlink-install
Starting >>> wpr_simulation2
--- stderr: wpr_simulation2
In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/twx/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp:1:
/home/twx/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp: In member function ‘void ObjectsPublisher::pointcloudCallback(sensor_msgs::msg::PointCloud2_<std::allocator >::SharedPtr)’:
/home/twx/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp:154:37: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘std::vectorpcl::PointIndices::size_type’ {aka ‘long unsigned int’} [-Wformat=]
154 | RCLCPP_INFO(this->get_logger(), "Number of clusters: %d", cluster_indices.size());
| ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
| |
| std::vectorpcl::PointIndices::size_type {aka long unsigned int}
/home/twx/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp:154:59: note: format string is defined here
154 | RCLCPP_INFO(this->get_logger(), "Number of clusters: %d", cluster_indices.size());
| ~^
| |
| int
| %ld

Finished <<< wpr_simulation2 [28.5s]

Summary: 1 package finished [28.7s]
1 package had stderr output: wpr_simulation2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions