Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Map format #35

Open
Jailander opened this issue Oct 22, 2020 · 10 comments
Open

New Map format #35

Jailander opened this issue Oct 22, 2020 · 10 comments

Comments

@Jailander
Copy link
Collaborator

Jailander commented Oct 22, 2020

This is the proposed new map format for topnav2

name:       new_map                    # Topological map name generally should be the same as in the pointset field
metric_map: map2d                       # 2D Metric map name (not used currently)
pointset:   new_map                     # The name of the group of nodes that compose the topological map, typically the same as name
transformation:
  rotation:                        # Topological Map Rotation
    w: 1.0
    x: 0.0
    y: 0.0
    z: 0.0
  translation:                                  # Topological Map Translation
    x: 0.0
    y: 0.0
    z: 0.0
  child: topo_map
  parent: map
meta:                            # Just some meta information
  last_updated: 2020-02-18 12:00 am              # Last time the map was modified
nodes:
- meta:                            # Just some meta information
    map: map2d
    node: WayPoint001        
    pointset: new_map
  node:                                 # Actual Node Properties
    edges:                        # List of edges departing from the node
    - action: move_action                # Action Name
      edge_id: WayPoint001_WayPoint002
      node: WayPoint002
      config: &move_action_config_1             # Edge Reconfigure
      - namespace: param1_namespace                   # Parameter
        name: param1_name
        value: param1_value
      - namespace: param2_namespace                   # Parameter
        name: param2_name
        value: param2_value
      recovery_behaviours_config: ''
      action_type: 'move_action_msgs/MoveActionGoal'      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: retry_3, replan, fail        # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
      restrictions_runtime: pose_exact
    - action: move_action                # Action Name
      edge_id: WayPoint001_WayPoint003
      node: WayPoint003
      config: &move_action_config_2             # Edge Reconfigure
      - namespace: param3_namespace                   # Parameter
        name: param3_name
        value: param3_value
      recovery_behaviours_config: ''
      action_type: move_action_msgs/MoveActionGoal      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: fail                    # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
      restrictions_runtime: 'True'
    localise_by_topic: ''                       # Localise by topic configuration string
    name: WayPoint001                        # Node name
    parent_frame: map
    pose:                        # Node pose
      orientation:                              # Node orientation (quaternion) 
        w: 0.92388
        x: 0
        y: 0
        z: 0.38268
      position:                        # Node position
        x: 0.0
        y: 0.0
        z: 0.0
    verts:                        # Vetices of the influence zone relative to node position
    - x: 0.689
      y: 0.287
    - x: 0.287
      y: 0.689
    - x: -0.287
      y: 0.689
    - x: -0.689
      y: 0.287
    - x: -0.689
      y: -0.287
    - x: -0.287
      y: -0.689
    - x: 0.287
      y: -0.689
    - x: 0.689
      y: -0.287
    properties:
      xy_goal_tolerance: 0.3                # Goal tolerance in the XY axes
      yaw_goal_tolerance: 0.1                 # Angular goal tolerance
    restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
    restrictions_runtime: 'True'
- meta:                            # Just some meta information
    map: map2d
    node: WayPoint002
    pointset: new_map
  node:                                 # Actual Node Properties
    edges:                        # List of edges departing from the node
    - action: move_action                # Action Name
      edge_id: WayPoint002_WayPoint001
      node: WayPoint001
      config: *move_action_config_1             # Edge Reconfigure
      recovery_behaviours_config: ''
      action_type: move_action_msgs/MoveActionGoal      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: retry_3, replan, fail        # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
      restrictions_runtime: 'True'
    - action: move_action                # Action Name
      edge_id: WayPoint002_WayPoint003
      node: WayPoint003
      config: *move_action_config_2             # Edge Reconfigure
      recovery_behaviours_config: ''
      action_type: move_action_msgs/MoveActionGoal      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: fail                    # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: 'True'
      restrictions_runtime: 'True'
    localise_by_topic: ''                       # Localise by topic configuration string
    name: WayPoint002                        # Node name
    parent_frame: map
    pose:                        # Node pose
      orientation:                              # Node orientation (quaternion) 
        w: 0.92388
        x: 0
        y: 0
        z: 0.38268
      position:                        # Node position
        x: 1.0
        y: 1.0
        z: 0.0
    verts:                        # Vetices of the influence zone relative to node position
    - x: 0.689
      y: 0.287
    - x: 0.287
      y: 0.689
    - x: -0.287
      y: 0.689
    - x: -0.689
      y: 0.287
    - x: -0.689
      y: -0.287
    - x: -0.287
      y: -0.689
    - x: 0.287
      y: -0.689
    - x: 0.689
      y: -0.287
    properties:
      xy_goal_tolerance: 0.3                # Goal tolerance in the XY axes
      yaw_goal_tolerance: 0.1                 # Angular goal tolerance
    restrictions_planning: 'True'
    restrictions_runtime: 'True'
