Skip to content

Custom ROS2 messages

The Origin One has a number of custom ROS2 messages. The message packages most useful to a user are

  • origin_msgs: capturing topics and services related to the Origin Platform
  • autonomy_msgs: capturing topics and services related to the Autopilot Inference for autonomous navigation
  • knowledge_base_msgs: capturing topics and services related to the Autopilot Inference for managing information and the status of the Autopilot Inference
  • planner_msgs: defining a service to record a path

The above message packages are again dependent on other message packages, such as

  • artag_pose_msgs: capturing topics related to the IDs and poses of Aruco markers detected in the RGB image
  • complete_coverage_planner_msgs: defining a topic on how to cover an area, i.e., according to which infill policy

In addition, the Origin One has an internal database for managing polygons, paths and waypoints. You may list and set these concepts in the data, with great care, using the following two types of services:

  • autopilot\information_manager\resource\list\polygon
  • autopilot\information_manager\resource\list\path
  • autopilot\information_manager\resource\list\artifact

and

  • autopilot\information_manager\resource\set\polygon
  • autopilot\information_manager\resource\set\path
  • autopilot\information_manager\resource\set\artifact

These services list and set such information as a json format. In order to facilitate the increasing number of object types (now and in the future), we decided to use a generic JSON formatted message that may include any type of resource:

Generic JSON

{
  "type": <str>  # Acceptable values ["map", "path", "job", "schedule", "marker", "waypoint"]
  "resource": {
              #### Resource Fields #### 
          }
}

Depending on which type of resource the JSON-field "resource" is defined differently as you may notice in the following examples.

Polygon JSON

{
    "type": "polygon"
    "resource":{
        "id": <UUID>,
        "group_id": <UUID>,
        "name": <str>,
        "type": <str "go_area", "no_go_area", "map_layout", "cover_area">
        "creation_date": <ISO 8601>,
        "coordinate_system_info": @CoordinateSystemInfo,
        "points": [@Point, @Point, ...],
        "map_id": <str>                                 # Optional, in case it's a map layout.
    }
}

Path JSON

{
    "type": "path"
    "resource":{
        "id": <UUID>,
        "group_id": <UUID>,
        "name": <str>,
        "creation_date": <ISO 8601>,
        "coordinate_system_info": @CoordinateSystemInfo,
        "poses": [@Pose, @Pose, ...],
        "constraints": {
            "max_speed_ms": <float [m/s]>,
            "min_speed_ms": <float [m/s]>,
            "max_height_m": <float [m]>,
            "min_height_m": <float [m]>
        }
    }
}

marker JSON

{
    "type": "marker"
    "resource":{
        "id": <UUID>,
        "group_id": <UUID>,
        "marker_id": <uint>,
        "name": <str>,
        "creation_date": <ISO 8601>,
        "coordinate_system_info": @CoordinateSystemInfo,
        "pose": @Pose,
        "map_id": <UUID>,                               # optional, in case the marker should automatically load a map
    }
}

Waypoint JSON

{
    "type": "marker"
    "resource":{
        "id": <UUID>,
        "group_id": <UUID>,
        "name": <str>,
        "creation_date": <ISO 8601>,
        "coordinate_system_info": @CoordinateSystemInfo,
        "pose": @Pose, 
    }
}

Coordinate System Information JSON

{
    "type": <enum, 0 = LR, 1 = LTP, 2 = UTM, 3 = UNKNOWN>
    "local_relative": <UUID>                    #constraints the map_id
    "local_tangent_plane": {
      "latitude": <float [°]>,
      "longitude": <float [°]>,
      "altitude": <float [m]>,
    }
    "UTM": {
      "zone": <int referring to the UTM zone>,
      "north": <bool>,
      "x_offset": <float [m]>,
      "y_offset": <float [m]>,
      "z_offset": <float [m]>,
    }
}

Pose JSON

{
    "position": @Point,
    "orientation": @Quaternion
}

Point JSON

{
    "x": <float [m]>,
    "y": <float [m]>,
    "z": <float [m]>
}

Quaternion JSON

{
  "x": <float>,
  "y": <float>,
  "z": <float>,
  "w": <float>
}