Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
山
山西检定流水线数字孪生项目
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨泽宇
山西检定流水线数字孪生项目
Commits
72070423
Commit
72070423
authored
Mar 04, 2025
by
潘梓豪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@gitlab.sd-zeus.com:yangzeyu/SCVerificationPipelineDT.git
parents
07b62f01
cc1168d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
AGVDemoV2.cs
Assets/Scripts/Components/AGV/AGVDemoV2.cs
+18
-1
LoginManager.cs
Assets/Scripts/Components/AGV/LoginManager.cs
+2
-0
1_Main.unity
Assets/_Scenes/1_Main.unity
+2
-0
No files found.
Assets/Scripts/Components/AGV/AGVDemoV2.cs
View file @
72070423
...
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using
UnityEngine
;
using
Zeus.DTC
;
using
TMPro
;
using
Zeus.DTComponent
;
using
DTAGVManager
=
Zeus
.
DTC
.
DTAGVManager
;
public
class
AGVDemoV2
:
MonoBehaviour
{
...
...
@@ -19,10 +21,25 @@ public class AGVDemoV2 : MonoBehaviour
public
List
<
string
>
IsHasError
;
public
Animator
animator
;
IEnumerator
WaitForDataAndCreatePoints
()
{
while
(!
manager
.
IsDataLoaded
)
{
yield
return
null
;
}
AGVManager
.
_getOrCreateAGV
(
AGVName
).
transform
.
position
=
AGVManager
.
Map
.
TransformPointToWorld
(
new
Vector3
(
manager
.
position
.
x
,
manager
.
position
.
y
,
0
));
AGVManager
.
_getOrCreateAGV
(
AGVName
).
transform
.
eulerAngles
=
new
Vector3
(
0
,
AGVManager
.
Map
.
TransformAngle
(
manager
.
angle
),
0
);
StartCoroutine
(
UpdatePosition
());
}
private
void
Start
()
{
IsHasError
=
new
List
<
string
>();
StartCoroutine
(
UpdatePosition
());
StartCoroutine
(
WaitForDataAndCreatePoints
());
//StartCoroutine(UpdatePosition());
StartCoroutine
(
UpdateErrorReporting
());
// 递归查找名字为"机械臂"的子物体
...
...
Assets/Scripts/Components/AGV/LoginManager.cs
View file @
72070423
...
...
@@ -35,6 +35,7 @@ public class LoginManager : MonoBehaviour
private
InputFieldData
inputFieldData
;
private
JsonData
line_jd
=
new
JsonData
();
public
GameObject
_parent
;
public
bool
IsDataLoaded
=
false
;
private
void
Awake
()
{
...
...
@@ -108,6 +109,7 @@ public class LoginManager : MonoBehaviour
// 使用 JsonUtility 解析 JSON 数据
positionData
=
JsonUtility
.
FromJson
<
RobotPositionData
>(
responseJson
);
OnReceiveMsg
.
Invoke
(
positionData
,
"RobotPositionData"
);
IsDataLoaded
=
true
;
}
}
...
...
Assets/_Scenes/1_Main.unity
View file @
72070423
...
...
@@ -23312,6 +23312,7 @@ MonoBehaviour:
IsLine1: 0
path: URL.json
_parent: {fileID: 1692847786}
IsDataLoaded: 0
--- !u!114 &346303892
MonoBehaviour:
m_ObjectHideFlags: 0
...
...
@@ -32471,6 +32472,7 @@ MonoBehaviour:
IsLine1: 1
path: URL.json
_parent: {fileID: 396184908}
IsDataLoaded: 0
--- !u!114 &560685329
MonoBehaviour:
m_ObjectHideFlags: 0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment