Ensure an AprilTag is affixed to the front of the dock to allow the robot to accurately detect the dock’s position.
The AprilTag must belong to the tag36h11 family and measure 6 inches. The image below illustrates how to measure
the tag size. For further information about AprilTags, see the details provided here.
Docking with Nova Carter in Isaac Sim Using AprilTag
Add the charging dock at the path /localhost/NVIDIA/Assets/Isaac/4.2/Isaac/Props/NVIDIA/Carter/ChargingDock/charging_station_galileo.usd to the Isaac ROS Sample scene.
Adjust docking and robot transforms as desired. For example: set dock to (-10.0, 14.0, 0.01, 0.0, 0.0, 180) and set robot to (-2.0, 14.0, 0.0, 0.0, 0.0, 180).
Select /World/Nova_Carter_ROS/ros_lidars/publish_front_2d_lidar_scan in the Stage pane and change the topic name for front 2D Lidar as shown below.
Select /World/Nova_Carter_ROS/ros_lidars/front_2d_lidar_render_product in the Stage pane and set enabled to True (checked).
Select /World/Nova_Carter_ROS/ros_lidars/front_3d_lidar_render_product in the Stage pane and set enabled to False (unchecked).
Press Play to initiate data publishing from Isaac Sim.
AprilTag attachment and configuration:
The following image illustrates the attachment of the AprilTag to the dock in the simulation environment. The default dock is equipped with four AprilTags.
The following steps configure the AprilTag for docking:
Select an AprilTag: Choose one of the four AprilTags to scale.
Adjust Parameters: Scale the selected AprilTag using the parameters shown in the image below.
Hide Remaining Tags: Make the other three AprilTags invisible.
Build and install the required packages:
Make sure you followed the Prerequisites and you are inside the Isaac ROS Docker container.
You must replace <path_to_map_yaml> with the path of the map YAML
file. If you do not have a map of your environment you can create one using
the Lidar mapping tutorial
Obtain an initial pose for your dock.
The docking server uses this dock pose to calculate an approximate initial pose for dock detection. Precise measurements are not necessary.
Use the PS5 joystick to maneuver the Nova Carter into the dock. Open a new terminal in the container and execute:
ros2runtf2_rostf2_echomapbase_link
Verify that you receive output similar to the following:
The robot state does not turn to CHARGING, if the battery percentage is high (around 90%).
Send the undocking mission. (Optional)
undock_robot action parameters (types of all parameters are string):
Parameter
Description
dock_type
The type of dock. For Nova Carter, it is nova_carter_dock.
trigger_global_localization
Optional. Whether to trigger global localization after executing the action. It is true by
default. In the default Nova Carter configuration, global localization relies on the front 2D Lidar.
This can lead to positional drift when Nova Carter is docked. It is recommended to enable this.
The robot can still perform undocking when the state is not CHARGING. Nav2 Collision detection is
disabled when the robot is in-between the staging pose and the dock. The path between staging
pose and the dock is expected to be free of obstacles.
If the Nova Carter does not establish contact with the dock after the docking process is complete, consider
adjusting the external_detection_translation_x parameter in
/workspaces/isaac_ros-dev/src/nova_carter/nova_carter_docking/params/nova_carter_docking.yaml.
The default value is -0.18. You may increase this value to bring the Nova Carter closer to the dock.
More details for docking parameters can be found on GitHub.