Advertisement

ros:/opt/ros/indigo/include/ros/parameter_adapter.h

阅读量:
错误消息为:

Upon including the file located at /opt/ros/indigo/includeuros/subscription_callback_helper.h, an error was encountered during compilation. The issue arises when attempting to instantiate a ParameterAdapter of type <std_msgs.msg.Int32MultiArray_>. Specifically, there is an attempt to initialize a reference of this type using a value of incompatible type. This error occurs within the context of calling the subscription callback helper function, which is defined in the same header file. The problematic line attempts to return *event.getMessage(), but this operation is not valid due to the mismatch in types.

问题原因:

订阅的消息没有加const限定符

解决办法:

在回调函数中加上const限定符

全部评论 (0)

还没有任何评论哟~