Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vda5050
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPos-public
vda5050
Commits
3c0fcd50
Commit
3c0fcd50
authored
3 years ago
by
Hailong Zhu
Browse files
Options
Downloads
Patches
Plain Diff
- added Window zoom factor
parent
de513dd3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
message_sender.py
+9
-8
9 additions, 8 deletions
message_sender.py
with
9 additions
and
8 deletions
message_sender.py
+
9
−
8
View file @
3c0fcd50
...
...
@@ -17,16 +17,18 @@ import tkinter
# MQTT setup
the_hostname
=
"
AGV_simulator
"
MQTT_SERVER
=
"
192.168.43.195
"
#
MQTT_SERVER = "broker.hivemq.com"
#
MQTT_SERVER = "192.168.43.195"
MQTT_SERVER
=
"
broker.hivemq.com
"
MQTT_PATH
=
"
VDA5050_AgvState
"
MQTT_PORT
=
1883
# vis_parameters
height
=
900
width
=
1000
zoom_factor
=
0.5
height
=
900
*
zoom_factor
width
=
1000
*
zoom_factor
canvas_factor
=
50
*
zoom_factor
color
=
[
"
green
"
,
"
blue
"
,
"
gray
"
,
"
violet
"
,
"
yellow
"
,
"
rot
"
]
vehicle_radius
=
20
vehicle_radius
=
20
*
zoom_factor
def
draw_veh
(
canvas
,
pos_x
,
pos_y
,
tag
,
color
):
...
...
@@ -49,7 +51,6 @@ def abs_move(self, tag, new_x, new_y):
tkinter
.
Canvas
.
abs_move
=
abs_move
def
visualization
(
canvas
,
tag
,
pos
,
color
):
height
=
900
canvas
.
abs_move
(
tag
,
pos
[
0
]
-
vehicle_radius
,
height
-
pos
[
1
]
-
vehicle_radius
)
canvas
.
update
()
...
...
@@ -163,13 +164,13 @@ root.title("simVis")
root
.
resizable
(
False
,
False
)
canvas
=
tkinter
.
Canvas
(
root
,
width
=
width
,
height
=
height
)
canvas
.
pack
()
canvas_factor
=
50
for
i
in
range
(
5
):
draw_veh
(
canvas
,
0
,
0
,
'
veh
'
+
str
(
i
+
1
),
color
[
i
])
actual_time
=
0
time_interval
=
0.0
2
time_interval
=
0.0
4
timeBegin
=
time
.
time
()
time_null
=
time
.
time
()
last_time_frame
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment