Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Crowdin updates #3491

Merged
merged 25 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
858641a
New translations main.md (Japanese)
PX4BuildBot Dec 11, 2024
fc648f5
New translations main.md (Korean)
PX4BuildBot Dec 11, 2024
16d34dc
New translations main.md (Turkish)
PX4BuildBot Dec 11, 2024
2d8eacf
New translations main.md (Ukrainian)
PX4BuildBot Dec 11, 2024
14036bd
New translations main.md (Chinese Simplified)
PX4BuildBot Dec 11, 2024
269a948
New translations safety.md (Japanese)
PX4BuildBot Dec 11, 2024
23dd33d
New translations safety.md (Korean)
PX4BuildBot Dec 11, 2024
281d83d
New translations safety.md (Turkish)
PX4BuildBot Dec 11, 2024
50ba28e
New translations safety.md (Ukrainian)
PX4BuildBot Dec 11, 2024
6edddfa
New translations safety.md (Chinese Simplified)
PX4BuildBot Dec 11, 2024
6bcea70
New translations collision_prevention.md (Japanese)
PX4BuildBot Dec 11, 2024
92dcad4
New translations collision_prevention.md (Korean)
PX4BuildBot Dec 11, 2024
62f7a3a
New translations collision_prevention.md (Turkish)
PX4BuildBot Dec 11, 2024
ecd713a
New translations collision_prevention.md (Ukrainian)
PX4BuildBot Dec 11, 2024
b36ba1a
New translations collision_prevention.md (Chinese Simplified)
PX4BuildBot Dec 11, 2024
2c593e4
New translations index.md (Japanese)
PX4BuildBot Dec 12, 2024
9e71800
New translations index.md (Korean)
PX4BuildBot Dec 12, 2024
843a9d1
New translations index.md (Turkish)
PX4BuildBot Dec 12, 2024
c95d7ad
New translations index.md (Ukrainian)
PX4BuildBot Dec 12, 2024
b8ec133
New translations index.md (Chinese Simplified)
PX4BuildBot Dec 12, 2024
6bd7f8b
New translations docs.md (Japanese)
PX4BuildBot Dec 12, 2024
d909c6f
New translations docs.md (Korean)
PX4BuildBot Dec 12, 2024
690a18a
New translations docs.md (Turkish)
PX4BuildBot Dec 12, 2024
3eea7a9
New translations docs.md (Ukrainian)
PX4BuildBot Dec 12, 2024
2fc7e96
New translations docs.md (Chinese Simplified)
PX4BuildBot Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 106 additions & 6 deletions ja/computer_vision/collision_prevention.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ All relevant parameters are listed below:
The data from all sensors are fused into an internal representation of 72 sectors around the vehicle, each containing either the sensor data and information about when it was last observed, or an indication that no data for the sector was available.
When the vehicle is commanded to move in a particular direction, all sectors in the hemisphere of that direction are checked to see if the movement will bring the vehicle closer than allowed to any obstacles. If so, the vehicle velocity is restricted.

The Algorithm then can be split intwo two parts, the constraining of the acceleration setpoint coming from the operator, and the compensation of the current velocity of the vehicle.
The Algorithm then can be split into two parts, the constraining of the acceleration setpoint coming from the operator, and the compensation of the current velocity of the vehicle.

:::info
If there is no sensor data in a particular direction, movement in that direction is restricted to 0 (preventing the vehicle from crashing into unseen objects).
Expand All @@ -153,7 +153,8 @@ If you wish to move freely into directions without sensor coverage, this can be

### Acceleration Constraining

For this we split out Acceleration Setpoint into two components, one parallel to the closest distance to the obstacle and one normal to it. Then we scale each of these components according the the figure below.
For this we split out the acceleration setpoint into two components, one parallel to the closest distance to the obstacle and one normal to it. Then we scale each of these components according the the figure below.

![Scalefactor](../../assets/computer_vision/collision_prevention/scalefactor.png)

<!-- the code for this figure is at the end of this file -->
Expand Down Expand Up @@ -213,7 +214,106 @@ The diagram below shows a simulation of collision prevention as viewed in Gazebo

![RViz image of collision detection using the x500\_lidar\_2d model in Gazebo](../../assets/simulation/gazebo/vehicles/x500_lidar_2d_viz.png)

## Sensor Data Overview (Implementation Details)
## Development Information/Tools

### Plotting Obstacle Distance and Minimum Distance in Real-Time with PlotJuggler

