Using RVIZ to compute total square foot coverage
Hi,
I am very new to ROS and was passed an existing application surrounding a self-driving unit. The unit uses SLAM to create a persistent map and a coverage map with every new run. The developer created a topic called map_from_machine
which shows the coverage of the robot on an RVIZ screen (pose, orientation, where it's been, etc.).
Is it possible to use RVIZ to compute the total cumulative square footage the unit has covered in Gazebo? I know the squares represent lengths, but for complex maps this is not feasible.
Looking for any feedback!
MAP EXAMPLE:
ROSMSG INFO:
Thanks, Raj
Do you want the area of the generated Map? Or the length of the path it has driven? Or what exactly do you mean with "cumulative square footage the unit has covered"? Maybe an example image?
Hi LeoE,
I tried to add a photo but I guess I am not experienced enough on this site to have access..? I would like to see the both the area of the map generated and how far the robot has driven. Imagine the robot was driving in a straight line, it would be easy to compute how far it went. In this application though the robot makes many turns so tracking that total distance is difficult. So yes to both your options :).
Hi, so what exactly is inside of "map_from_machine"? Is it the path it has driven and the explored map? Or how is the data organized? Also do you have access to the source code? Probably calculating it online during the exploration and adding this information to the "map_from_machine" is quite easy. Can you maybe include the msg from map_from_machine in your question?
I don't have access to source code unfortunately. Looks like
ros topic info map_from_machine
shows it is using anav_msgs/OccupancyGrid
Message.rosmsg show nav_msgs/OccupancyGrid
shows:std_msgs/Header header uint32 seq time stamp string frame_id nav_msgs/MapMetaData info time map_load_time float32 resolution uint32 width uint32 height geometry_msgs/Pose origin geometry_msgs/Point position float64 x float64 y float64 z geometry_msgs/Quaternion orientation float64 x float64 y float64 z float64 w int8[] data
Does this help?
I've given you enough karma to be able to upload the image now. Just to clarify something, RVIZ does include a very basic distance measuring tool. But you will probably need to write your own node to be able to collect the metrics you're describing here.
Thanks Pete!! Added a photo. I figured I'd need to write some code, but not sure where to begin. The RVIZ tool will not help for anything that is not a square or rectangle.
Is it only one nav_msgs/OccupancyGrid? Or is there more data in the message? How often is it published? Because the nav_msgs/OccupancyGrid includes no data on your robots current position. In your uploaded image there is a path and some extra poses, where do they come from? They are not part of the map_from_machine topic, right?
Does the
geometry_msgs/Point position float64 x float64 y float64 z
not tell us something? It looks like there are a few msg's inside thenav_msgs/OccupancyGrid
message.