Skip to content

In and Outdoor operations

Related components: Autopilot Inference, Cerebra Studio – Mission Planner.

The examples on indoor and outdoor operations can be extended into operations in which the robot operates both indoors as well as outdoors. Planning a job for such operations is similar as to planning a job for either indoor or for outdoor operations. The difference is the preparation of the job as the indoor localization map and the outdoor satellite map need to be aligned.

How to prepare such autonomous indoor and outdoor* operations will be discussed here.

Info

These features are only available if your Origin One was acquired or upgraded with Avular's Autopilot Inference, an RTK-GNSS antenna, and a base station. Features that require a "localization map" additionally depend on the presence of a 3D LiDAR sensor, alongside the Autopilot Inference and RTK-GNSS systems.

Warning

Ensure that the robot is unplugged from its charger before operation.

Job preparation

Before you startup the robot you must first prepare the environment of the robot as well as the information that is present on the robot. What needs to be prepared are the locations of the Aruco marker and the latitude and longitude of the global origin of the robot, which is called the coordinate system information, or coord_system in short.

Coordinate system information

The Origin One navigates in a Cartesian space that is defined by the global origin. The information about which real-world position is in fact the global origin is available as the Coordinate System Information (click for more details on the topic) and can be retrieved by echoing the topic:

ros2 topic echo /autopilot/coord_system

Your first action is to select the appropriate Latitude and Longitude values for your indoor and outdoor operation. Best is to select a physical, outdoor feature to which you can drive the robot and that you may easily recognize in the real world and on a satellite image. Examples are the lid of a sewer, cross sections of roads, etc. Since your robot may measure different latitude and longitude values than those defined in Google Maps for equal points in the real world, which is also known as a bias, it is best to drive the robot manually to this outdoor feature that you have selected and read out the latitude and longitude values of the robot's RTK-GNSS measurement at this position: `ros2 topic echo /robot/gnss/fix.

Warning

Do not select a feature that is within 5 meters of a building as buildings will heavily effect the RTK-GNSS system of the robot resulting in incorrect position measurements that can be off as far as 10 meters.

Once you have selected your Latitude and Longitude values, for example, latitude is 51.4532247 and longitude 5.4484141 and the measured altitude is 64.14, you may use the following service to store those value in the database of the robot:

ros2 service call /autopilot/information_manager/set_stored_robot_coord_info knowledge_base_msgs/srv/SetRobotCoordInfo "{\"coord_info\": {\"type\": 1, \"map_name\": \"\", \"latitude\": 51.4532247, \"longitude\": 5.4484141, \"altitude\": 64.14, \"zone\": -1, \"north\": true, \"x_offset\": 0.0, \"y_offset\": 0.0, \"z_offset\": 0.0}}"

With the above action finished, you ensured that at every next instance the robot starts up in front of an Aruco marker (when RTK-GNSS is not available) that the robot shall use these values as its coord_system. Whenever a robot is started up outdoors it will still use the first RTK-GNSS fix. If you wish to change this last aspect, please make a request at Avular.

Update the position of one or more Aruco markers

In order for the robot to use your newly inserted Coordinate System Information, you should manually drive the robot in front of a known Aruco marker and reboot. Once the robot is rebooted you should follow the code examples, more specifically the "information_example", that show you how you may update the position of Aruco markers are they are known to the robot, i.e., how they are stored in the database of the robot. Please also read the details about how to update the pose of Aruco markers.

Note

The Cartesian space of the global origin, or Coordinate System Information, is ALWAYS defined with the X-axis pointing East and the Y-axis pointing North. So when you measure the position of the Aruco marker wrt the Latitude and Longitude of the Coordinate System Information, make sure that you measure the X-value as the distance between the Aruco marker and the global origin using along the Eastern direction and the Y-value as the distance between the Aruco marker and global origin along the Northern direction.

Further, the Aruco marker may be facing a different direction than East, i.e., the X-axis of the global frame is different than the X-axis of the Aruco marker. In that case you should also measure the angular difference between these two axis, also known as the heading of the Aruco marker, and insert that when you specify the position of the Aruco marker using the "information_examples". Positive and negative angles are defined by the Cartesian space.

In the example below, where a satellite image is depicted on the right and a snippet of the floorplan of the building in that satellite image is shown on the left, we have that the pose of the Aruco marker wrt the global origin is defined as X =3.5 meters, Y = 7.5 meters and heading = -100 degrees.

TwilightPrepping

