ROS中c++程序报错 In instantiation of ‘static ros::ParameterAdapter<M>

在编译ROS的C++程序时遇到错误,错误出现在包含ros/subscription_callback_helper.h的文件中。问题源于在定义订阅话题的回调函数时,缺少了'const'关键字,导致编译失败,make过程返回Error 2。
摘要由CSDN通过智能技术生成

当我在终端中编译一个ROS的C++程序,出现以下错误:

In file included from /opt/ros/indigo/include/ros/subscription_callback_helper.h:35:0,

                 from /opt/ros/indigo/include/ros/subscriber.h:33,
                 from /opt/ros/indigo/include/ros/node_handle.h:33,
                 from /opt/ros/indigo/include/ros/ros.h:45,
                 from /home/qingdu/catkin_ws/src/youbot_match/src/youbot_match.cpp:5:
/opt/ros/indigo/include/ros/parameter_adapter.h: In instantiation of ‘static ros::ParameterAdapter<M>::Parameter ros::ParameterAdapter<M>::getParameter(const Event&) [with M = std_msgs::Int32MultiArray_<std::allocator<void> >&; ros::ParameterAdapter<M>::Parameter = std_msgs::Int32MultiArray_<std::allocator<void> >&; ros::ParameterAdapter<M>::Event = ros::MessageEvent
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值