ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
std_msgs::Int32 targetIdx;
So targetIdx
is declared to be of type std_msgs::Int32
here ..
targetIdx.data = targetIdx;
and here you assign the just instantiated msg to its own data
member.
Could it be that you are shadowing your int targetIdx
with the newly created std_msgs::Int32 targetIdx
?
2 | No.2 Revision |
std_msgs::Int32 targetIdx;
So targetIdx
is declared to be of type std_msgs::Int32
here ..
targetIdx.data = targetIdx;
.. and here you assign the just instantiated msg to its own data
member.
That is not going to work.
Could it be that you are shadowing your int targetIdx
with the newly created std_msgs::Int32 targetIdx
?