robotraconteur-mini-training-sim 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robotraconteur_mini_training_sim-0.1.0/.gitignore +365 -0
- robotraconteur_mini_training_sim-0.1.0/PKG-INFO +97 -0
- robotraconteur_mini_training_sim-0.1.0/README.md +77 -0
- robotraconteur_mini_training_sim-0.1.0/pyproject.toml +38 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/__init__.py +4 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/__main__.py +3 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/app.py +161 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/config/camera_info.yml +22 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/config/ur5e_gripper_info.yml +43 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/config/ur5e_robot_info.yml +159 -0
- robotraconteur_mini_training_sim-0.1.0/robotraconteur_mini_training_sim/ur5e_sim.py +836 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
|
|
2
|
+
#Windows
|
|
3
|
+
|
|
4
|
+
CMakeSettings.json
|
|
5
|
+
|
|
6
|
+
## Ignore Visual Studio temporary files, build results, and
|
|
7
|
+
## files generated by popular Visual Studio add-ons.
|
|
8
|
+
##
|
|
9
|
+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
|
10
|
+
|
|
11
|
+
# User-specific files
|
|
12
|
+
*.suo
|
|
13
|
+
*.user
|
|
14
|
+
*.userosscache
|
|
15
|
+
*.sln.docstates
|
|
16
|
+
|
|
17
|
+
# User-specific files (MonoDevelop/Xamarin Studio)
|
|
18
|
+
*.userprefs
|
|
19
|
+
|
|
20
|
+
# Build results
|
|
21
|
+
[Dd]ebug/
|
|
22
|
+
[Dd]ebugPublic/
|
|
23
|
+
[Rr]elease/
|
|
24
|
+
[Rr]eleases/
|
|
25
|
+
x64/
|
|
26
|
+
x86/
|
|
27
|
+
bld/
|
|
28
|
+
[Bb]in/
|
|
29
|
+
[Oo]bj/
|
|
30
|
+
[Ll]og/
|
|
31
|
+
|
|
32
|
+
# Visual Studio 2015 cache/options directory
|
|
33
|
+
.vs/
|
|
34
|
+
# Uncomment if you have tasks that create the project's static files in wwwroot
|
|
35
|
+
#wwwroot/
|
|
36
|
+
|
|
37
|
+
# MSTest test Results
|
|
38
|
+
[Tt]est[Rr]esult*/
|
|
39
|
+
[Bb]uild[Ll]og.*
|
|
40
|
+
|
|
41
|
+
# NUNIT
|
|
42
|
+
*.VisualState.xml
|
|
43
|
+
TestResult.xml
|
|
44
|
+
|
|
45
|
+
# Build Results of an ATL Project
|
|
46
|
+
[Dd]ebugPS/
|
|
47
|
+
[Rr]eleasePS/
|
|
48
|
+
dlldata.c
|
|
49
|
+
|
|
50
|
+
# Benchmark Results
|
|
51
|
+
BenchmarkDotNet.Artifacts/
|
|
52
|
+
|
|
53
|
+
# .NET Core
|
|
54
|
+
project.lock.json
|
|
55
|
+
project.fragment.lock.json
|
|
56
|
+
artifacts/
|
|
57
|
+
**/Properties/launchSettings.json
|
|
58
|
+
|
|
59
|
+
*_i.c
|
|
60
|
+
*_p.c
|
|
61
|
+
*_i.h
|
|
62
|
+
*.ilk
|
|
63
|
+
*.meta
|
|
64
|
+
*.obj
|
|
65
|
+
*.pch
|
|
66
|
+
*.pdb
|
|
67
|
+
*.pgc
|
|
68
|
+
*.pgd
|
|
69
|
+
*.rsp
|
|
70
|
+
*.sbr
|
|
71
|
+
*.tlb
|
|
72
|
+
*.tli
|
|
73
|
+
*.tlh
|
|
74
|
+
*.tmp
|
|
75
|
+
*.tmp_proj
|
|
76
|
+
*.log
|
|
77
|
+
*.vspscc
|
|
78
|
+
*.vssscc
|
|
79
|
+
.builds
|
|
80
|
+
*.pidb
|
|
81
|
+
*.svclog
|
|
82
|
+
*.scc
|
|
83
|
+
|
|
84
|
+
# Chutzpah Test files
|
|
85
|
+
_Chutzpah*
|
|
86
|
+
|
|
87
|
+
# Visual C++ cache files
|
|
88
|
+
ipch/
|
|
89
|
+
*.aps
|
|
90
|
+
*.ncb
|
|
91
|
+
*.opendb
|
|
92
|
+
*.opensdf
|
|
93
|
+
*.sdf
|
|
94
|
+
*.cachefile
|
|
95
|
+
*.VC.db
|
|
96
|
+
*.VC.VC.opendb
|
|
97
|
+
|
|
98
|
+
# Visual Studio profiler
|
|
99
|
+
*.psess
|
|
100
|
+
*.vsp
|
|
101
|
+
*.vspx
|
|
102
|
+
*.sap
|
|
103
|
+
|
|
104
|
+
# TFS 2012 Local Workspace
|
|
105
|
+
$tf/
|
|
106
|
+
|
|
107
|
+
# Guidance Automation Toolkit
|
|
108
|
+
*.gpState
|
|
109
|
+
|
|
110
|
+
# ReSharper is a .NET coding add-in
|
|
111
|
+
_ReSharper*/
|
|
112
|
+
*.[Rr]e[Ss]harper
|
|
113
|
+
*.DotSettings.user
|
|
114
|
+
|
|
115
|
+
# JustCode is a .NET coding add-in
|
|
116
|
+
.JustCode
|
|
117
|
+
|
|
118
|
+
# TeamCity is a build add-in
|
|
119
|
+
_TeamCity*
|
|
120
|
+
|
|
121
|
+
# DotCover is a Code Coverage Tool
|
|
122
|
+
*.dotCover
|
|
123
|
+
|
|
124
|
+
# AxoCover is a Code Coverage Tool
|
|
125
|
+
.axoCover/*
|
|
126
|
+
!.axoCover/settings.json
|
|
127
|
+
|
|
128
|
+
# Visual Studio code coverage results
|
|
129
|
+
*.coverage
|
|
130
|
+
*.coveragexml
|
|
131
|
+
|
|
132
|
+
# NCrunch
|
|
133
|
+
_NCrunch_*
|
|
134
|
+
.*crunch*.local.xml
|
|
135
|
+
nCrunchTemp_*
|
|
136
|
+
|
|
137
|
+
# MightyMoose
|
|
138
|
+
*.mm.*
|
|
139
|
+
AutoTest.Net/
|
|
140
|
+
|
|
141
|
+
# Web workbench (sass)
|
|
142
|
+
.sass-cache/
|
|
143
|
+
|
|
144
|
+
# Installshield output folder
|
|
145
|
+
[Ee]xpress/
|
|
146
|
+
|
|
147
|
+
# DocProject is a documentation generator add-in
|
|
148
|
+
DocProject/buildhelp/
|
|
149
|
+
DocProject/Help/*.HxT
|
|
150
|
+
DocProject/Help/*.HxC
|
|
151
|
+
DocProject/Help/*.hhc
|
|
152
|
+
DocProject/Help/*.hhk
|
|
153
|
+
DocProject/Help/*.hhp
|
|
154
|
+
DocProject/Help/Html2
|
|
155
|
+
DocProject/Help/html
|
|
156
|
+
|
|
157
|
+
# Click-Once directory
|
|
158
|
+
publish/
|
|
159
|
+
|
|
160
|
+
# Publish Web Output
|
|
161
|
+
*.[Pp]ublish.xml
|
|
162
|
+
*.azurePubxml
|
|
163
|
+
# Note: Comment the next line if you want to checkin your web deploy settings,
|
|
164
|
+
# but database connection strings (with potential passwords) will be unencrypted
|
|
165
|
+
*.pubxml
|
|
166
|
+
*.publishproj
|
|
167
|
+
|
|
168
|
+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
|
169
|
+
# checkin your Azure Web App publish settings, but sensitive information contained
|
|
170
|
+
# in these scripts will be unencrypted
|
|
171
|
+
PublishScripts/
|
|
172
|
+
|
|
173
|
+
# NuGet Packages
|
|
174
|
+
*.nupkg
|
|
175
|
+
# The packages folder can be ignored because of Package Restore
|
|
176
|
+
**/packages/*
|
|
177
|
+
# except build/, which is used as an MSBuild target.
|
|
178
|
+
!**/packages/build/
|
|
179
|
+
# Uncomment if necessary however generally it will be regenerated when needed
|
|
180
|
+
#!**/packages/repositories.config
|
|
181
|
+
# NuGet v3's project.json files produces more ignorable files
|
|
182
|
+
*.nuget.props
|
|
183
|
+
*.nuget.targets
|
|
184
|
+
|
|
185
|
+
# Microsoft Azure Build Output
|
|
186
|
+
csx/
|
|
187
|
+
*.build.csdef
|
|
188
|
+
|
|
189
|
+
# Microsoft Azure Emulator
|
|
190
|
+
ecf/
|
|
191
|
+
rcf/
|
|
192
|
+
|
|
193
|
+
# Windows Store app package directories and files
|
|
194
|
+
AppPackages/
|
|
195
|
+
BundleArtifacts/
|
|
196
|
+
Package.StoreAssociation.xml
|
|
197
|
+
_pkginfo.txt
|
|
198
|
+
*.appx
|
|
199
|
+
|
|
200
|
+
# Visual Studio cache files
|
|
201
|
+
# files ending in .cache can be ignored
|
|
202
|
+
*.[Cc]ache
|
|
203
|
+
# but keep track of directories ending in .cache
|
|
204
|
+
!*.[Cc]ache/
|
|
205
|
+
|
|
206
|
+
# Others
|
|
207
|
+
ClientBin/
|
|
208
|
+
~$*
|
|
209
|
+
*~
|
|
210
|
+
*.dbmdl
|
|
211
|
+
*.dbproj.schemaview
|
|
212
|
+
*.jfm
|
|
213
|
+
*.pfx
|
|
214
|
+
*.publishsettings
|
|
215
|
+
orleans.codegen.cs
|
|
216
|
+
|
|
217
|
+
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
|
218
|
+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
|
219
|
+
#bower_components/
|
|
220
|
+
|
|
221
|
+
# RIA/Silverlight projects
|
|
222
|
+
Generated_Code/
|
|
223
|
+
|
|
224
|
+
# Backup & report files from converting an old project file
|
|
225
|
+
# to a newer Visual Studio version. Backup files are not needed,
|
|
226
|
+
# because we have git ;-)
|
|
227
|
+
_UpgradeReport_Files/
|
|
228
|
+
Backup*/
|
|
229
|
+
UpgradeLog*.XML
|
|
230
|
+
UpgradeLog*.htm
|
|
231
|
+
|
|
232
|
+
# SQL Server files
|
|
233
|
+
*.mdf
|
|
234
|
+
*.ldf
|
|
235
|
+
*.ndf
|
|
236
|
+
|
|
237
|
+
# Business Intelligence projects
|
|
238
|
+
*.rdl.data
|
|
239
|
+
*.bim.layout
|
|
240
|
+
*.bim_*.settings
|
|
241
|
+
|
|
242
|
+
# Microsoft Fakes
|
|
243
|
+
FakesAssemblies/
|
|
244
|
+
|
|
245
|
+
# GhostDoc plugin setting file
|
|
246
|
+
*.GhostDoc.xml
|
|
247
|
+
|
|
248
|
+
# Node.js Tools for Visual Studio
|
|
249
|
+
.ntvs_analysis.dat
|
|
250
|
+
node_modules/
|
|
251
|
+
|
|
252
|
+
# Typescript v1 declaration files
|
|
253
|
+
typings/
|
|
254
|
+
|
|
255
|
+
# Visual Studio 6 build log
|
|
256
|
+
*.plg
|
|
257
|
+
|
|
258
|
+
# Visual Studio 6 workspace options file
|
|
259
|
+
*.opt
|
|
260
|
+
|
|
261
|
+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
|
262
|
+
*.vbw
|
|
263
|
+
|
|
264
|
+
# Visual Studio LightSwitch build output
|
|
265
|
+
**/*.HTMLClient/GeneratedArtifacts
|
|
266
|
+
**/*.DesktopClient/GeneratedArtifacts
|
|
267
|
+
**/*.DesktopClient/ModelManifest.xml
|
|
268
|
+
**/*.Server/GeneratedArtifacts
|
|
269
|
+
**/*.Server/ModelManifest.xml
|
|
270
|
+
_Pvt_Extensions
|
|
271
|
+
|
|
272
|
+
# Paket dependency manager
|
|
273
|
+
.paket/paket.exe
|
|
274
|
+
paket-files/
|
|
275
|
+
|
|
276
|
+
# FAKE - F# Make
|
|
277
|
+
.fake/
|
|
278
|
+
|
|
279
|
+
# JetBrains Rider
|
|
280
|
+
.idea/
|
|
281
|
+
*.sln.iml
|
|
282
|
+
|
|
283
|
+
# CodeRush
|
|
284
|
+
.cr/
|
|
285
|
+
|
|
286
|
+
# Python Tools for Visual Studio (PTVS)
|
|
287
|
+
__pycache__/
|
|
288
|
+
*.pyc
|
|
289
|
+
|
|
290
|
+
# Cake - Uncomment if you are using it
|
|
291
|
+
# tools/**
|
|
292
|
+
# !tools/packages.config
|
|
293
|
+
|
|
294
|
+
# Tabs Studio
|
|
295
|
+
*.tss
|
|
296
|
+
|
|
297
|
+
# Telerik's JustMock configuration file
|
|
298
|
+
*.jmconfig
|
|
299
|
+
|
|
300
|
+
# BizTalk build output
|
|
301
|
+
*.btp.cs
|
|
302
|
+
*.btm.cs
|
|
303
|
+
*.odx.cs
|
|
304
|
+
*.xsd.cs
|
|
305
|
+
|
|
306
|
+
#OSX
|
|
307
|
+
|
|
308
|
+
# General
|
|
309
|
+
*.DS_Store
|
|
310
|
+
.AppleDouble
|
|
311
|
+
.LSOverride
|
|
312
|
+
|
|
313
|
+
# Icon must end with two \r
|
|
314
|
+
Icon
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# Thumbnails
|
|
318
|
+
._*
|
|
319
|
+
|
|
320
|
+
# Files that might appear in the root of a volume
|
|
321
|
+
.DocumentRevisions-V100
|
|
322
|
+
.fseventsd
|
|
323
|
+
.Spotlight-V100
|
|
324
|
+
.TemporaryItems
|
|
325
|
+
.Trashes
|
|
326
|
+
.VolumeIcon.icns
|
|
327
|
+
.com.apple.timemachine.donotpresent
|
|
328
|
+
|
|
329
|
+
# Directories potentially created on remote AFP share
|
|
330
|
+
.AppleDB
|
|
331
|
+
.AppleDesktop
|
|
332
|
+
Network Trash Folder
|
|
333
|
+
Temporary Items
|
|
334
|
+
.apdisk
|
|
335
|
+
|
|
336
|
+
#Linux
|
|
337
|
+
|
|
338
|
+
*~
|
|
339
|
+
|
|
340
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
341
|
+
.fuse_hidden*
|
|
342
|
+
|
|
343
|
+
# KDE directory preferences
|
|
344
|
+
.directory
|
|
345
|
+
|
|
346
|
+
# Linux trash folder which might appear on any partition or disk
|
|
347
|
+
.Trash-*
|
|
348
|
+
|
|
349
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
350
|
+
.nfs*
|
|
351
|
+
|
|
352
|
+
#Extra directories to ignore
|
|
353
|
+
build/
|
|
354
|
+
generated_src/
|
|
355
|
+
generated_src
|
|
356
|
+
|
|
357
|
+
*.asv
|
|
358
|
+
|
|
359
|
+
vcpkg
|
|
360
|
+
build_xcframework
|
|
361
|
+
.cache
|
|
362
|
+
|
|
363
|
+
/setup.py
|
|
364
|
+
|
|
365
|
+
docker_build
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: robotraconteur-mini-training-sim
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Desktop simulator with a UR5e robot, vacuum gripper and camera using the Robot Raconteur standard types
|
|
5
|
+
Project-URL: Homepage, https://github.com/robotraconteur/robotraconteur/tree/master/examples/mini_training_sim
|
|
6
|
+
Author: Wason Technology, LLC
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Topic :: Scientific/Engineering
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Requires-Dist: general-robotics-toolbox
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: pillow
|
|
14
|
+
Requires-Dist: pyside6>=6.6
|
|
15
|
+
Requires-Dist: robotraconteur
|
|
16
|
+
Requires-Dist: robotraconteur-abstract-robot
|
|
17
|
+
Requires-Dist: robotraconteur-mini-training-sim-assets~=0.1
|
|
18
|
+
Requires-Dist: robotraconteurcompanion
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# Robot Raconteur Mini Training Simulator
|
|
22
|
+
|
|
23
|
+
A small desktop simulator with a Universal Robots UR5e robot, a vacuum gripper, three blocks on a table, and an
|
|
24
|
+
overhead camera. It is a lightweight stand-in for
|
|
25
|
+
[robotraconteur_training_sim](https://github.com/robotraconteur-contrib/robotraconteur_training_sim): it has no
|
|
26
|
+
physics engine and does not need Gazebo or ROS, but it uses the same Robot Raconteur standard types and the same
|
|
27
|
+
URLs, so the [standard devices examples](../standard_devices) work with it unchanged.
|
|
28
|
+
|
|
29
|
+
| Device | URL | Type |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| UR5e robot | `rr+tcp://localhost:52511?service=robot` | `com.robotraconteur.robotics.robot.Robot` |
|
|
32
|
+
| Vacuum gripper | `rr+tcp://localhost:52521?service=gripper` | `com.robotraconteur.robotics.tool.Tool` |
|
|
33
|
+
| Overhead camera | `rr+tcp://localhost:59823?service=camera` | `com.robotraconteur.imaging.Camera` |
|
|
34
|
+
|
|
35
|
+
The same work cell runs in the browser on the
|
|
36
|
+
[Robot Raconteur live demo](https://github.com/robotraconteur/robotraconteur_live_demo) UR5e page.
|
|
37
|
+
|
|
38
|
+
## Running
|
|
39
|
+
|
|
40
|
+
Python 3.9 or newer is required. The simulator is a Python package; install it in a virtual environment. From this
|
|
41
|
+
directory:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
python -m venv venv
|
|
45
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
46
|
+
pip install .
|
|
47
|
+
robotraconteur-mini-training-sim
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To use the simulator without cloning the Robot Raconteur repository, install it directly from GitHub:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pip install "robotraconteur-mini-training-sim @ git+https://github.com/robotraconteur/robotraconteur.git#subdirectory=examples/mini_training_sim"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`python -m robotraconteur_mini_training_sim` also starts the simulator. When changing the simulator, install it
|
|
57
|
+
with `pip install -e .` so the changes take effect without reinstalling.
|
|
58
|
+
|
|
59
|
+
A window shows the work cell. Drag to rotate the view, scroll to zoom. Hold the joint buttons to jog the robot,
|
|
60
|
+
and use the buttons below them to turn the gripper on and off, halt, enable, or reset the scene. Close the window or
|
|
61
|
+
press Ctrl+C in the terminal to stop the simulator.
|
|
62
|
+
|
|
63
|
+
Then run a client in another terminal, for example:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
cd ../standard_devices/robot/python
|
|
67
|
+
python robot_client_trajectory.py ur
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The vacuum gripper picks up a block when it is turned on (`close()`) with the suction cup touching the top of the
|
|
71
|
+
block, and drops it when it is turned off (`open()`). The camera images are rendered by the 3D view in the window,
|
|
72
|
+
so the camera only works while the window is open.
|
|
73
|
+
|
|
74
|
+
## Files
|
|
75
|
+
|
|
76
|
+
- [pyproject.toml](pyproject.toml) - The package definition and its dependencies
|
|
77
|
+
- [robotraconteur_mini_training_sim/app.py](robotraconteur_mini_training_sim/app.py) - The desktop application: a
|
|
78
|
+
Qt WebEngine window that shows the work cell and runs the simulation in the same process
|
|
79
|
+
- [robotraconteur_mini_training_sim/ur5e_sim.py](robotraconteur_mini_training_sim/ur5e_sim.py) - The simulated
|
|
80
|
+
robot (using [robotraconteur_abstract_robot](https://github.com/robotraconteur/robotraconteur_abstract_robot_python)),
|
|
81
|
+
vacuum gripper, and camera services
|
|
82
|
+
- [robotraconteur_mini_training_sim/config](robotraconteur_mini_training_sim/config) - The device info files for
|
|
83
|
+
the robot, gripper, and camera
|
|
84
|
+
|
|
85
|
+
The 3D view (a three.js page), the UR5e work cell model, and the work cell layout (`cell.json`) come from the
|
|
86
|
+
[robotraconteur-mini-training-sim-assets](https://pypi.org/project/robotraconteur-mini-training-sim-assets/)
|
|
87
|
+
package, which is installed as a dependency.
|
|
88
|
+
|
|
89
|
+
## Troubleshooting
|
|
90
|
+
|
|
91
|
+
- The 3D view needs WebGL. The simulator turns off Chromium's GPU blocklist so WebGL also works with software
|
|
92
|
+
rendering, for example in virtual machines. Errors from the 3D view are printed in the terminal with a `js:`
|
|
93
|
+
prefix.
|
|
94
|
+
- On Linux, when started from a terminal inside a Snap application such as the VS Code Snap, the window may crash
|
|
95
|
+
with `GLib-GIO-ERROR ... does not contain a key named 'antialiasing'`. The Snap's environment variables point Qt to
|
|
96
|
+
the wrong GNOME settings. Start the simulator from a regular terminal instead.
|
|
97
|
+
- In a container running as root, set `QTWEBENGINE_DISABLE_SANDBOX=1`.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Robot Raconteur Mini Training Simulator
|
|
2
|
+
|
|
3
|
+
A small desktop simulator with a Universal Robots UR5e robot, a vacuum gripper, three blocks on a table, and an
|
|
4
|
+
overhead camera. It is a lightweight stand-in for
|
|
5
|
+
[robotraconteur_training_sim](https://github.com/robotraconteur-contrib/robotraconteur_training_sim): it has no
|
|
6
|
+
physics engine and does not need Gazebo or ROS, but it uses the same Robot Raconteur standard types and the same
|
|
7
|
+
URLs, so the [standard devices examples](../standard_devices) work with it unchanged.
|
|
8
|
+
|
|
9
|
+
| Device | URL | Type |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| UR5e robot | `rr+tcp://localhost:52511?service=robot` | `com.robotraconteur.robotics.robot.Robot` |
|
|
12
|
+
| Vacuum gripper | `rr+tcp://localhost:52521?service=gripper` | `com.robotraconteur.robotics.tool.Tool` |
|
|
13
|
+
| Overhead camera | `rr+tcp://localhost:59823?service=camera` | `com.robotraconteur.imaging.Camera` |
|
|
14
|
+
|
|
15
|
+
The same work cell runs in the browser on the
|
|
16
|
+
[Robot Raconteur live demo](https://github.com/robotraconteur/robotraconteur_live_demo) UR5e page.
|
|
17
|
+
|
|
18
|
+
## Running
|
|
19
|
+
|
|
20
|
+
Python 3.9 or newer is required. The simulator is a Python package; install it in a virtual environment. From this
|
|
21
|
+
directory:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
python -m venv venv
|
|
25
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
26
|
+
pip install .
|
|
27
|
+
robotraconteur-mini-training-sim
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To use the simulator without cloning the Robot Raconteur repository, install it directly from GitHub:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pip install "robotraconteur-mini-training-sim @ git+https://github.com/robotraconteur/robotraconteur.git#subdirectory=examples/mini_training_sim"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`python -m robotraconteur_mini_training_sim` also starts the simulator. When changing the simulator, install it
|
|
37
|
+
with `pip install -e .` so the changes take effect without reinstalling.
|
|
38
|
+
|
|
39
|
+
A window shows the work cell. Drag to rotate the view, scroll to zoom. Hold the joint buttons to jog the robot,
|
|
40
|
+
and use the buttons below them to turn the gripper on and off, halt, enable, or reset the scene. Close the window or
|
|
41
|
+
press Ctrl+C in the terminal to stop the simulator.
|
|
42
|
+
|
|
43
|
+
Then run a client in another terminal, for example:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
cd ../standard_devices/robot/python
|
|
47
|
+
python robot_client_trajectory.py ur
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The vacuum gripper picks up a block when it is turned on (`close()`) with the suction cup touching the top of the
|
|
51
|
+
block, and drops it when it is turned off (`open()`). The camera images are rendered by the 3D view in the window,
|
|
52
|
+
so the camera only works while the window is open.
|
|
53
|
+
|
|
54
|
+
## Files
|
|
55
|
+
|
|
56
|
+
- [pyproject.toml](pyproject.toml) - The package definition and its dependencies
|
|
57
|
+
- [robotraconteur_mini_training_sim/app.py](robotraconteur_mini_training_sim/app.py) - The desktop application: a
|
|
58
|
+
Qt WebEngine window that shows the work cell and runs the simulation in the same process
|
|
59
|
+
- [robotraconteur_mini_training_sim/ur5e_sim.py](robotraconteur_mini_training_sim/ur5e_sim.py) - The simulated
|
|
60
|
+
robot (using [robotraconteur_abstract_robot](https://github.com/robotraconteur/robotraconteur_abstract_robot_python)),
|
|
61
|
+
vacuum gripper, and camera services
|
|
62
|
+
- [robotraconteur_mini_training_sim/config](robotraconteur_mini_training_sim/config) - The device info files for
|
|
63
|
+
the robot, gripper, and camera
|
|
64
|
+
|
|
65
|
+
The 3D view (a three.js page), the UR5e work cell model, and the work cell layout (`cell.json`) come from the
|
|
66
|
+
[robotraconteur-mini-training-sim-assets](https://pypi.org/project/robotraconteur-mini-training-sim-assets/)
|
|
67
|
+
package, which is installed as a dependency.
|
|
68
|
+
|
|
69
|
+
## Troubleshooting
|
|
70
|
+
|
|
71
|
+
- The 3D view needs WebGL. The simulator turns off Chromium's GPU blocklist so WebGL also works with software
|
|
72
|
+
rendering, for example in virtual machines. Errors from the 3D view are printed in the terminal with a `js:`
|
|
73
|
+
prefix.
|
|
74
|
+
- On Linux, when started from a terminal inside a Snap application such as the VS Code Snap, the window may crash
|
|
75
|
+
with `GLib-GIO-ERROR ... does not contain a key named 'antialiasing'`. The Snap's environment variables point Qt to
|
|
76
|
+
the wrong GNOME settings. Start the simulator from a regular terminal instead.
|
|
77
|
+
- In a container running as root, set `QTWEBENGINE_DISABLE_SANDBOX=1`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "robotraconteur-mini-training-sim"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Desktop simulator with a UR5e robot, vacuum gripper and camera using the Robot Raconteur standard types"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [{ name = "Wason Technology, LLC" }]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"robotraconteur",
|
|
15
|
+
"robotraconteurcompanion",
|
|
16
|
+
"robotraconteur-abstract-robot",
|
|
17
|
+
"general-robotics-toolbox",
|
|
18
|
+
"numpy",
|
|
19
|
+
"pillow",
|
|
20
|
+
"PySide6>=6.6",
|
|
21
|
+
"robotraconteur-mini-training-sim-assets~=0.1",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Topic :: Scientific/Engineering",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/robotraconteur/robotraconteur/tree/master/examples/mini_training_sim"
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
robotraconteur-mini-training-sim = "robotraconteur_mini_training_sim.app:main"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.version]
|
|
35
|
+
path = "robotraconteur_mini_training_sim/__init__.py"
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.wheel]
|
|
38
|
+
packages = ["robotraconteur_mini_training_sim"]
|