Skip to content

Quick Topological Navigation in simulation tutorial

Jaime Pulido Fentanes edited this page Nov 8, 2017 · 2 revisions
  1. First step in strands is launching a mongodb:
    • If this is the first time:
      • create a directory were to store mongodb
    • To launch mongodb:
      • roslaunch mongodb_store mongodb_store.launch db_path:=/path/to/your/directory
  2. Second launch simulation:
    • Launch full simulation:
      • roslaunch strands_morse <environment>_morse.launch
    • if you want fast simulation you can use the following option:
      • roslaunch strands_morse <environment>_morse.launch env:=<environment>_fast
  3. Launch Navigation:
    • Some environments have navigation launch files already, for example:
      • roslaunch strands_morse <environment>_nav2d.launch
    • if not, you will need to follow these steps:
      • rosrun gmapping slam_gmapping
      • you move the robot around the env to create the map
      • in a separate terminal you save the map in a path:
        • rosrun map_server map_saver -f <name_of_map>
      • Launch strands_movebase:
        • roslaunch strands_movebase movebase.launch map:=<path_to_map>/<name_of_map>.yaml
  4. Launch topological_navigation:
    • If you don't have a topological map, First you need to create a topological map!:
      • launch empty topological navigation:
        • roslaunch topological_navigation topological_navigation_empty_map.launch map:=<name_of_topological_map>
        • in rviz add interactive markers for the following topic: /topological_map_add_rm_node/update
        • click green box where you want to add nodes, (you need to drive the robot to the position)
        • to view map add MarkerArray in Rviz with this topic: topological_map_visualisation
        • to send the robot around to the nodes added, add interactive marker: /go_to_node/update
        • to delete undesired edges add interactive markers for the following topic: /topological_map_edges/update
        • click red arrows to delete edges
    • if you already have a topological map:
      • launch:
        • roslaunch topological_navigation topological_navigation.launch map:=<name_of_topological_map>
        • all the marker arrays and interactive markers from the step before work!
  5. To Edit topological map:
    • Text file Method:
      • export topological map to text file: rosrun topological_utils map_to_yaml.py <name_of_topological_map> <name_of_file>.yaml
      • play with file
      • reload in datacenter: rosrun topological_utils load_yaml_map.py --force <name_of_file>.yaml
    • Using rosservices:
       /topological_map_manager/add_content_to_node
       /topological_map_manager/add_edges_between_nodes
       /topological_map_manager/add_tag_to_node
       /topological_map_manager/add_topological_node
       /topological_map_manager/get_edges_between_nodes
       /topological_map_manager/get_loggers
       /topological_map_manager/get_node_tags
       /topological_map_manager/get_tagged_nodes
       /topological_map_manager/get_tags
       /topological_map_manager/modify_node_tags
       /topological_map_manager/remove_edge
       /topological_map_manager/remove_topological_node
       /topological_map_manager/rm_tag_from_node
       /topological_map_manager/set_logger_level
       /topological_map_manager/switch_topological_map
       /topological_map_manager/update_edge
       /topological_map_manager/update_node_name
       /topological_map_manager/update_node_pose
       /topological_map_manager/update_node_tolerance
       /topological_map_publisher/get_topological_map
    • use robomongo or any other mongodb interface, map will be in the message_store DB in the topological map collection, each node is an entry and nodes in the same map have the same name in the pointset field.
    • Use this tool: https://github.com/strands-project/strands_navigation/tree/indigo-devel/topological_rviz_tools
  6. Use this in code:
    • topological navigation is an action server, there is a simple client that you can run like this:
  • For the environment this was tested <environment>=uol_bl
Clone this wiki locally