[PlotJuggler](../log/plotjuggler_log_analysis.md) can be used to monitor and visualize obstacle distances in a real-time plot, including the minimum distance to the closest obstacle.

<lite-youtube videoid="amLheoHgwc4" title="Plotting Obstacle Distance and Minimum Distance in Real-Time with PlotJuggler"/>

To use this feature you need to add a reactive Lua script to PlotJuggler, and also configure PX4 to export [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic data.
The Lua script works by extracting the `obstacle_distance_fused` data at each time step, converting the distance values into Cartesian coordinates, and pushing them to PlotJuggler.

The steps are:

1. Follow the instructions in [Plotting uORB Topic Data in Real Time using PlotJuggler](../debug/plotting_realtime_uorb_data.md)

2. Configure PX4 to publish obstacle distance data (so that it is available to PlotJuggler):

Add the [`obstacle_distance_fused`](../msg_docs/ObstacleDistance.md) UORB topic to your [`dds_topics.yaml`](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) so that it is published by PX4:

```sh
- topic: /fmu/out/obstacle_distance_fused
type: px4_msgs::msg::ObstacleDistance
```

For more information see [DDS Topics YAML](../middleware/uxrce_dds.md#dds-topics-yaml) in _uXRCE-DDS (PX4-ROS 2/DDS Bridge)_.

3. Open PlotJuggler and navigate to the **Tools > Reactive Script Editor** section.
In the **Script Editor** tab, add following scripts in the appropriate sections:

- **Global code, executed once:**

```lua
obs_dist_fused_xy = ScatterXY.new("obstacle_distance_fused_xy")
obs_dist_min = Timeseries.new("obstacle_distance_minimum")
```

- **function(tracker_time)**

```lua
obs_dist_fused_xy:clear()

i = 0
angle_offset = TimeseriesView.find("/fmu/out/obstacle_distance_fused/angle_offset")
increment = TimeseriesView.find("/fmu/out/obstacle_distance_fused/increment")
min_dist = 65535

-- Cache increment and angle_offset values at tracker_time to avoid repeated calls
local angle_offset_value = angle_offset:atTime(tracker_time)
local increment_value = increment:atTime(tracker_time)

if increment_value == nil or increment_value <= 0 then
print("Invalid increment value: " .. tostring(increment_value))
return
end

local max_steps = math.floor(360 / increment_value)

while i < max_steps do
local str = string.format("/fmu/out/obstacle_distance_fused/distances[%d]", i)
local distance = TimeseriesView.find(str)
if distance == nil then
print("No distance data for: " .. str)
break
end

local dist = distance:atTime(tracker_time)
if dist ~= nil and dist < 65535 then
-- Calculate angle and Cartesian coordinates
local angle = angle_offset_value + i * increment_value
local y = dist * math.cos(math.rad(angle))
local x = dist * math.sin(math.rad(angle))

obs_dist_fused_xy:push_back(x, y)

-- Update minimum distance
if dist < min_dist then
min_dist = dist
end
end

i = i + 1
end

-- Push minimum distance once after the loop
if min_dist < 65535 then
obs_dist_min:push_back(tracker_time, min_dist)
else
print("No valid minimum distance found")
end
```

4. Enter a name for the script on the top right, and press **Save**.
Once saved, the script should appear in the _Active Scripts_ section.

5. Start streaming the data using the approach described in [Plotting uORB Topic Data in Real Time using PlotJuggler](../debug/plotting_realtime_uorb_data.md).
You should see the `obstacle_distance_fused_xy` and `obstacle_distance_minimum` timeseries on the left.

Note that to run the script again after clearing the data, you have to press **Save** again.

### Sensor Data Overview

Collision Prevention has an internal obstacle distance map that divides the plane around the drone into 72 Sectors.
Internally this information is stored in the [`obstacle_distance`](../msg_docs/ObstacleDistance.md) UORB topic.
Expand All @@ -225,11 +325,11 @@ The angles in the `obstacle_distance` topic are defined as follows:

The data from rangefinders, rotary lidars, or companion computers, is processed differently, as described below.

### Rotary Lidars
#### Rotary Lidars

Rotary Lidars add their data directly to the [`obstacle_distance`](../msg_docs/ObstacleDistance.md) uORB topic.

### Rangefinders
#### Rangefinders

Rangefinders publish their data to the [`distance_sensor`](../msg_docs/DistanceSensor.md) uORB topic.

Expand All @@ -241,7 +341,7 @@ For example, a distance sensor measuring from 9.99° to 10.01° the measurements
the quaternion `q` is only used if the `orientation` is set to `ROTATION_CUSTOM`.
:::

### Companion Computers
#### Companion Computers

Companion computers update the `obstacle_distance` topic using ROS2 or the [OBSTACLE_DISTANCE](https://mavlink.io/en/messages/common.html#OBSTACLE_DISTANCE) MAVLink message.

Expand Down
7 changes: 3 additions & 4 deletions ja/config/safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ If VTOLs have are configured to switch to hover for landing ([NAV_FORCE_VT](../a

The relevant parameters for all vehicles shown below.

| Parameter | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="COM_POS_FS_DELAY"></a>[COM_POS_FS_DELAY](../advanced_config/parameter_reference.md#COM_POS_FS_DELAY) | Delay after loss of position before the failsafe is triggered. |
| <a id="COM_POSCTL_NAVL"></a>[COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL) | Position control navigation loss response during mission. Values: 0 - assume use of RC, 1 - Assume no RC. |
\| Parameter | Description |
\| ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | |
\| <a id="COM_POSCTL_NAVL"></a>[COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL) | Position control navigation loss response during mission. Values: 0 - assume use of RC, 1 - Assume no RC. |

Parameters that only affect Fixed-wing vehicles:

Expand Down
13 changes: 12 additions & 1 deletion ja/contribute/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,18 @@ Build the library locally to test that any changes you have made have rendered p
This will be something like: `http://localhost:5173/px4_user_guide/`.
- Stop serving using **CTRL+C** in the terminal prompt.

5. You can build the library as it would be done for deployment:
5. Open previewed pages in your local editor:

First specify a local text editor file using the `EDITOR` environment variable, before calling `yarn start` to preview the library.
For example, on Windows command line you can enable VSCode as your default editor by entering:

```sh
set EDITOR=code
```

The **Open in your editor** link at the bottom of each page will then open the current page in the editor (this replaces the _Open in GitHub_ link).

6. You can build the library as it would be done for deployment:

```sh
# Ubuntu
Expand Down
4 changes: 3 additions & 1 deletion ja/releases/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ Please continue reading for [upgrade instructions](#upgrade-guide).

### Common

- [Battery level estimation improvements](../config/battery.md) ([PX4-Autopilot#23205](https://github.com/PX4/PX4-Autopilot/pull/23205)).
- [Battery level estimation improvements](../config/battery.md). ([PX4-Autopilot#23205](https://github.com/PX4/PX4-Autopilot/pull/23205)).
- [Voltage-based estimation with load compensation](../config/battery.md#voltage-based-estimation-with-load-compensation) now uses a real-time estimate of the internal resistance of the battery to compensate voltage drops under load (with increased current), providing a better capacity estimate than with the raw measured voltage.
- Thrust-based load compensation has been removed (along with the `BATn_V_LOAD_DROP` parameters, where `n` is the battery number).
- The [Position (GNSS) loss failsafe](../config/safety.md#position-gnss-loss-failsafe) configurable delay (`COM_POS_FS_DELAY`) has been removed.
The failsafe will now trigger 1 second after position has been lost. ([PX4-Autopilot#24063](https://github.com/PX4/PX4-Autopilot/pull/24063)).
- [Log Encryption](../dev_log/log_encryption.md) now generates an encrypted log that contains the public-key-encrypted symmetric key that can be used to decrypt it, instead of putting the key into a separate file.
This makes log decryption much easier, as there is no need to download or identify a separate key file.
([PX4-Autopilot#24024](https://github.com/PX4/PX4-Autopilot/pull/24024)).
Expand Down
3 changes: 1 addition & 2 deletions ja/sim_gazebo_classic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ The camera also supports video streaming.
It can be used to test camera capture, in particular within survey missions.

The camera emits the [CAMERA_IMAGE_CAPTURED](https://mavlink.io/en/messages/common.html#CAMERA_IMAGE_CAPTURED) message every time an image is captured.
The captured images are saved to: `PX4-Autopilot/build/px4_sitl_default/tmp/frames/DSC_n.jpg` (where _n_ starts as 00000 and is iterated by one on each capture).

The captured images are saved to: `PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/simulator_mavlink/frames/DSC_n.jpg` (where _n_ starts as 00000 and is iterated by one on each capture).
To simulate a plane with this camera:

```sh
Expand Down
Loading
Loading