autonomous navigation

This section uses the map built in the previous tutorial Radar Mapping to achieve autonomous navigation to the target Point of experiment.

1 Ready to start

  • Make sure the robot is powered on and the emergency stop switch is turned on.
  • Make sure that the robot host is installed and connected to the laser radar USB interface and the USB communication interface of the chassis.
  • Make sure that the experiments in the previous tutorials have passed the normal test.
  • Make sure to gracefully close the programs and terminals that the previous tutorials were running on.

2 detailed steps

  1. Close all terminals, open a new terminal, and run the navigation node
    roslaunch handsfree_2dnav navigation.launch map_name:=my_map
    
    When running navigation-related nodes, you need to follow the command with map_name:=my_map to pass the name of the map saved in the mapping tutorial to the program. my_map is the name of the map saved in our mapping tutorial.

After the operation is completed, the corresponding rviz configuration file will be automatically loaded to display the map and the visualization data of related sensors: picture

  1. Calibration of the initial position The initial position of the robot seen on the RVIZ map may not be its current actual position on the map. In order for the robot to navigate, we need to manually calibrate the initial position.

    • Click the 2D Pose Estimate icon on the RVIZ menu bar.
    • Move the mouse to the actual position of the robot on the map, press and hold the left button, and release it after adjusting the direction.
    • Repeat the above actions until the position of the robot on the map is the same as the actual position of the robot. You can observe whether the lidar data and the boundary of the map match.

      The calibrated effect is as follows: picture

  2. Navigate to the target point After the initial position of the calibration number, we can select a point on the map as the target point and let the robot navigate there.

    • Click the 2D Nav Goal icon on the RVIZ menu bar.
    • The mouse specifies a place on the map where the robot can go. If all goes well, the robot will plan a path and move autonomously to the specified target point.

      The effect is as follows: picture

results matching ""

    No results matching ""