[FATAL] [1683733235.713228210, 2173.949000000]: ASSERTION FAILED file = /opt/ros/melodic/include/ros/publisher.h line = 106 cond = false message = [FATAL] [1683733235.713279297, 2173.949000000]: Call to publish() on an invalid Publisher [FATAL] [1683733235.713318620, 2173.949000000]:
时间: 2023-06-14 20:07:38 浏览: 260
这是一个 ROS 中的错误信息,意思是在调用一个无效的 Publisher 对象的 publish() 函数时触发了断言错误。这通常是由于 Publisher 对象未正确初始化或已被销毁导致的。你需要检查一下 Publisher 对象的初始化和销毁过程,以确保它们都正确执行。你可以尝试在程序中添加一些调试信息,比如输出 Publisher 对象的指针地址,以便更好地跟踪它的生命周期。
相关问题
In file included from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/apollo_app.h:46:0, from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/src/apollo_app.cc:33: /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/log.h:40:10: fatal error: glog/logging.h: No such file or directory #include <glog/logging.h> ^~~~~~~~~~~~~~~~ compilation terminated. apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/build.make:62: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/apollo_app.cc.o' failed make[2]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/apollo_app.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/adapters/adapter_manager.h:48:0, from /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/src/adapters/adapter_manager.cc:33: /home/acceler/code/apollo_ros/apollo_ros/src/apollo.ros-1.0.0-master/apollo_common/include/apollo_common/adapters/adapter.h:49:10: fatal error: glog/logging.h: No such file or directory #include <glog/logging.h> ^~~~~~~~~~~~~~~~ compilation terminated. apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/build.make:110: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/adapters/adapter_manager.cc.o' failed make[2]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/src/adapters/adapter_manager.cc.o] Error 1 CMakeFiles/Makefile2:3894: recipe for target 'apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/all' failed make[1]: *** [apollo.ros-1.0.0-master/apollo_common/CMakeFiles/apollo_common.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 54%] Linking CXX executable /home/acceler/code/apollo_ros/apollo_ros/devel/lib/IntegratedNavigation/IntegratedNavigation_node [ 54%] Built target IntegratedNavigation_node [ 55%] Linking CXX executable /home/acceler/code/apollo_ros/apollo_ros/devel/lib/TimeSynchronierProcess/timeSynchronierProcess_node [ 55%] Built target timeSynchronierProcess_node Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed
It seems like there is a compilation error in your code. The error message indicates that the file "glog/logging.h" is not found. This file is part of the Google Logging Library (glog) and needs to be installed in order to compile your code successfully.
To resolve this issue, you can follow these steps:
1. Make sure that the glog library is installed on your system. You can check this by running the following command in your terminal:
```
dpkg -l libgoogle-glog-dev
```
If it is not installed, you can install it using the package manager specific to your system (e.g., apt for Ubuntu):
```
sudo apt-get install libgoogle-glog-dev
```
2. After installing the glog library, try compiling your code again. If the error persists, make sure that the glog library directory is included in the compilation flags. You can add the following line to your CMakeLists.txt file:
```
include_directories(/path/to/glog/include)
```
Replace "/path/to/glog/include" with the actual path to the glog library include directory on your system.
3. Save the changes to your CMakeLists.txt file and try compiling your code again.
If you continue to encounter issues, please provide more details about your development environment and the steps you have already taken to troubleshoot the problem.
[ERROR] [1686470934.428942562]: Failed to load nodelet [/vesc/high_level/ackermann_cmd_mux] of type [ackermann_cmd_mux/AckermannCmdMuxNodelet] even after refreshing the cache: Could not find library corresponding to plugin ackermann_cmd_mux/AckermannCmdMuxNodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1686470934.428971220]: The error before refreshing the cache was: Could not find library corresponding to plugin ackermann_cmd_mux/AckermannCmdMuxNodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [FATAL] [1686470934.431196976]: Failed to load nodelet '/vesc/high_level/ackermann_cmd_mux` of type `ackermann_cmd_mux/AckermannCmdMuxNodelet` to manager `ackermann_cmd_mux_nodelet_manager' [ERROR] [1686470934.443739149]: Failed to load nodelet [/vesc/low_level/ackermann_cmd_mux] of type [ackermann_cmd_mux/AckermannCmdMuxNodelet] even after refreshing the cache: Could not find library corresponding to plugin ackermann_cmd_mux/AckermannCmdMuxNodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [ERROR] [1686470934.443788076]: The error before refreshing the cache was: Could not find library corresponding to plugin ackermann_cmd_mux/AckermannCmdMuxNodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists. [FATAL] [1686470934.443989800]: Failed to load nodelet '/vesc/low_level/ackermann_cmd_mux` of type `ackermann_cmd_mux/AckermannCmdMuxNodelet` to manager `ackermann_cmd_mux_nodelet_manager' [INFO] [1686470934.604266, 0.000000]: Waiting for /clock to be available... [vesc/high_level/ackermann_cmd_mux-15] process has died [pid 14355, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load ackermann_cmd_mux/AckermannCmdMuxNodelet ackermann_cmd_mux_nodelet_manager __name:=ackermann_cmd_mux __log:=/home/wangyize/.ros/log/34ccd5d4-082f-11ee-88c4-d10631277e54/vesc-high_level-ackermann_cmd_mux-15.log]. log file: /home/wangyize/.ros/log/34ccd5d4-082f-11ee-88c4-d10631277e54/vesc-high_level-ackermann_cmd_mux-15*.log [vesc/low_level/ackermann_cmd_mux-17] process has died [pid 14362, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load ackermann_cmd_mux/AckermannCmdMuxNodelet ackermann_cmd_mux_nodelet_manager __name:=ackermann_cmd_mux __log:=/home/wangyize/.ros/log/34ccd5d4-082f-11ee-88c4-d10631277e54/vesc-low_level-ackermann_cmd_mux-17.log]. log file: /home/wangyize/.ros/log/34ccd5d4-082f-11ee-88c4-d10631277e54/vesc-low_level-ackermann_cmd_mux-17*.log
这是一个ROS节点加载失败的错误信息。它指出节点 `/vesc/high_level/ackermann_cmd_mux` 和 `/vesc/low_level/ackermann_cmd_mux` 加载失败,其类型是 `ackermann_cmd_mux/AckermannCmdMuxNodelet`。在刷新缓存后,仍然无法找到对应的库文件。这个错误信息中还包含了一些不可恢复的错误,例如节点崩溃和退出等。
这个错误通常是由于插件描述 XML 文件名称与库文件名称不匹配或者库文件不在正确的路径下所引起的。你可以检查一下插件描述 XML 文件和库文件,确保它们的名称和路径都是正确的。此外,还可以检查一下 ROS 环境变量和工作空间设置是否正确。
阅读全文