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

D435i visual obstacle avoidance

Applicable model: P450 Allspark2Super mid360 D435i (a D435i depth camera must be installed) We recommend first completing Manual flight and reading LiDAR based localization envi…

5 min read · English documentation

Warning

Due to the publication date of this tutorial and upgrades 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 Function Scripts may differ slightly
3. If you encounter any problems while using this product, contact after-sales support.

Caution

The G1 gimbal configuration does not include a D435i and is not covered in this chapter.

Connect the ground control station to the UAV

  1. After opening the Prometheus ground control station, click Connection Settings; the connection window appears

Connection Settings window

  1. In the connection settings window, select the corresponding connection entry (the host address defaults to the onboard IP 192.168.1.11), and click Connect
  2. After the connection is successful, click X in the upper-right corner of the window to close the connection settings window

Successful connection and closing the window

Check whether the connection is normal

  1. After closing the connection settings window, the Prometheus ground control station main interface should appear
Ground control station main interface
  1. Click Message Feedback and confirm that UAV messages are received normally; if there is no feedback, troubleshoot Prepare the communication link and the computer's network configuration

  2. Click Function Scripts to view the nodes currently running onboard and their CPU usage (communication-related nodes start by default after the connection is successful)

  • If there are no custom demos in the Function Scripts list, first click Load Function Scripts to load the function scripts configured on this aircraft from the onboard computer, and then continue with the D435i visual obstacle avoidance procedure
Function Scripts entry
  1. Click Load Function Scripts
  2. Among the function demos loaded from the onboard computer, identify the script newly added after this connection (that is, the function script corresponding to this hardware configuration)
Load Function Scripts

Start LiDAR-based localization and check the data

  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 changes to Valid, and the heartbeat indicator in the upper-right corner changes from red to blue

Switch the positioning source to LiDAR-based localization

  1. Check the positioning and position data: after startup, the position should converge toward (0, 0, 0). If the deviation is large, disconnect and reconnect the ground control station, and then restart LiDAR-based localization

Check the positioning data

Caution

LiDAR-based localization has environmental requirements. Before flight, read LiDAR-based localization environment requirements. For more information about switching, see Positioning source switching.

D435i visual obstacle avoidance procedure

Caution

Before takeoff and point-designated flight:

  • Do not place obstacles within 0.5 m of the aircraft
  • The space through which the aircraft flies must be more than 1 m wide (the planning inflation layer is approximately 0.45 m)
  • The flight altitude must not exceed 2.5 m

After connecting the ground control station and starting LiDAR-based localization as described above, follow these steps.

  1. In Function Scripts, start the scripts in order (use the names shown in the ground control station list): first start D435i Visual Point Cloud, and then start Visual Obstacle Avoidance
Start D435i Visual Point Cloud, then start Visual Obstacle Avoidance
  1. After successful startup, click Settings on the rviz page and enter the point-cloud height (recommended: 1.8 m)
Point-cloud height setting
  1. Click Reload, and then click Back
Reload and return
  1. Click Arm and Take Off in the ground control station, and slide the arming slider to complete takeoff. The aircraft automatically switches to COMMAND_CONTROL mode and hovers in the air while waiting for commands from the ground control station
Arm and take off
  1. After takeoff, the rviz view on the ground control station main interface loads the point-cloud map. You can then select Enable Point Selection
rviz point cloud and Enable Point Selection
  1. Right-click a target point on the rviz map, and then click Send. Note the size of the actual flight site: each grid cell on the map represents 1 m
Right-click to designate a point and send it
  1. The aircraft plans a path and flies to the target point, then hovers after arrival. You can then select Land, Manual Control (take over with the remote controller), or designate another point to continue flying
Hover after reaching the target point

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. Wait until the UAV reaches the current target point and hovers before sending the next designated point. Do not continuously change the target point during flight.
3. 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.