Record an map of the indoor part of the environment

Since the position of the Aruco markers has been updated you should manually drive in front of the Aruco marker and reboot the robot. Then, you may follow the user-mapping workflow for creating a map of the environment. This map should cover the indoor area and it may also take some portion outdoors.

Note

When you have to draw (and save) the boundary of the map in the Mapping GUI please take extra care on how to draw the boundaries there where the robot will transition from indoor to outdoor (and vice-versa). As a general rule of thumb, draw the boundary in line with the door so that the inside of the boundary represents the indoor environment and the external part of the boundary represent the outdoor environment for the areas around the doorways.

Check the results in Cerebra Studio

Once you have recorded a map and rebooted the robot either outdoors or in front of the Aruco markers that is linked to the map, you may open Cerebra Studio and visualize your recorded map as an overlay on a satellite image. This way you may check whether your recorded, indoor map is well positioned in the satellite image, and therefore whether the coord_system and position of Aruco markers are properly defined in the real (GNSS) world.

In order to visualize a satellite map and a localization map simultaneously in Cerebra Studio you should open Cerebra Studio, connect it to the robot, open Mission Planning in the main menu and then:

  • Click on the button to Create a new location
  • Toggle both the Global Map and well as the Local Map and:

    • For the Global Map select the latitude and longitude of the center of the satellite map in Cerebra Studio;
    • For the Local Map select the map that you have just created (which is the map notes as "active" in case the robot was started in front of the Aruco marker that you intend to use for this operation).
    • Click on the buttong to Save the location;
    • And then open that location.
    • This will prompt a new window that asks for selecting an existing job, or creating a new one. In this case you will most likely want to Create a new job.

Cerebra Studio will then start loading the satellite map and the location map as an overlay. When the Origin One was properly initialized you will also see the location of the robot in the map.

Please examen whether the (indoor) localization map is nicely located within the satellite map. For example, that the orientation of walls in de map is in line with how the walls are position in the satellite image. Or that the doorways in the (indoor) localization map are also properly positioned on where they will be in the satellite image.

Warning

The example depicted here shows a bad alignment between the satellite and the (indoor) localization map. You may expect that the robot will have difficulty when driving from indoors to outdoors, or vice-versa.

BadTwilightMap

Job planning and execution

Now that you have created a proper satellite and (indoor) localization map of the environment you may schedule tasks as you would also otherwise do when creating an indoor or an outdoor job. However, please take the following design principles into consideration when designing your job:

  1. When transitioning from indoor to outdoor (and vice versa) the robot will drive on and off the map. Since a GoTo Waypoint task requires that the starting position and the goal waypoint are on the map, note that you cannot schedule a GoTo Waypoint task when transitioning from indoor to outdoor as either the starting position or the goal waypoint shall not be on the map.
  2. Make the transitions as short as possible and let the robot wait for some time after each indoor or outdoor transition, i.e.,

    • When driving from indoor to outdoor make sure to drive 5 to 10 meters away from the building where RTK-GNSS reception is accurate and wait for 10 or 20 seconds. The robot will get a more accurate initialization of its RTK-GNSS system when it is standing still when receiving new fixes.
    • When driving from outdoor to indoor make sure that the robot drive some 3 meters indoors and that is positions itself in front of the Aruco marker that is linked to the indoor map (which should be the same Aruco marker as where the robot started its operation from). Also, let it wait in front of the Aruco marker for some 3-5 seconds so that its is able to accommodate its position on the map based on the information of the marker.

Note

Automatic loading of a map is only possible when the robot is booted in front of the Aruco marker that is linked to that map. But if you boot the robot outdoors, and thus no map is loaded, you may use the service call ros2 service call /autopilot/information_manager/load_localization_map knowledge_base_msgs/srv/PublishLocalizationMap "name: map_name" to load a localization map.

However, when booted outdoors and no map is loaded, and the robot drives indoor in front of the marker, it will still load the map automatically.

Note

Depending on whether you will boot outdoors or indoors the robot may set a different Coordinate System Information. Indoors it will always load the Coordinate System Information that was stored in the database of the robot. However, when it is booted up outdoors that the Coordinate System Information is set to the first RTK-GNSS fix that is received. Nonetheless, any Polygons, Paths and Waypoint that you defined in earlier operations in which the Coordinate System Information may have had a different latitude and Longitude are automatically re-directed to reflect the real-world position with respect to the current Coordinate System Information of the robot.