Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译时遇到问题 #3

Open
1716775457damn opened this issue Jun 24, 2024 · 30 comments
Open

编译时遇到问题 #3

1716775457damn opened this issue Jun 24, 2024 · 30 comments

Comments

@1716775457damn
Copy link

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

@wariot221zjsru
Copy link

我遇到的问题:
Starting >>> wpr_simulation2
[Processing: wpr_simulation2]
[Processing: wpr_simulation2]
[Processing: wpr_simulation2]
[Processing: wpr_simulation2]
[Processing: 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/ubuntu22/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp:1:
/home/ubuntu22/ros2_ws/src/wpr_simulation2/src/objects_publisher.cpp: In member function ‘void ObjectsPublisher::pointcloudCallback(sensor_msgs::msg::PointCloud2_<std::allocator >::SharedPtr)’:
/home/ubuntu22/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/ubuntu22/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 [2min 57s]

Summary: 1 package finished [2min 58s]
1 package had stderr output: wpr_simulation2

@wariot221zjsru
Copy link

我以前是好的。现在重装了一遍还不行。什么原因?

@wariot221zjsru
Copy link

问题是以前我这样运行错过一次但是后来又自动好了。结果现在又不行了

@wariot221zjsru
Copy link

ubuntu22@ubuntu22-virtual-machine:/ros2_ws$ source install/setup.bash
ubuntu22@ubuntu22-virtual-machine:
/ros2_ws$ ros2 launch wpr_simulation2 wpb_simple.launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu22/.ros/log/2024-07-25-10-52-08-090488-ubuntu22-virtual-machine-22127
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [22128]
[INFO] [gzclient-2]: process started with pid [22130]
[INFO] [robot_state_publisher-3]: process started with pid [22132]
[INFO] [spawn_entity.py-4]: process started with pid [22134]
[INFO] [spawn_entity.py-5]: process started with pid [22136]
[robot_state_publisher-3] [INFO] [1721875930.122471643] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-3] [INFO] [1721875930.122613049] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1721875930.122624235] [robot_state_publisher]: got segment base_top_link
[robot_state_publisher-3] [INFO] [1721875930.122629087] [robot_state_publisher]: got segment body_back_link
[robot_state_publisher-3] [INFO] [1721875930.122634032] [robot_state_publisher]: got segment body_link
[robot_state_publisher-3] [INFO] [1721875930.122638631] [robot_state_publisher]: got segment front_link
[robot_state_publisher-3] [INFO] [1721875930.122642852] [robot_state_publisher]: got segment head_link
[robot_state_publisher-3] [INFO] [1721875930.122647181] [robot_state_publisher]: got segment kinect2_camera_frame
[robot_state_publisher-3] [INFO] [1721875930.122652009] [robot_state_publisher]: got segment kinect2_dock
[robot_state_publisher-3] [INFO] [1721875930.122656457] [robot_state_publisher]: got segment kinect2_front_frame
[robot_state_publisher-3] [INFO] [1721875930.122660801] [robot_state_publisher]: got segment kinect2_head_frame
[robot_state_publisher-3] [INFO] [1721875930.122665172] [robot_state_publisher]: got segment kinect2_ir_optical_frame
[robot_state_publisher-3] [INFO] [1721875930.122669880] [robot_state_publisher]: got segment kinect2_rgb_optical_frame
[robot_state_publisher-3] [INFO] [1721875930.122674171] [robot_state_publisher]: got segment laser_link
[spawn_entity.py-4] [INFO] [1721875930.834143967] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1721875930.835427329] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-4] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-4] warnings.warn(
[spawn_entity.py-4] [INFO] [1721875930.840447623] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-4] [INFO] [1721875930.855071817] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1721875930.856203875] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-5] [INFO] [1721875930.945818426] [spawn_entity]: Spawn Entity started
[spawn_entity.py-5] [INFO] [1721875930.946128626] [spawn_entity]: Loading entity XML from file /home/ubuntu22/ros2_ws/install/wpr_simulation2/share/wpr_simulation2/models/bookshelft.model
[spawn_entity.py-5] [INFO] [1721875930.946699684] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-5] [INFO] [1721875930.947214396] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-4] [INFO] [1721875931.368059972] [spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-4] [INFO] [1721875931.421155793] [spawn_entity]: Spawn status: Entity pushed to spawn queue, but spawn service timed outwaiting for entity to appear in simulation under the name [wpb_home]
[spawn_entity.py-4] [ERROR] [1721875931.421553568] [spawn_entity]: Spawn service failed. Exiting.
[spawn_entity.py-5] [INFO] [1721875931.453991740] [spawn_entity]: Calling service /spawn_entity
[gzserver-1] [INFO] [1721875931.520241774] [wpb_imu]: <initial_orientation_as_reference> is unset, using default value of false to comply with REP 145 (world as orientation reference)
[gzserver-1] gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = gazebo::rendering::Scene; typename boost::detail::sp_member_access::type = gazebo::rendering::Scene*]: Assertion `px != 0' failed.
[ERROR] [spawn_entity.py-4]: process has died [pid 22134, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic robot_description -entity wpb_home -x 0.0 -y 0.0 -Y 0.0 --ros-args'].
[ERROR] [gzserver-1]: process has died [pid 22128, exit code -6, cmd 'gzserver /home/ubuntu22/ros2_ws/install/wpr_simulation2/share/wpr_simulation2/worlds/wpb_simple.world -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].
[ERROR] [gzclient-2]: process has died [pid 22130, exit code 255, cmd 'gzclient'].

我有时候能编译,但是出现了这种情况,怎么办?

@wariot221zjsru
Copy link

ubuntu22@ubuntu22-virtual-machine:/ros2_ws$ source install/setup.bash ubuntu22@ubuntu22-virtual-machine:/ros2_ws$ ros2 launch wpr_simulation2 wpb_simple.launch.py [INFO] [launch]: All log files can be found below /home/ubuntu22/.ros/log/2024-07-25-10-52-08-090488-ubuntu22-virtual-machine-22127 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [gzserver-1]: process started with pid [22128] [INFO] [gzclient-2]: process started with pid [22130] [INFO] [robot_state_publisher-3]: process started with pid [22132] [INFO] [spawn_entity.py-4]: process started with pid [22134] [INFO] [spawn_entity.py-5]: process started with pid [22136] [robot_state_publisher-3] [INFO] [1721875930.122471643] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-3] [INFO] [1721875930.122613049] [robot_state_publisher]: got segment base_link [robot_state_publisher-3] [INFO] [1721875930.122624235] [robot_state_publisher]: got segment base_top_link [robot_state_publisher-3] [INFO] [1721875930.122629087] [robot_state_publisher]: got segment body_back_link [robot_state_publisher-3] [INFO] [1721875930.122634032] [robot_state_publisher]: got segment body_link [robot_state_publisher-3] [INFO] [1721875930.122638631] [robot_state_publisher]: got segment front_link [robot_state_publisher-3] [INFO] [1721875930.122642852] [robot_state_publisher]: got segment head_link [robot_state_publisher-3] [INFO] [1721875930.122647181] [robot_state_publisher]: got segment kinect2_camera_frame [robot_state_publisher-3] [INFO] [1721875930.122652009] [robot_state_publisher]: got segment kinect2_dock [robot_state_publisher-3] [INFO] [1721875930.122656457] [robot_state_publisher]: got segment kinect2_front_frame [robot_state_publisher-3] [INFO] [1721875930.122660801] [robot_state_publisher]: got segment kinect2_head_frame [robot_state_publisher-3] [INFO] [1721875930.122665172] [robot_state_publisher]: got segment kinect2_ir_optical_frame [robot_state_publisher-3] [INFO] [1721875930.122669880] [robot_state_publisher]: got segment kinect2_rgb_optical_frame [robot_state_publisher-3] [INFO] [1721875930.122674171] [robot_state_publisher]: got segment laser_link [spawn_entity.py-4] [INFO] [1721875930.834143967] [spawn_entity]: Spawn Entity started [spawn_entity.py-4] [INFO] [1721875930.835427329] [spawn_entity]: Loading entity published on topic robot_description [spawn_entity.py-4] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead. [spawn_entity.py-4] warnings.warn( [spawn_entity.py-4] [INFO] [1721875930.840447623] [spawn_entity]: Waiting for entity xml on robot_description [spawn_entity.py-4] [INFO] [1721875930.855071817] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [spawn_entity.py-4] [INFO] [1721875930.856203875] [spawn_entity]: Waiting for service /spawn_entity [spawn_entity.py-5] [INFO] [1721875930.945818426] [spawn_entity]: Spawn Entity started [spawn_entity.py-5] [INFO] [1721875930.946128626] [spawn_entity]: Loading entity XML from file /home/ubuntu22/ros2_ws/install/wpr_simulation2/share/wpr_simulation2/models/bookshelft.model [spawn_entity.py-5] [INFO] [1721875930.946699684] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [spawn_entity.py-5] [INFO] [1721875930.947214396] [spawn_entity]: Waiting for service /spawn_entity [spawn_entity.py-4] [INFO] [1721875931.368059972] [spawn_entity]: Calling service /spawn_entity [spawn_entity.py-4] [INFO] [1721875931.421155793] [spawn_entity]: Spawn status: Entity pushed to spawn queue, but spawn service timed outwaiting for entity to appear in simulation under the name [wpb_home] [spawn_entity.py-4] [ERROR] [1721875931.421553568] [spawn_entity]: Spawn service failed. Exiting. [spawn_entity.py-5] [INFO] [1721875931.453991740] [spawn_entity]: Calling service /spawn_entity [gzserver-1] [INFO] [1721875931.520241774] [wpb_imu]: <initial_orientation_as_reference> is unset, using default value of false to comply with REP 145 (world as orientation reference) [gzserver-1] gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = gazebo::rendering::Scene; typename boost::detail::sp_member_access::type = gazebo::rendering::Scene*]: Assertion `px != 0' failed. [ERROR] [spawn_entity.py-4]: process has died [pid 22134, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -topic robot_description -entity wpb_home -x 0.0 -y 0.0 -Y 0.0 --ros-args']. [ERROR] [gzserver-1]: process has died [pid 22128, exit code -6, cmd 'gzserver /home/ubuntu22/ros2_ws/install/wpr_simulation2/share/wpr_simulation2/worlds/wpb_simple.world -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so']. [ERROR] [gzclient-2]: process has died [pid 22130, exit code 255, cmd 'gzclient'].

