diff --git a/README.md b/README.md index 0ebf7b31..705db6bb 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ The following video by [Kinali](https://www.kinali.cz/en/) shows the use case (o [README](src/python/arcor2_dobot/README.md) | [CHANGELOG](src/python/arcor2_dobot/CHANGELOG.md) - - 2024-02-08: [1.1.0](https://github.com/robofit/arcor2/releases/tag/arcor2_dobot%2F1.1.0) ([docker](https://hub.docker.com/r/arcor2/arcor2_dobot/tags?page=1&ordering=last_updated&name=1.1.0), [pypi](https://pypi.org/project/arcor2-dobot/1.1.0/)). + - 2024-02-20: [1.1.1](https://github.com/robofit/arcor2/releases/tag/arcor2_dobot%2F1.1.1) ([docker](https://hub.docker.com/r/arcor2/arcor2_dobot/tags?page=1&ordering=last_updated&name=1.1.1), [pypi](https://pypi.org/project/arcor2-dobot/1.1.1/)). ### arcor2_execution diff --git a/compose-files/fit-demo/docker-compose.lab.yml b/compose-files/fit-demo/docker-compose.lab.yml index 141d9d88..7556452c 100644 --- a/compose-files/fit-demo/docker-compose.lab.yml +++ b/compose-files/fit-demo/docker-compose.lab.yml @@ -4,15 +4,15 @@ services: fit-demo-dobot-magician: environment: - ARCOR2_DOBOT_MOCK=false - - ARCOR2_DOBOT_BIAS_X=0.06 - - ARCOR2_DOBOT_BIAS_Z=-0.06 + - ARCOR2_DOBOT_BIAS_X=0.0597 + - ARCOR2_DOBOT_BIAS_Z=0.06 devices: - /dev/dobotMagician:/dev/dobot fit-demo-dobot-magician2: environment: - ARCOR2_DOBOT_MOCK=false - - ARCOR2_DOBOT_BIAS_X=0.06 - - ARCOR2_DOBOT_BIAS_Z=-0.06 + - ARCOR2_DOBOT_BIAS_X=0.0597 + - ARCOR2_DOBOT_BIAS_Z=0.06 devices: - /dev/dobotMagician2:/dev/dobot diff --git a/compose-files/fit-demo/docker-compose.yml b/compose-files/fit-demo/docker-compose.yml index a4202c44..e1ee43ae 100644 --- a/compose-files/fit-demo/docker-compose.yml +++ b/compose-files/fit-demo/docker-compose.yml @@ -98,7 +98,7 @@ services: - ./calibration.yaml:/root/calibration.yaml fit-demo-dobot-magician: - image: arcor2/arcor2_dobot:1.1.0 + image: arcor2/arcor2_dobot:1.1.1 container_name: fit-demo-dobot-magician depends_on: fit-demo-scene: @@ -114,7 +114,7 @@ services: - ARCOR2_DOBOT_MODEL=magician fit-demo-dobot-magician2: - image: arcor2/arcor2_dobot:1.1.0 + image: arcor2/arcor2_dobot:1.1.1 container_name: fit-demo-dobot-magician2 depends_on: fit-demo-scene: @@ -130,7 +130,7 @@ services: - ARCOR2_DOBOT_MODEL=magician fit-demo-dobot-m1: - image: arcor2/arcor2_dobot:1.1.0 + image: arcor2/arcor2_dobot:1.1.1 container_name: fit-demo-dobot-m1 depends_on: fit-demo-scene: diff --git a/src/docker/arcor2_dobot/BUILD b/src/docker/arcor2_dobot/BUILD index 3cd55d41..6d660afc 100644 --- a/src/docker/arcor2_dobot/BUILD +++ b/src/docker/arcor2_dobot/BUILD @@ -1 +1 @@ -docker_image(name="arcor2_dobot", repository="arcor2/arcor2_dobot", image_tags=["1.1.0"]) +docker_image(name="arcor2_dobot", repository="arcor2/arcor2_dobot", image_tags=["1.1.1"]) diff --git a/src/python/arcor2_dobot/CHANGELOG.md b/src/python/arcor2_dobot/CHANGELOG.md index adfc7ad8..963a3d0b 100644 --- a/src/python/arcor2_dobot/CHANGELOG.md +++ b/src/python/arcor2_dobot/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [1.1.1] - 2024-02-20 + +### Fixed + +- Biases are now converted to millimeters when sent to robot. + ## [1.1.0] - 2024-02-08 ### Changed diff --git a/src/python/arcor2_dobot/VERSION b/src/python/arcor2_dobot/VERSION index 1cc5f657..8cfbc905 100644 --- a/src/python/arcor2_dobot/VERSION +++ b/src/python/arcor2_dobot/VERSION @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.1.1 \ No newline at end of file diff --git a/src/python/arcor2_dobot/dobot.py b/src/python/arcor2_dobot/dobot.py index 908c5423..664da9c6 100644 --- a/src/python/arcor2_dobot/dobot.py +++ b/src/python/arcor2_dobot/dobot.py @@ -19,6 +19,10 @@ BIAS_Y = get_float("ARCOR2_DOBOT_BIAS_Y", 0.0) BIAS_Z = get_float("ARCOR2_DOBOT_BIAS_Z", 0.0) +assert BIAS_X > 0 +assert BIAS_Y > 0 +assert BIAS_Z > 0 + class DobotException(RobotException): pass @@ -52,7 +56,8 @@ def __init__(self, pose: Pose, port: str = "/dev/dobot", simulator: bool = False except DobotApiException as e: raise DobotApiException("Could not connect to the robot.") from e - self._dobot.set_end_effector_params(BIAS_X, BIAS_Y, BIAS_Z) + # bias has to be converted to millimeters + self._dobot.set_end_effector_params(BIAS_X * 1000, BIAS_Y * 1000, BIAS_Z * 1000) else: self._joint_values: list[Joint] = [] # has to be set to some initial value in derived classes diff --git a/src/python/arcor2_dobot/magician.py b/src/python/arcor2_dobot/magician.py index 58f1599b..2668edee 100644 --- a/src/python/arcor2_dobot/magician.py +++ b/src/python/arcor2_dobot/magician.py @@ -21,7 +21,7 @@ class DobotMagician(Dobot): link_2_length = 0.135 link_3_length = 0.147 link_4_length = BIAS_X - end_effector_length = -BIAS_Z + end_effector_length = BIAS_Z def __init__(self, pose: Pose, port: str = "/dev/dobot", simulator: bool = False) -> None: super(DobotMagician, self).__init__(pose, port, simulator)