- meta:                            # Just some meta information
    map: map2d
    node: WayPoint003
    pointset: new_map
  node:                                 # Actual Node Properties
    edges:                        # List of edges departing from the node
    - action: move_action                # Action Name
      edge_id: WayPoint003_WayPoint001
      node: WayPoint001
      config: *move_action_config_1             # Edge Reconfigure
      recovery_behaviours_config: ''
      action_type: move_action_msgs/MoveActionGoal      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: retry_3, replan, fail        # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
      restrictions_runtime: 'True'
    - action: move_action                # Action Name
      edge_id: WayPoint003_WayPoint002
      node: WayPoint002
      config: *move_action_config_2             # Edge Reconfigure
      recovery_behaviours_config: ''
      action_type: move_action_msgs/MoveActionGoal      # Goal type for the Action
      goal:
        target_pose:
          header:
            frame_id: $node.parent_frame
          pose: $node.pose
      fail_policy: fail                    # What to do if execution fail (fail, replan, retry_#number_of_times)
      fluid_navigation: true        # if false robot must be at exact pose of origin node before traversing the edge
      restrictions_planning: 'True'
      restrictions_runtime: 'True'
    localise_by_topic: ''                       # Localise by topic configuration string
    name: WayPoint003                        # Node name
    parent_frame: map
    pose:                        # Node pose
      orientation:                              # Node orientation (quaternion) 
        w: 0.92388
        x: 0
        y: 0
        z: 0.38268
      position:                        # Node position
        x: -1.0
        y: -1.0
        z: 0.0
    verts:                        # Vertices of the influence zone relative to node position
    - x: 0.689
      y: 0.287
    - x: 0.287
      y: 0.689
    - x: -0.287
      y: 0.689
    - x: -0.689
      y: 0.287
    - x: -0.689
      y: -0.287
    - x: -0.287
      y: -0.689
    - x: 0.287
      y: -0.689
    - x: 0.689
      y: -0.287
    properties:
      xy_goal_tolerance: 0.3                # Goal tolerance in the XY axes
      yaw_goal_tolerance: 0.1                 # Angular goal tolerance
    restrictions_planning: 'True'
    restrictions_runtime: 'True'
@Jailander
Copy link
Collaborator Author

updated map format to include restrictions

@Jailander
Copy link
Collaborator Author

Hi, I was wondering if it would be worth including the field's datum in the topological map format, and if so, should it be included in the meta field or as a field in root?

Also, we should consider that there is already a field for the transform between the metric map and the topo map so probably this won't be necessary.

@Jailander
Copy link
Collaborator Author

@MikHut any comments?

@MikHut
Copy link
Collaborator

MikHut commented Nov 6, 2020

It might be nice to include the datum so you can do things independently with the topomap, however, the datum is required by a lot of nodes so it might be best to just keep the one, and all the nodes get it from the same place instead of storing it independently

@ayu135
Copy link
Contributor

ayu135 commented Jan 7, 2021

I discovered that there is no field called edge_id for the edges in the new map, the old map had the edge id which was used by the navigate.py followroute() function. I think we should add that here as well.

@adambinch
Copy link
Collaborator

adambinch commented Jan 7, 2021 via email

@adambinch
Copy link
Collaborator

The config field for an edge is now a list of dictionaries, with each setting a parameter to reconfigure and contains the parameter's namespace, name and value.

@adambinch
Copy link
Collaborator

adambinch commented Mar 18, 2021

The restrictions field for a node and for an edge has been changed from:

restrictions:
        robot_type: "Narrow"
        task_name: "NOT_UV"
        transition: "exact_pose"

to:

restrictions_planning: (robot_tall & task_transportation) |  ~ robot_narrow
restrictions_runtime: pose_exact

A restriction is now a boolean sentence (default='True'). In other words nodes and edges are not restricted by default.
Node and edge restrictions can be updated using the services /topological_map_manager2/update_node_restrictions and /topological_map_manager2/update_edge_restrictions, respectively.

@adambinch
Copy link
Collaborator

adambinch commented Apr 19, 2021

default edge goal field changed from

goal:
  target_pose: $node.pose

to

goal:
  target_pose:
    header:
      frame_id: $node.parent_frame
    pose: $node.pose

and field parent_frame (default="map") added to a node.

@adambinch
Copy link
Collaborator

This seems to be done for now but will keep as an open issue as there could be changes in the future @Jailander @francescodelduchetto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants