ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
ROS costmaps are typically visualized using nav_msgs/GridCells
. If you were to fill one of these data structures with your probabilistic map, you would be able to visualize it in Rviz.
2 | No.2 Revision |
ROS costmaps are typically visualized using nav_msgs/GridCells
. If you were to fill one of these data structures with your probabilistic map, you would be able to visualize it in Rviz. Rviz in three colors (INFLATED, OCCUPIED, UNKNOWN).
What I did to visualize probabilistic maps, however, was simply to save my data structure as an image file (with OpenCV) and then view it as a sensor_msgs/Image
. This is a pretty hacky solution, but I needed to save them as images anyway, so it worked for me.
3 | No.3 Revision |
ROS costmaps are typically visualized using nav_msgs/GridCells
. If you were to fill one of these data structures with your probabilistic map, you would be able to visualize it in Rviz in three colors (INFLATED, OCCUPIED, UNKNOWN).
What I did to visualize probabilistic maps, however, was simply to save my data structure as an image file (with OpenCV) and then view it as a sensor_msgs/Image
. This is a pretty hacky solution, but I needed to save them as images anyway, so it worked for me.
EDIT:
To convert my costmap-like data structure to an OpenCV image, I simply just set each costmap cell as a pixel in an OpenCv IplImage data structure. Then, you can just cv_bridge to convert that image to a sensor_msgs/Image
. This is simple to do if you know OpenCv, but you might have to do some research on the OpenCv image data structure. It's not too complex.
4 | No.4 Revision |
ROS costmaps are typically visualized using nav_msgs/GridCells
. If you were to fill one of these data structures with your probabilistic map, you would be able to visualize it in Rviz in three colors (INFLATED, OCCUPIED, UNKNOWN).
What I did to visualize probabilistic maps, however, was simply to save my data structure as an image file (with OpenCV) and then view it as a sensor_msgs/Image
. This is a pretty hacky solution, but I needed to save them as images anyway, so it worked for me.
EDIT:
To convert my costmap-like data structure to an OpenCV image, I simply just set each costmap cell as a pixel in an OpenCv IplImage data structure. Then, you can just cv_bridge to convert that image to a sensor_msgs/Image
. This is simple to do if you know OpenCv, but you might have to do some research on the OpenCv image data structure. It's not too complex.
It should be noted that the Image in Rviz is in a separate window from the robot body. You won't be able to overlay one on the other using this method.