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

Fix for #7149 + proposed readme for docker on Windows + fixing typos #7150

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion cpp/open3d/geometry/TetraMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TetraMesh : public MeshBase {
TetraMesh &operator+=(const TetraMesh &mesh);
TetraMesh operator+(const TetraMesh &mesh) const;

/// \brief Function that removes duplicated verties, i.e., vertices that
/// \brief Function that removes duplicated vertices, i.e., vertices that
/// have identical coordinates.
TetraMesh &RemoveDuplicatedVertices();

Expand Down
6 changes: 3 additions & 3 deletions cpp/open3d/geometry/TriangleMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class TriangleMesh : public MeshBase {
/// needed.
TriangleMesh &ComputeAdjacencyList();

/// \brief Function that removes duplicated verties, i.e., vertices that
/// \brief Function that removes duplicated vertices, i.e., vertices that
/// have identical coordinates.
TriangleMesh &RemoveDuplicatedVertices();

Expand Down Expand Up @@ -560,15 +560,15 @@ class TriangleMesh : public MeshBase {
/// Factory function to create a tetrahedron mesh (trianglemeshfactory.cpp).
/// the mesh centroid will be at (0,0,0) and \p radius defines the
/// distance from the center to the mesh vertices.
/// \param radius defines the distance from centroid to mesh vetices.
/// \param radius defines the distance from centroid to mesh vertices.
/// \param create_uv_map add default UV map to the mesh.
static std::shared_ptr<TriangleMesh> CreateTetrahedron(
double radius = 1.0, bool create_uv_map = false);

/// Factory function to create an octahedron mesh (trianglemeshfactory.cpp).
/// the mesh centroid will be at (0,0,0) and \p radius defines the
/// distance from the center to the mesh vertices.
/// \param radius defines the distance from centroid to mesh vetices.
/// \param radius defines the distance from centroid to mesh vertices.
/// \param create_uv_map add default UV map to the mesh.
static std::shared_ptr<TriangleMesh> CreateOctahedron(
double radius = 1.0, bool create_uv_map = false);
Expand Down
2 changes: 1 addition & 1 deletion cpp/open3d/t/geometry/PointCloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ class PointCloud : public Geometry, public DrawableGeometry {
/// surface points from the first point cloud that have the second point
/// cloud points within the threshold radius, while Precision is the
/// percentage of points from the second point cloud that have the first
/// point cloud points within the threhold radius.
/// point cloud points within the threshold radius.

/// \f{eqnarray*}{
/// \text{Chamfer Distance: } d_{CD}(X,Y) &=& \frac{1}{|X|}\sum_{i \in X}
Expand Down
8 changes: 4 additions & 4 deletions cpp/open3d/t/geometry/TriangleMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class TriangleMesh : public Geometry, public DrawableGeometry {
/// Create a tetrahedron triangle mesh. The centroid of the mesh will be
/// placed at (0, 0, 0) and the vertices have a distance of radius to the
/// center.
/// \param radius defines the distance from centroid to mesh vetices.
/// \param radius defines the distance from centroid to mesh vertices.
/// \param float_dtype Float32 or Float64, used to store floating point
/// values, e.g. vertices, normals, colors.
/// \param int_dtype Int32 or Int64, used to store index values, e.g.
Expand All @@ -420,7 +420,7 @@ class TriangleMesh : public Geometry, public DrawableGeometry {
/// Create a octahedron triangle mesh. The centroid of the mesh will be
/// placed at (0, 0, 0) and the vertices have a distance of radius to the
/// center.
/// \param radius defines the distance from centroid to mesh vetices.
/// \param radius defines the distance from centroid to mesh vertices.
/// \param float_dtype Float32 or Float64, used to store floating point
/// values, e.g. vertices, normals, colors.
/// \param int_dtype Int32 or Int64, used to store index values, e.g.
Expand All @@ -435,7 +435,7 @@ class TriangleMesh : public Geometry, public DrawableGeometry {
/// Create a icosahedron triangle mesh. The centroid of the mesh will be
/// placed at (0, 0, 0) and the vertices have a distance of radius to the
/// center.
/// \param radius defines the distance from centroid to mesh vetices.
/// \param radius defines the distance from centroid to mesh vertices.
/// \param float_dtype Float32 or Float64, used to store floating point
/// values, e.g. vertices, normals, colors.
/// \param int_dtype Int32 or Int64, used to store index values, e.g.
Expand Down Expand Up @@ -1063,7 +1063,7 @@ class TriangleMesh : public Geometry, public DrawableGeometry {
/// percentage of surface points from the first mesh that have the second
/// mesh within the threshold radius, while Precision is the percentage of
/// sampled points from the second mesh that have the first mesh surface
/// within the threhold radius.
/// within the threshold radius.

/// \f{eqnarray*}{
/// \text{Chamfer Distance: } d_{CD}(X,Y) &=& \frac{1}{|X|}\sum_{i \in X}
Expand Down
8 changes: 4 additions & 4 deletions cpp/pybind/geometry/trianglemesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void pybind_trianglemesh_definitions(py::module &m) {
.def_static("create_mobius", &TriangleMesh::CreateMobius,
"Factory function to create a Mobius strip.",
"length_split"_a = 70, "width_split"_a = 15,
"twists"_a = 1, "raidus"_a = 1, "flatness"_a = 1,
"twists"_a = 1, "radius"_a = 1, "flatness"_a = 1,
"width"_a = 1, "scale"_a = 1)
.def_readwrite("vertices", &TriangleMesh::vertices_,
"``float64`` array of shape ``(num_vertices, 3)``, "
Expand Down Expand Up @@ -710,15 +710,15 @@ void pybind_trianglemesh_definitions(py::module &m) {
{"map_texture_to_each_face", "Map entire texture to each face."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_tetrahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"create_uv_map", "Add default uv map to the mesh."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_octahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"create_uv_map", "Add default uv map to the mesh."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_icosahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"create_uv_map", "Add default uv map to the mesh."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_sphere",
Expand Down
20 changes: 10 additions & 10 deletions cpp/pybind/t/geometry/pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ the partition id for each point.

Example:

This code computes parititions a point cloud such that each partition
This code computes partitions of a point cloud such that each partition
contains at most 20 points::

import open3d as o3d
Expand All @@ -780,16 +780,16 @@ the partition id for each point.

pointcloud.def("compute_metrics", &PointCloud::ComputeMetrics, "pcd2"_a,
"metrics"_a, "params"_a,
R"(Compute various metrics between two point clouds.
Currently, Chamfer distance, Hausdorff distance and F-Score `[Knapitsch2017] <../tutorial/reference.html#Knapitsch2017>`_ are supported.
The Chamfer distance is the sum of the mean distance to the nearest neighbor
R"(Compute various metrics between two point clouds.

Currently, Chamfer distance, Hausdorff distance and F-Score `[Knapitsch2017] <../tutorial/reference.html#Knapitsch2017>`_ are supported.
The Chamfer distance is the sum of the mean distance to the nearest neighbor
from the points of the first point cloud to the second point cloud. The F-Score
at a fixed threshold radius is the harmonic mean of the Precision and Recall.
Recall is the percentage of surface points from the first point cloud that have
the second point cloud points within the threshold radius, while Precision is
the percentage of points from the second point cloud that have the first point
cloud points within the threhold radius.
at a fixed threshold radius is the harmonic mean of the Precision and Recall.
Recall is the percentage of surface points from the first point cloud that have
the second point cloud points within the threshold radius, while Precision is
the percentage of points from the second point cloud that have the first point
cloud points within the threshold radius.

.. math::
:nowrap:
Expand Down
38 changes: 19 additions & 19 deletions cpp/pybind/t/geometry/trianglemesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ This example shows how to create a hemisphere from a sphere::
"device"_a = core::Device("CPU:0"))
.def_static("create_mobius", &TriangleMesh::CreateMobius,
"Create a Mobius strip.", "length_split"_a = 70,
"width_split"_a = 15, "twists"_a = 1, "raidus"_a = 1,
"width_split"_a = 15, "twists"_a = 1, "radius"_a = 1,
"flatness"_a = 1, "width"_a = 1, "scale"_a = 1,
"float_dtype"_a = core::Float32,
"int_dtype"_a = core::Int64,
Expand All @@ -432,19 +432,19 @@ This example shows how to create a hemisphere from a sphere::
{"device", "Device of the create sphere."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_tetrahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"float_dtype", "Float_dtype, Float32 or Float64."},
{"int_dtype", "Int_dtype, Int32 or Int64."},
{"device", "Device of the create tetrahedron."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_octahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"float_dtype", "Float_dtype, Float32 or Float64."},
{"int_dtype", "Int_dtype, Int32 or Int64."},
{"device", "Device of the create octahedron."}});
docstring::ClassMethodDocInject(
m, "TriangleMesh", "create_icosahedron",
{{"radius", "Distance from centroid to mesh vetices."},
{{"radius", "Distance from centroid to mesh vertices."},
{"float_dtype", "Float_dtype, Float32 or Float64."},
{"int_dtype", "Int_dtype, Int32 or Int64."},
{"device", "Device of the create octahedron."}});
Expand Down Expand Up @@ -546,7 +546,7 @@ This example shows how to create a hemisphere from a sphere::
Text as triangle mesh.

Example:
This shows how to simplifify the Stanford Bunny mesh::
This shows how to simplify the Stanford Bunny mesh::

import open3d as o3d

Expand Down Expand Up @@ -636,7 +636,7 @@ This function always uses the CPU device.
Simplified TriangleMesh.

Example:
This shows how to simplifify the Stanford Bunny mesh::
This shows how to simplify the Stanford Bunny mesh::

bunny = o3d.data.BunnyMesh()
mesh = o3d.t.geometry.TriangleMesh.from_legacy(o3d.io.read_triangle_mesh(bunny.path))
Expand All @@ -663,7 +663,7 @@ This function always uses the CPU device.
The mesh describing the union volume.

Example:
This copmutes the union of a sphere and a cube::
This computes the union of a sphere and a cube::

box = o3d.geometry.TriangleMesh.create_box()
box = o3d.t.geometry.TriangleMesh.from_legacy(box)
Expand Down Expand Up @@ -694,7 +694,7 @@ This function always uses the CPU device.
The mesh describing the intersection volume.

Example:
This copmutes the intersection of a sphere and a cube::
This computes the intersection of a sphere and a cube::

box = o3d.geometry.TriangleMesh.create_box()
box = o3d.t.geometry.TriangleMesh.from_legacy(box)
Expand Down Expand Up @@ -1147,18 +1147,18 @@ Example::

triangle_mesh.def("compute_metrics", &TriangleMesh::ComputeMetrics,
"mesh2"_a, "metrics"_a, "params"_a,
R"(Compute various metrics between two triangle meshes.
This uses ray casting for distance computations between a sampled point cloud
and a triangle mesh. Currently, Chamfer distance, Hausdorff distance and
F-Score `[Knapitsch2017] <../tutorial/reference.html#Knapitsch2017>`_ are supported.
R"(Compute various metrics between two triangle meshes.

This uses ray casting for distance computations between a sampled point cloud
and a triangle mesh. Currently, Chamfer distance, Hausdorff distance and
F-Score `[Knapitsch2017] <../tutorial/reference.html#Knapitsch2017>`_ are supported.
The Chamfer distance is the sum of the mean distance to the nearest neighbor from
the sampled surface points of the first mesh to the second mesh and vice versa.
The F-Score at the fixed threshold radius is the harmonic mean of the Precision
and Recall. Recall is the percentage of surface points from the first mesh that
have the second mesh within the threshold radius, while Precision is the
percentage of sampled points from the second mesh that have the first mesh
surface within the threhold radius.
the sampled surface points of the first mesh to the second mesh and vice versa.
The F-Score at the fixed threshold radius is the harmonic mean of the Precision
and Recall. Recall is the percentage of surface points from the first mesh that
have the second mesh within the threshold radius, while Precision is the
percentage of sampled points from the second mesh that have the first mesh
surface within the threshold radius.

.. math::
:nowrap:
Expand Down
8 changes: 4 additions & 4 deletions cpp/tests/core/FixedRadiusIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TEST(FixedRadiusIndex, SearchRadius) {
float radius = 0.1;
core::nns::FixedRadiusIndex index32(dataset_points, radius, core::Int32);

// if raidus == 0.1
// if radius == 0.1
core::Tensor indices, distances, neighbors_row_splits;
core::SizeVector shape{2};
gt_indices = core::Tensor::Init<int32_t>({1, 4}, device);
Expand All @@ -102,7 +102,7 @@ TEST(FixedRadiusIndex, SearchRadius) {
// Set up index.
core::nns::FixedRadiusIndex index64(dataset_points, radius, core::Int64);

// if raidus == 0.1
// if radius == 0.1
shape = core::SizeVector{2};
gt_indices = core::Tensor::Init<int64_t>({1, 4}, device);
gt_neighbors_row_splits = gt_neighbors_row_splits.To(core::Int64);
Expand Down Expand Up @@ -324,7 +324,7 @@ TEST(FixedRadiusIndex, SearchHybrid) {
int max_knn = 3;
core::nns::FixedRadiusIndex index32(dataset_points, radius, core::Int32);

// if raidus == 0.1
// if radius == 0.1
core::Tensor indices, distances, counts;
core::SizeVector shape{1, 3};
core::SizeVector shape_counts{1};
Expand All @@ -347,7 +347,7 @@ TEST(FixedRadiusIndex, SearchHybrid) {
// Set up index.
core::nns::FixedRadiusIndex index64(dataset_points, radius, core::Int64);

// if raidus == 0.1
// if radius == 0.1
gt_indices = core::Tensor::Init<int64_t>({{1, 4, -1}}, device);
gt_counts = core::Tensor::Init<int64_t>({2}, device);

Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/core/NearestNeighborSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ TEST_P(NNSPermuteDevices, FixedRadiusSearch) {
std::runtime_error);
}

// If raidus == 0.1.
// If radius == 0.1.
nns32.FixedRadiusIndex(0.1);
std::tuple<core::Tensor, core::Tensor, core::Tensor> result;
core::SizeVector shape{2};
Expand Down Expand Up @@ -223,7 +223,7 @@ TEST_P(NNSPermuteDevices, FixedRadiusSearch) {
std::runtime_error);
}

// If raidus == 0.1.
// If radius == 0.1.
nns64.FixedRadiusIndex(0.1);
gt_indices = core::Tensor::Init<int64_t>({1, 4}, device);
gt_distances = core::Tensor::Init<double>({0.00626358, 0.00747938}, device);
Expand Down
80 changes: 80 additions & 0 deletions docker/BUILD_DOCKER_WSL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Building Open3D on Windows with WSL and Docker Desktop

This guide walks you through installing Docker Desktop, setting up Windows Subsystem for Linux (WSL), configuring Docker integration with WSL, and building Open3D using a Docker script.

## Step 1: Install Docker Desktop

1. **Download and Install**: [Download Docker Desktop](https://www.docker.com/products/docker-desktop) and follow the on-screen prompts to install.
2. **Launch Docker Desktop**: After installation, open Docker Desktop to ensure it is running.

## Step 2: Install and Set Up WSL

1. **Enable WSL**: Open PowerShell as Administrator and install WSL:

```powershell
wsl --install
```

2. **Install a Linux Distribution** (e.g., Ubuntu-24.04):

```powershell
wsl --install -d Ubuntu-24.04
```

3. **Restart** your system if prompted.

## Step 3: Enable Docker Integration with WSL

1. **Open Docker Desktop**.
2. **Go to Settings** > **Resources** > **WSL Integration**.
3. **Enable Integration** for your Linux distribution (e.g., Ubuntu-24.04).
4. If necessary, **restart Docker Desktop** to apply the changes.

## Step 4: Configure Git to Use LF Endings

1. **Open a terminal** within WSL or your preferred Git environment.
2. **Navigate** to your Open3D repository:

```bash
cd /path/to/Open3D
```

3. **Set Git to use LF endings**:

```bash
git config core.autocrlf false
git config core.eol lf
```

4. **Reset your files** to ensure all use LF endings:

***Warning:*** The following commands will discard all uncommitted changes and reset files to the last committed state. If you have local modifications you wish to keep, commit or stash them before proceeding.

```bash
git rm --cached -r .
git reset --hard
```

## Step 5: Build Open3D in WSL

1. **Open your WSL terminal**.
2. **Navigate** to the Docker folder in the Open3D repository:

```bash
cd /path/to/Open3D/docker
```

3. **Disable PyTorch and TensorFlow ops** if not needed:

```bash
export BUILD_PYTORCH_OPS=OFF
export BUILD_TENSORFLOW_OPS=OFF
```

4. **Run the Docker build script**:

```bash
./docker_build.sh openblas-amd64-py312
```

If all goes well, you will have an Open3D Docker image ready to use. Make sure your Docker environment is running properly, and verify that the build completed successfully by checking logs for errors or warnings.
2 changes: 1 addition & 1 deletion examples/cpp/TrimMeshBasedOnPointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) {
kdtree.SetGeometry(*pcd);
std::vector<bool> remove_vertex_mask(mesh->vertices_.size(), false);
utility::ProgressBar progress_bar(mesh->vertices_.size(),
"Prune vetices: ");
"Prune vertices: ");
#pragma omp parallel for schedule(static) num_threads(utility::EstimateMaxThreads())
for (int i = 0; i < (int)mesh->vertices_.size(); i++) {
std::vector<int> indices(1);
Expand Down
2 changes: 1 addition & 1 deletion examples/python/visualization/online_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def __init__(self, vfov=60, max_pcd_vertices=1 << 20, **callbacks):

Args:
vfov (float): Vertical field of view for the 3D scene.
max_pcd_vertices (int): Maximum point clud verties for which memory
max_pcd_vertices (int): Maximum point cloud vertices for which memory
is allocated.
callbacks (dict of kwargs): Callbacks provided by the controller
for various operations.
Expand Down
Loading