Documentation/P450 ROS 2 WikiEnglish · V1
Browse documentation
Advanced LiDAR-based localization flight

LiDAR-based obstacle avoidance

Notice: Due to the publication date of this tutorial and updates to product features and code: 1. The ground control station version may differ from the version shown in this tu…

5 min read · English documentation
Notice:
Due to the publication date of this tutorial and updates to product features and code:
1. The ground control station version may differ from the version shown in this tutorial.
2. The names and order of custom demos in the function scripts may vary slightly.
3. If you encounter any problems while using this product, contact after-sales support.

Connect the ground control station to the UAV

  • The figure below shows the main interface of the Prometheus ground control station.

After opening the Prometheus ground control station, click Connection Settings. A connection window will open.

13.png

  1. After opening the Prometheus ground control station, click Connection Settings.
  2. Connection Settings window
  3. Click to select this connection setting.
  4. Click Connect. The Prometheus ground control station starts connecting to the UAV.
  5. Click Disconnect. The Prometheus ground control station starts disconnecting from the UAV.
  • After clicking Connect or Disconnect, click X in the upper-right corner of the Connection Settings window to close it.

14.png

Check whether the connection is normal

  1. Main interface of the Prometheus ground control station after closing the Connection Settings window

15.png

  1. Click Message Feedback.
  2. UAV messages are received normally.

16.png

  1. Click Function Scripts.
  2. Nodes currently running on the onboard computer (nodes started by default after the Prometheus ground control station connects to the UAV)
  3. Current CPU usage of the onboard computer

Start LiDAR-based localization and check whether the data is normal

  1. Right-click a blank area in the ground control station, select Positioning Source Switching, and click MID360 (switch to LiDAR-based localization). After successful startup, the positioning source will change to Valid, and the heartbeat packet in the upper-right corner of the ground control station will change from red to blue.

16.png

  1. Check the positioning source data. After startup, the position data should converge toward (0,0,0). If the positioning data is not near (0,0,0), disconnect and reconnect the ground control station, then restart positioning.

16.png

  1. Click Function Scripts.
    • Open the function demo selection.
  2. No function demo is loaded by default.
Description
  1. Click Load Function Scripts.
  2. Function demos loaded from the onboard computer. Note that the newly added demos are the function scripts from the onboard computer.
    • These function demos are the function scripts for this hardware configuration.
Description

Start the function demo

  1. Click Function Scripts.

    • Open the function demo selection.
  2. Nodes currently running on the onboard computer

    • Start the corresponding function demo and wait for the nodes to start normally before proceeding to the next step.
  3. Current CPU usage of the onboard computer

Description

Open the local visualization interface

  1. Click System Settings.
  2. Click Basic Settings.
  3. Click Other.
  4. Click Open RViz.
  1. After opening the visualization in the previous step, the interface shown below will open automatically. a. 3D graphics display after opening the visualization b. Main RViz display interface similar to RViz under ROS

996247fa9f93530588bf9a0b77fecd51.jpg

  1. Mouse operations in this graphical window are the same as in RViz under ROS.
    • Click the interface with the left mouse button, hold it, and drag to adjust the viewing angle.
    • Hold down the mouse wheel and drag to adjust the planar position.
    • Scroll the mouse wheel to adjust the scale.

bb663df39aef9b029154b251dc8b6561.jpg

  1. Adjust the top-down viewing angle and image position to facilitate subsequent point-selection operations. 807180848db7488a56a124ad094e9e15.jpg

  2. Modify the upper height limit of the LiDAR point cloud.

    Modify it through the ground control station (this setting is not persistent and must be modified again after each reconnection).

    Tip

    After modifying the point-cloud filter height, click Reload, and then Back.

    • Click Settings. Point-cloud height settings
    • Enter the required point-cloud height filter.
    • Select the object to load.
    • Click Reload. Reload and return

Take off the UAV

  1. Click the Arm and Take Off button in the lower-right corner of the ground control station. When the slider appears, slide it to arm and take off.
  2. After arming and takeoff, the UAV automatically switches to COMMAND_CONTROL mode and hovers while waiting for commands from the ground control station.
  3. In the ground control station's RViz interface, select Enable Point Selection, then right-click the map. A point will be generated on the map as the target point for obstacle-avoidance planning. Click Send, and the UAV will automatically plan a path, avoid obstacles, and fly to the target point.

c4d9267277f40064ad4c251060a60dce.jpg

  • After selecting Enable Point Selection, right-click the map. A point will be generated on the map as the target point for obstacle-avoidance planning. Then click Send.

a79a22e261bf97a02fef00b6e7e336cb.jpg

  • Wait for the UAV to finish planning and reach the target point before initiating another point-selected flight. Do not specify another target point while the UAV is in flight. a79a22e261bf97a02fef00b6e7e336cb.jpg

Warning

1. Remote controller channel 6 should be in the uppermost position (position 1) by default. After the ground control station arms the aircraft and initiates takeoff, the aircraft enters COMMAND_CONTROL and accepts commands from the ground control station. There is no need to operate the remote controller at this stage; it may be set aside while you monitor the aircraft.
2. If manual takeover is required or the flight is abnormal, move channel 6 from the uppermost position (position 1) to the middle position (position 2), and operate the remote controller only after entering position-control manual mode. If manual control is unavailable, move channel 7 to the lowermost position (position 3) to perform an emergency motor stop.