UniversalRobots / Universal_Robots_Client_Library

A C++ library for accessing the UR interfaces that facilitate the use of UR robotic manipulators by external applications.
Apache License 2.0
117 stars 86 forks source link

[start_ursim] Always check ursim version for compatibility #203

Closed fmauch closed 3 months ago

fmauch commented 3 months ago

Before, the version was only checked when explicitly specified. This could lead to errors if there was a local image with tag "latest" which was actually an old version.

This closes #191

I reproduced #191 locally by explicitly pulling an old image and tagging it "latest". With this PR applied things look like this:

dev@localhost:~$ docker image ls | grep e-series
universalrobots/ursim_e-series                                                 5.12.2                 21974ae9b4ac   20 months ago   1.15GB
universalrobots/ursim_e-series                                                 latest                 21974ae9b4ac   20 months ago   1.15GB
dev@localhost:~$ ./start_ursim.sh -m ur20
Illegal version given. For e-series UR20 the software version must be greater or equal to 5.14.0. Given version: 5.12.2.
dev@localhost:~$ docker pull universalrobots/ursim_e-series
Using default tag: latest
latest: Pulling from universalrobots/ursim_e-series
167b8a53ca45: Already exists
14035475613e: Pull complete
d9d83244cebc: Pull complete
f80ffd108710: Pull complete
faf03c45f9d9: Pull complete
4e1236dddca5: Pull complete
8d6907461581: Pull complete
b4aa331968d9: Pull complete
24339535ff6c: Pull complete
20c07bbb1ad3: Pull complete
44adcd6e4d41: Pull complete
6ef5e085bb30: Pull complete
92837dd7f4d1: Pull complete
Digest: sha256:37193210ea0d7f93736a40de1f771198e9ab43863f469b18845d1361317e3e62
Status: Downloaded newer image for universalrobots/ursim_e-series:latest
docker.io/universalrobots/ursim_e-series:latest
dev@localhost:~$ docker image ls | grep e-series
universalrobots/ursim_e-series                                                 latest                 fe8de22e2ae6   5 weeks ago     2.22GB
universalrobots/ursim_e-series                                                 5.12.2                 21974ae9b4ac   20 months ago   1.15GB
dev@localhost:~$ ./start_ursim.sh -m ur20
ursim_net already exists
784bbecadbaea58aac102d99cc38367bc7359f7619506b63744916a8a72ec74b
Docker URSim is running

To access Polyscope, open the following URL in a web browser.
        http://192.168.56.101:6080/vnc.html

To exit, press CTRL+C