My issue is similar to the #39, however, I don't really understand how to apply the answer there. I use the prebuilt standalone release of Ros2ForUnity on Windows.
When I try to do something like this (e.g. set the frame ID to the row number of a lidar scanner):
for (int i = 0; i < numberRows; i++)
{
sensor_msgs.msg.LaserScan msg = new sensor_msgs.msg.LaserScan();
msg.Header.frame_id = i;
lidar_pub.Publish(msg);
}
I get the following error:
'Header' does not contain a definition for 'frame_id' and no accessible extension method 'frame_id' accepting a first argument of type 'Header' could be found (are you missing a using directive or an assembly reference?)
I am pretty sure Header has the frame_id attribute, but I don't understand why it refuses to work. Do I overlook something?
My issue is similar to the #39, however, I don't really understand how to apply the answer there. I use the prebuilt standalone release of Ros2ForUnity on Windows. When I try to do something like this (e.g. set the frame ID to the row number of a lidar scanner):
I get the following error:
'Header' does not contain a definition for 'frame_id' and no accessible extension method 'frame_id' accepting a first argument of type 'Header' could be found (are you missing a using directive or an assembly reference?)
I am pretty sure Header has the frame_id attribute, but I don't understand why it refuses to work. Do I overlook something?