我有时候能编译,但是出现了这种情况,怎么办?

出现这种情况而且gazebo一直出不来怎么办?

@wariot221zjsru
Copy link

@zhangwanjie

@zhangwanjie
Copy link
Contributor

zhangwanjie commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

试试关闭虚拟机的3d加速功能?

在 2024年7月25日,12:02,wariot221zjsru @.***> 写道:  @zhangwanjie — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

新建 BMP 图像 (7)

@wariot221zjsru
Copy link

却为何3D加速选项根本取消不掉?

@zhangwanjie
Copy link
Contributor

zhangwanjie commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

ROS1的课程,很多虚拟机的同学都要关闭3D加速才能显示模型。建议装双系统。

在 2024年7月25日,20:56,wariot221zjsru @.***> 写道:  却为何3D加速选项根本取消不掉? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

这个是ros2的包啊。而且我以前一直都是好的。可能是因为我根据别的教程可能更新了gazebo系统。这个和ros1有什么关系?我在b站发过,我以前是好的

@zhangwanjie
Copy link
Contributor

zhangwanjie commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

github容易不稳定,以后都用邮件回吧

@wariot221zjsru
Copy link

我们这里这几天极为不稳定

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

然后就动不了了 在 2024-07-25 21:22:48,"Jay Zhang" @.> 写道: 这个跟ROS1还是ROS2没关系,和Gazebo的3D引擎和虚拟机的兼容性有关系 发自我的iPhone
在 2024年7月25日,21:20,wariot221zjsru @.
> 写道:  ROS1的课程,很多虚拟机的同学都要关闭3D加速才能显示模型。建议装双系统。 … 在 2024年7月25日,20:56,wariot221zjsru @.> 写道:  却为何3D加速选项根本取消不掉? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned. 这个是ros2的包啊。而且我以前一直都是好的。可能是因为我根据别的教程可能更新了gazebo系统。这个和ros1有什么关系?我在b站发过,我以前是好的 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.
>

是什么原因

@zhangwanjie
Copy link
Contributor

zhangwanjie commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 25, 2024 via email

@wariot221zjsru
Copy link

这个和bash有关系吗

@wariot221zjsru
Copy link

我的gazebo版本是v11.10.2

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 26, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 26, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 26, 2024 via email

@wariot221zjsru
Copy link

wariot221zjsru commented Jul 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants