LCAS / topological_navigation

The topological navigation framework
Apache License 2.0
32 stars 36 forks source link

Using --pointset to load a map from yaml makes it uneditable #14

Closed heuristicus closed 3 months ago

heuristicus commented 4 years ago

To reproduce:

roslaunch mongodb_store mongodb_store.launch db_path:=/opt/goals/mongodb_store

Insert empty map

rosrun topological_utils insert_empty_map.py test_constructed

Run rviz tools and construct a map with a few nodes and edges

roslaunch topological_rviz_tools strands_rviz_topmap.launch topmap:=test_constructed map:=/home/user/map.yaml db_path:=/opt/goals/mongodb_store

Export the map to yaml

rosrun topological_utils map_to_yaml.py test_constructed test_constructed.tplg

Import the map with a different pointset name

rosrun topological_utils load_yaml_map.py --pointset test_constructed_fromfile test_constructed.tplg

Rerun rviz tools with the loaded map

roslaunch topological_rviz_tools strands_rviz_topmap.launch topmap:=test_constructed_fromfile map:=/home/user/map.yaml db_path:=/opt/goals/mongodb_store

Try to move a node - it will not work. You will see something like the following in the terminal.

[ INFO] [1589187733.416487645]: Updating topological map
[ INFO] [1589187733.416885089]: WayPoint9
[ WARN] [1589187733.423375574]: Failed to get tags for node WayPoint1
[ WARN] [1589187733.430425037]: Failed to get tags for node WayPoint2
[ WARN] [1589187733.436575677]: Failed to get tags for node WayPoint3
[ WARN] [1589187733.442741614]: Failed to get tags for node WayPoint4
[ WARN] [1589187733.450094861]: Failed to get tags for node WayPoint5
[ WARN] [1589187733.456694266]: Failed to get tags for node WayPoint6
[ WARN] [1589187733.463797253]: Failed to get tags for node WayPoint7
[ WARN] [1589187733.470154284]: Failed to get tags for node WayPoint8
[ WARN] [1589187733.516802932]: Failed to get tags for node WayPoint9

[ERROR] [1589188546.635162]: Impossible to store in DB 0 waypoints found after query
[ERROR] [1589188546.638079]: Available data: []

Calling get node tags will fail:

rosservice call /topological_map_manager/get_node_tags "node_name: 'WayPoint1'" 
success: False
tags: []

This is because the line https://github.com/LCAS/topological_navigation/blob/master/topological_navigation/src/topological_navigation/manager.py#L109 will not return anything.

This happens in a database which has many existing maps in it, and also in one which only contains the two maps generated as above.

Deleting both maps and then inserting the map again with --pointset will have the same issue.

Running insertion without the --pointset flag will work fine.

Iranaphor commented 3 months ago

Closing as stale.