From b5e37ff2379304ef8e71d3ab7d919aa392c030d2 Mon Sep 17 00:00:00 2001 From: ZdenekM Date: Mon, 30 Sep 2024 12:23:51 +0200 Subject: [PATCH] fix(arcor2_ur) velocity parameter was not shown --- compose-files/ur-demo/docker-compose.lab.yml | 6 ++++++ compose-files/ur-demo/docker-compose.yml | 8 ++++++-- src/docker/arcor2_ur/BUILD | 2 +- src/docker/arcor2_ur_ot/BUILD | 2 +- src/python/arcor2_ur/CHANGELOG.md | 7 +++++++ src/python/arcor2_ur/VERSION | 2 +- src/python/arcor2_ur/scripts/ur.py | 10 ++++++++-- 7 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 compose-files/ur-demo/docker-compose.lab.yml diff --git a/compose-files/ur-demo/docker-compose.lab.yml b/compose-files/ur-demo/docker-compose.lab.yml new file mode 100644 index 000000000..35d6ad92a --- /dev/null +++ b/compose-files/ur-demo/docker-compose.lab.yml @@ -0,0 +1,6 @@ +services: + ur-demo-robot-api: + ports: + - "50002:50002" # robot connects to this port + environment: + - ROBOT_CONTAINER_NAME=ur-20245500974 \ No newline at end of file diff --git a/compose-files/ur-demo/docker-compose.yml b/compose-files/ur-demo/docker-compose.yml index 872d616c8..83ccb4dc1 100644 --- a/compose-files/ur-demo/docker-compose.yml +++ b/compose-files/ur-demo/docker-compose.yml @@ -12,11 +12,14 @@ services: volumes: - ursim-gui-cache:/ursim/GUI - urcap-build-cache:/ursim/.urcaps + - ursim-programs:/ursim/programs ur-demo-robot-api: - image: arcor2/arcor2_ur:1.2.0 + image: arcor2/arcor2_ur:1.2.1 container_name: ur-demo-robot-api ports: - "5012:5012" +# environment: +# - ARCOR2_UR_DEBUG=1 networks: # TODO use network_mode: "host" for the real robot - ur-demo-network restart: always # the service tends to crash when calling PUT /state/stop @@ -159,7 +162,7 @@ services: - ur-demo-asset ur-demo-upload-object-types: - image: arcor2/arcor2_ur_ot:1.2.0 + image: arcor2/arcor2_ur_ot:1.2.1 container_name: "ur-demo-upload-object-types" depends_on: ur-demo-project: @@ -189,6 +192,7 @@ services: volumes: ursim-gui-cache: urcap-build-cache: + ursim-programs: ur-demo-asset: ur-demo-execution: diff --git a/src/docker/arcor2_ur/BUILD b/src/docker/arcor2_ur/BUILD index 65093f07a..cc7cd9fea 100644 --- a/src/docker/arcor2_ur/BUILD +++ b/src/docker/arcor2_ur/BUILD @@ -1,2 +1,2 @@ shell_source(name="start.sh", source="start.sh") -docker_image(name="arcor2_ur", repository="arcor2/arcor2_ur", dependencies=[":start.sh", "build-support:install_ur_dependencies.sh"], image_tags=["1.2.0"]) +docker_image(name="arcor2_ur", repository="arcor2/arcor2_ur", dependencies=[":start.sh", "build-support:install_ur_dependencies.sh"], image_tags=["1.2.1"]) diff --git a/src/docker/arcor2_ur_ot/BUILD b/src/docker/arcor2_ur_ot/BUILD index 25e4d9937..7d190288e 100644 --- a/src/docker/arcor2_ur_ot/BUILD +++ b/src/docker/arcor2_ur_ot/BUILD @@ -1 +1 @@ -docker_image(name="arcor2_ur_ot", repository="arcor2/arcor2_ur_ot", image_tags=["1.2.0"]) +docker_image(name="arcor2_ur_ot", repository="arcor2/arcor2_ur_ot", image_tags=["1.2.1"]) diff --git a/src/python/arcor2_ur/CHANGELOG.md b/src/python/arcor2_ur/CHANGELOG.md index f9bd1bd8c..7e1a62de0 100644 --- a/src/python/arcor2_ur/CHANGELOG.md +++ b/src/python/arcor2_ur/CHANGELOG.md @@ -2,6 +2,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [1.2.1] - 2024-09-30 + +### Fixed + +- ROS logger was not set to debug when requested by argument/environment variable (however, it has no effect on moveitpy). +- Parameter `velocity` not shown in Swagger UI. + ## [1.2.0] - 2024-09-27 ### Changed diff --git a/src/python/arcor2_ur/VERSION b/src/python/arcor2_ur/VERSION index 867e52437..cb174d58a 100644 --- a/src/python/arcor2_ur/VERSION +++ b/src/python/arcor2_ur/VERSION @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file diff --git a/src/python/arcor2_ur/scripts/ur.py b/src/python/arcor2_ur/scripts/ur.py index a40e6248a..4b42be7ca 100644 --- a/src/python/arcor2_ur/scripts/ur.py +++ b/src/python/arcor2_ur/scripts/ur.py @@ -87,7 +87,10 @@ def plan_and_execute( class MyNode(Node): def __init__(self, interact_with_dashboard=True) -> None: - super().__init__("my_node") + super().__init__("ur_api_node", enable_logger_service=True) + if globs.debug: + # TODO makes no difference for moveitpy :-/ + rclpy.logging.set_logger_level("ur_api_node", rclpy.logging.LoggingSeverity.DEBUG) self.buffer = Buffer() self.listener = TransformListener(self.buffer, self) @@ -241,6 +244,7 @@ def __post_init__(self) -> None: @dataclass class Globs: + debug = False state: State | None = None # lock: threading.Lock = threading.Lock() @@ -571,7 +575,7 @@ def put_eef_pose() -> RespT: format: float minimum: 0 maximum: 100 - parameters: + default: 50 - name: payload in: query schema: @@ -579,6 +583,7 @@ def put_eef_pose() -> RespT: format: float minimum: 0 maximum: 5 + default: 0 requestBody: content: application/json: @@ -648,6 +653,7 @@ def main() -> None: args = parser.parse_args() logger.setLevel(args.debug) + globs.debug = args.debug # TODO there will be a ROS-specific scene service # if not args.swagger: