../_images/tiagopro-icon.png ../_images/tiago-icon.png ../_images/mobile-bases-icon.png

πŸ› οΈ Docking Manager#

The Docking Manager extends the capabilities of the Docking Server by learning dock station locations, handling multiple stations, or managing persistent storage. It provides a robust mechanism for integrating docking workflows, particularly in dynamic or multi-station environments.

Key features of the Docking Manager include:

  • πŸ“š LearnDock: Detects dock stations dynamically and stores their location in a persistent database.

  • πŸ—‚οΈ Dock Management: Integrates with a database to handle multiple stations, supporting complex environments such as multi-floor navigation.

  • πŸ”„ GoAndDock: Simplifies the docking process by automatically retrieving a dock from the database and executing the maneuver.

  • πŸ“ Relocalization: Ensures recovery from localization errors by aligning the robot to previously learned dock poses.

  • βš™οΈ Seamless Integration: Works with the docking_server and dock_detector_server for precise and efficient docking operations.

The Docking Manager enables streamlined workflows for docking, making it ideal for both static and dynamic scenarios.

Usage#

The Docking Manager simplifies docking operations. Below are step-by-step instructions for the primary use cases:

  • πŸ“š Learning a Dock Station

  • πŸ”„ Executing GoAndDock

  • ↩️ Performing Undocking.

Tip

We recommend using the PAL Navigation 2 panel in rviz for interactive learning and docking operations. To enable it:

  1. Open rviz and go to the β€œPanels” menu.

  2. Select β€œAdd New Panel”.

  3. Choose the PAL Navigation 2 plugin and select the Docking tab.

πŸ“š Learning a Dock Station#

  1. Ensure Localization: Make sure the robot is well-localized to prevent errors in learned dock poses.

  2. Position the Robot: Place the robot near the docking station in a staging pose as shown below:

    Staging Pose for Dock Detection

    Staging Pose for Dock Detection#

  3. Executes the /learn_dock:

    Attention

    Ensure the robot is well-localized during the /learn_dock process. Poor localization can lead to incorrect dock poses being stored in the database.

    Use the following command to learn a dock station:

    ros2 action send_goal /learn_dock pal_docking_msgs/action/LearnDock "target_id: <TARGET_ID>
    dock_id: '<DOCK_ID>'
    dock_type: <DOCK_TYPE>
    execute_dock_maneuver: true
    dock_charging_plugin: pal_charging_dock"
    

    Warning

    Remember to replace the <TARGET_ID>, <DOCK_ID> and <DOCK_TYPE> placeholders for your specific values.

    Tip

    Setting execute_dock_maneuver to true allows the robot to validate the docking station’s position during the learning phase.

  4. Validate: Once completed, the dock station is stored in the database. Use the following command to list all available docks:

    ros2 service call /docking_manager/get_docks eulero_msgs/srv/GetAnchors "parent_key: '<BUILDING_NAME>'"
    

    Warning

    Remember to replace the <BUILDING_NAME> placeholder for your specific building.

    You can also use rviz to learn dock stations interactively as shown below:

πŸ”„ Executing GoAndDock#

  1. Verify Dock Availability: Check if the desired dock is in the database:

    ros2 service call /docking_manager/get_docks eulero_msgs/srv/GetAnchors "parent_key: '<BUILDING_NAME>'"
    

    Warning

    Remember to replace the <BUILDING_NAME> placeholder for your specific building.

  2. Executes the /go_and_dock: Use the following command to perform the docking maneuver:

    ros2 action send_goal /go_and_dock pal_docking_msgs/action/GoAndDock "dock_id: '<FULL_DOCK_ID>'
    dock_charging_plugin: pal_charging_dock"
    

    Attention

    Remember to replace the <FULL_DOCK_ID> placeholder for your specific value. This corresponds with /<BUILDING_NAME>/<FLOOR_NAME>/<DOCK_ID>. It is necessary to be able to navigate to charging stations that are located on different floors or buildings.

  3. Internal Process: The Docking Manager retrieves the dock from the database, navigates to it, and performs the docking maneuver. During this process, the Docking Manager relocalizes the robot to ensure precise alignment with the learned dock pose.

Alternatively, you can use rviz to dock easily as shown in the following video:

↩️ Performing Undocking#

To undock from a station:

  1. Executes the /undock_robot: Use the following command:

    ros2 action send_goal /undock_robot opennav_docking_msgs/action/UndockRobot "dock_type: 'pal_charging_dock'
    max_undocking_time: 30.0"
    

You can also undock through rviz using the PAL Navigation 2 plugin as shown in the following video:

See also#

For further details, refer to the Docking API for the available actions and services.