ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
We see this:
std::vector<std::vector<float> > grid; //vector of vectors
...
void mapCallback(...)
{
...
map_pub.publish(grid[i][j]);
...
}
you cannot publish(..)
float
s directly. That's what the error message is telling you.
2 | No.2 Revision |
We see this:
std::vector<std::vector<float> > grid; //vector of vectors
...
void mapCallback(...)
{
...
map_pub.publish(grid[i][j]);
...
}
int main(int argc, char **argv){
...
ros::Publisher map_pub = n.advertise<nav_msgs::OccupancyGrid>("map",100);
...
}
you cannot publish(..)
float
s directly. That's what the error message is telling you.