nodelet解决Failed to load nodelet问题

在使用ROS开发过程中,遇到Nodelet加载错误,错误信息显示未能加载类test_nodelet/Talker。原因是XML文档缺少根元素,导致节点加载失败。解决方法是在package.xml文件中添加<export><nodelet plugin="${prefix}/nodelets.xml"/></export>来指定Nodelet的插件描述文件。

在写nodelet节点时,出现错误:

process[rosout-1]: started with pid [31069]
started core service [/rosout]
process[standalone_nodelet-2]: started with pid [31076]
process[Talker-3]: started with pid [31087]
[ INFO] [1520243608.115028790]: Loading nodelet /Talker of type test_nodelet/Talker to manager standalone_nodelet with the following remappings:
[ INFO] [1520243608.116738700]: waitForService: Service [/standalone_nodelet/load_nodelet] has not been advertised, waiting...
[ERROR] [1520243608.138551375]: Skipping XML Document "/opt/ros/indigo/share/gmapping/nodelet_plugins.xml" which had no Root Element.  This likely means the XML is malformed or missing.
[ INFO] [1520243608.154711380]: Initializing nodelet with 4 worker threads.
[ INFO] [1520243608.159394341]: waitForService: Service [/standalone_nodelet/load_nodelet] is now available.
[ERROR] [1520243608.200148077]: Skipping XML Document "/opt/ros/indigo/share/gmapping/nodelet_plugins.xml" which had no Root Element.  This likely means the XML is malformed or missing.
[ERROR] [1520243608.203798430]: Failed to load nodelet [/Talker] of type [test_nodelet/Talker] even after refreshing the cache: According to the loaded plugin descriptions the class test_nodelet/Talker with base class type nodelet::Nodelet does not exist. Declared types are  astra_camera/AstraDriverNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register depthimage_to_laserscan/DepthImageToLaserScanNodelet freenect_camera/driver image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image kobuki_auto_docking/AutoDockingNodelet kobuki_bumper2pc/Bumper2PcNodelet kobuki_node/KobukiNodelet kobuki_random_walker/RandomWalkerControllerNodelet kobuki_safety_controller/SafetyControllerNodelet nodelet_tutorial_math/Plus openni2_camera/OpenNI2DriverNodelet pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid pointcloud_to_laserscan/pointcloud_to_laserscan_nodelet realsense_camera/F200Nodelet realsense_camera/R200Nodelet realsense_camera/SR300Nodelet realsense_camera/ZR300Nodelet stdr_robot/Robot stereo_image_proc/disparity stereo_image_proc/point_cloud2 turtlebot_follower/TurtlebotFollower yocs_cmd_vel_mux/CmdVelMuxNodelet yocs_velocity_smoother/VelocitySmootherNodelet
[ERROR] [1520243608.203882342]: The error before refreshing the cache was: According to the loaded plugin descriptions the class test_nodelet/Talker with base class type nodelet::Nodelet does not exist. Declared types are  astra_camera/AstraDriverNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register depthimage_to_laserscan/DepthImageToLaserScanNodelet freenect_camera/driver image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image kobuki_auto_docking/AutoDockingNodelet kobuki_bumper2pc/Bumper2PcNodelet kobuki_node/KobukiNodelet kobuki_random_walker/RandomWalkerControllerNodelet kobuki_safety_controller/SafetyControllerNodelet nodelet_tutorial_math/Plus openni2_camera/OpenNI2DriverNodelet pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid pointcloud_to_laserscan/pointcloud_to_laserscan_nodelet realsense_camera/F200Nodelet realsense_camera/R200Nodelet realsense_camera/SR300Nodelet realsense_camera/ZR300Nodelet stdr_robot/Robot stereo_image_proc/disparity stereo_image_proc/point_cloud2 turtlebot_follower/TurtlebotFollower yocs_cmd_vel_mux/CmdVelMuxNodelet yocs_velocity_smoother/VelocitySmootherNodelet
[FATAL] [1520243608.204080863]: Failed to load nodelet '/Talker` of type `test_nodelet/Talker` to manager `standalone_nodelet'
[Talker-3] process has died [pid 31087, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load test_nodelet/Talker standalone_nodelet __name:=Talker __log:=/home/ubuntu/.ros/log/0d8ad118-205b-11e8-bd47-3052cb01d756/Talker-3.log].

log file: /home/ubuntu/.ros/log/0d8ad118-205b-11e8-bd47-3052cb01d756/Talker-3*.log


解决方法:在package.xml中添加

    <export>
        <nodelet plugin="${prefix}/nodelets.xml"/>
    </export>


评论 9
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值