generating a *.pgm with the trajectory on it.

315 views
Skip to first unread message

Akshay Bharadwaj

unread,
Oct 19, 2017, 2:51:02 PM10/19/17
to google-cartographer
Hey all,

I use the latest version of the code to map in realtime, but im also interested in generating occupancy grid based map, i.e. the *.pgm file that write_assets service used to write. I know this has been done, but i pulled from the master and I lost that feature. Anyways, after a lot of searching , I found a commit that has write_assets service but it generates a image without drawing the trajectory on the image. Anyway I decided to hack the code to draw the trajectory, but seem to be stuck .

Could someone please suggest me how to extract all the optimized trajectories from SparsePoseGraph object? From the code, it looks like
GetTrajectoryNodes()
returns the trajectory with a data type
std::vector<std::vector<>>.
I'm finding it hard to understand the structure of poses in the SparsePoseGraph object as i expect it to be of the type std::vector<>. (its confusing because its different from how I read it from .pbstream file)

Also any suggestions to plot the pose on the occupancy grid image??

Thanks





Holger Rapp

unread,
Oct 20, 2017, 3:22:45 AM10/20/17
to Akshay Bharadwaj, google-cartographer
​If you still have the bag that generated this data, the correct approach is to use the asset writer. See for example the fetch example​ which generates an occupancy grid (as PNG) with a trajectory on it.  There is also a new PointsProcessor that can generate PGM and YAML (without trajectory), but it is not yet merged: https://github.com/googlecartographer/cartographer_ros/pull/548.

 

Thanks
​​





--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cartographer/1f051a2e-f1e4-40ae-aacb-bf9275e5e369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Google Germany GmbH
Erika-Mann-Straße 33
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Reply all
Reply to author
Forward
0 new messages