You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int i = 0;
for (GridMapIterator it(map); !it.isPastEnd(); ++it) {
Position position;
map.getPosition(*it, position);
map.at("elevation", *it) = data.data[i];
i++;
}
ros::Time time = ros::Time::now();
map.setTimestamp(time.toNSec());
grid_map_msgs::GridMap message;
GridMapRosConverter::toMessage(map, message);
publisher.publish(message);
The thing is 'data' is an array of 100 elements (10x10), but when I display it in rviz, I get a 9x9 representation. I tried to change the size to 11x11, but the representation gets buggy because it has more than 100 elements, but the matrix showed in rviz is 10x10. Here are some results:
In this case, the representation of the data is correct, but it shows a 9x9 matrix instead of a 10x10 in rviz, meanwhile the data is still a 10x10 array:
Here I paint an 11x11 map in rviz (which shows a 10x10), but data displayed is inconsistent because I'm giving 100 elements to the 11x11 map:
Why is this happening?
The text was updated successfully, but these errors were encountered:
Each corner point on the black lines represent a cell center, the planes that you see are the interpolation between four corner points.
So this is no bug and works as intended, as there are 10 "corner points" for the 10x10 grid example.
Hello!
I'm developing an app using ROS Noetic, in Ubuntu 20.04 LTS, using C++. Here I provide the code where I initialize everything:
Then I create and publish the message here:
The thing is 'data' is an array of 100 elements (10x10), but when I display it in rviz, I get a 9x9 representation. I tried to change the size to 11x11, but the representation gets buggy because it has more than 100 elements, but the matrix showed in rviz is 10x10. Here are some results:
In this case, the representation of the data is correct, but it shows a 9x9 matrix instead of a 10x10 in rviz, meanwhile the data is still a 10x10 array:
Here I paint an 11x11 map in rviz (which shows a 10x10), but data displayed is inconsistent because I'm giving 100 elements to the 11x11 map:
Why is this happening?
The text was updated successfully, but these errors were encountered: