Failed to build WebGL using PickandPlaceProject
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start with tutorials/pick_and_place and reproduce the WebGL build using the reported Unity version. Inspect Assets/Scripts/SourceDestinationPublisher.cs, Assets/Scripts/TrajectoryPlanner.cs, and the ROS TCP Connector assembly definition; done means the project builds without the listed missing-type and assembly-reference errors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi ,
I follow the tutorials to set PickAndPlaceProject ,and build WebGL.
tutorials link: https://github.com/Unity-Technologies/Unity-Robotics-Hub/tree/main/tutorials/pick_and_place.
After set "Pick-and-Place Tutorial: Part 2", there is no error if play the scene, but failed to build WebGL.
Could you kindly help to check the error ?
Environment Details:
OS version: Ubuntu18.04
Unity Hub: 3.0.0-beta.7
Unity Editor Version: 2021.2.18f1c1
Target Platform:WebGl
Console errors:
Assets/Scripts/SourceDestinationPublisher.cs(5,38): error CS0234: The type or namespace name 'ROSGeometry' does not exist in the namespace 'Unity.Robotics.ROSTCPConnector' (are you missing an assembly reference?)
Assets/Scripts/SourceDestinationPublisher.cs(6,22): error CS0234: The type or namespace name 'UrdfImporter' does not exist in the namespace 'Unity.Robotics' (are you missing an assembly reference?)
Assets/Scripts/TrajectoryPlanner.cs(7,38): error CS0234: The type or namespace name 'ROSGeometry' does not exist in the namespace 'Unity.Robotics.ROSTCPConnector' (are you missing an assembly reference?)
ssets/Scripts/SourceDestinationPublisher.cs(29,5): error CS0246: The type or namespace name 'UrdfJointRevolute' could not be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/SourceDestinationPublisher.cs(32,5): error CS0246: The type or namespace name 'ROSConnection' could not be found (are you missing a using directive or an assembly reference?)
Assets/Scripts/TrajectoryPlanner.cs(42,5): error CS0246: The type or namespace name 'ROSConnection' could not be found (are you missing a using directive or an assembly reference?)
Error building Player because scripts had compiler errors
Build completed with a result of 'Failed' in 2 seconds (2200 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
UnityEditor.BuildPlayerWindow+BuildMethodException: 7 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002cc] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
I have tried two solution which got from github:
Solution1
Following link:https://github.com/Unity-Technologies/ROS-TCP-Connector/blob/main/ROSGeometry.md
Comment out "using Unity.Robotics.ROSTCPConnector",which could slove the above error about ROSGeometry/UrdfImporter/UrdfJointRevolute,But still have the error about ROSConnection
New Console errors:
Assets/Scripts/SourceDestinationPublisher.cs(32,5): error CS0246: The type or namespace name 'ROSConnection' could not be found (are you missing a using directive or an assembly reference?)
Error building Player because scripts have compile errors in the editor
Build completed with a result of 'Failed' in 1 seconds (829 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002cc] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Solution2
Following link:https://github.com/Unity-Technologies/Unity-Robotics-Hub/issues/215
In Unity's Project window, right click on the package ROS TCP Connector, and select open containing folder. This should open an OS folder called PackageCache.
Do the same for your project's Assets folder. This should open your project's root folder.
Within the root folder , open the Packages folder.
Move the folder com.robotics.ros-tcp-connector@ from your PackageCache window into the Packages folder. This will enable you to make and save changes to the package.
Now, in Unity, you should be able to go into the Packages/com.unity.robotics.ros-tcp-connector/Runtime/Unity.Robotics.ROSTCPConnector.asmdef file and tick the "WebGL" checkbox .
Then got an error info:
Unapplied import settings for 'Packages/com.unity.robotics.ros-tcp-connector/Runtime/Unity.Robotics.ROSConnector.asmdef'
Screenshot:
Ps. do tell me if more details is required. I am relatively new to Unity and posting issues on GitHub, thus I might have missed out on details/ not know the conventions very well. Thank you!
- Ngôn ngữ chính
- C#
- Star
- 2.6k
- Fork
- 473
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Unity-Technologies/Unity-Robotics-Hub
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
ROS2,ActionĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Is the project deprecated?Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
-
Force/Torque sensorĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Unity-Technologies/Unity-Robotics-Hub#433 · 1 bình luận ·
Tất cả issue của Unity-Technologies/Unity-Robotics-Hub
Issue tương tự
-
DXF with empty names failsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 3 ngày
-
bug python
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
Maintainer thường phản hồi trong vòng 13 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
juandresrodca/AdminForge#66 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
umbraco/Umbraco.Automate#612 ·
Maintainer thường phản hồi trong vòng 1 ngày