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- Applicable model: P450_Allspark2Super_mid360_D435i (a D435i depth camera must be installed)
- We recommend first completing Manual flight and reading LiDAR-based localization environment requirements
- This section uses D435i depth information for point-designated flight with visual EGO obstacle avoidance under LiDAR-based localization. This is a different function from LiDAR-based obstacle avoidance; do not confuse the two
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
- After opening the Prometheus ground control station, click Connection Settings; the connection window appears

- 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
- After the connection is successful, click X in the upper-right corner of the window to close the connection settings window

Check whether the connection is normal
- After closing the connection settings window, the Prometheus ground control station main interface should appear
-
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
-
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
- Click Load Function Scripts
- 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)
Start LiDAR-based localization and check the data
- 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

- 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

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.
- 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
- After successful startup, click Settings on the rviz page and enter the point-cloud height (recommended: 1.8 m)
- Click Reload, and then click Back
- 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
- After takeoff, the rviz view on the ground control station main interface loads the point-cloud map. You can then select Enable Point Selection
- 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
- 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
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.
