From 5f937207f83fd0354e4721ac5f962129db12effc Mon Sep 17 00:00:00 2001 From: baradejoo Date: Mon, 23 Nov 2026 19:50:09 +0100 Subject: [PATCH 1/6] Add pymoveit2 Select pymoveit2 (https://github.com/AndrejOrsula/pymoveit2), a Python interface for MoveIt 2 on top of ROS 2 actions and services. It is released in humble, jazzy, lyrical and rolling, is pure Python, and all of its dependencies are already built. --- shared/vinca.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/vinca.yaml b/shared/vinca.yaml index c28323b4c..6734d7334 100644 --- a/shared/vinca.yaml +++ b/shared/vinca.yaml @@ -254,6 +254,7 @@ packages_select_by_deps: - py_trees_ros_interfaces - py_trees_ros_tutorials - py_trees_ros_viewer + - pymoveit2 - radar_msgs - random_numbers - rclc From 763e45ea1af7b9ff9d7933895ea8cfe901606b0f Mon Sep 17 00:00:00 2001 From: baradejoo Date: Mon, 23 Nov 2026 20:05:49 +0100 Subject: [PATCH 2/6] pymoveit2: import and smoke test The smoke test creates the arm and gripper interfaces of the Panda preset on a node, without a running MoveIt, and checks that the arm interface receives a JointState published on the same node. --- shared/tests/ros2-pymoveit2.yaml | 13 +++ .../ros2-pymoveit2/pymoveit2_smoke_test.py | 79 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 shared/tests/ros2-pymoveit2.yaml create mode 100644 shared/tests/ros2-pymoveit2/pymoveit2_smoke_test.py diff --git a/shared/tests/ros2-pymoveit2.yaml b/shared/tests/ros2-pymoveit2.yaml new file mode 100644 index 000000000..398bd4734 --- /dev/null +++ b/shared/tests/ros2-pymoveit2.yaml @@ -0,0 +1,13 @@ +tests: + # The package and its robot presets import (rclpy and the message packages load). + - python: + imports: + - pymoveit2 + - pymoveit2.robots.panda + pip_check: false + # Smoke test without a running MoveIt: the arm and gripper interfaces of the Panda preset are created on a node (action and service clients for move_group), and the arm interface receives a JointState published on the same node. + - script: + - python pymoveit2_smoke_test.py + files: + recipe: + - pymoveit2_smoke_test.py diff --git a/shared/tests/ros2-pymoveit2/pymoveit2_smoke_test.py b/shared/tests/ros2-pymoveit2/pymoveit2_smoke_test.py new file mode 100644 index 000000000..41f02134c --- /dev/null +++ b/shared/tests/ros2-pymoveit2/pymoveit2_smoke_test.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Smoke test for pymoveit2, without a running MoveIt. + +Creates the arm and gripper interfaces for the Panda preset on one node (this loads +rclpy, the RMW and the type support of every message, service and action package +pymoveit2 uses), publishes a JointState on the same node and checks that the arm +interface receives it, then destroys everything. +""" + +import sys +import time + +import rclpy +from rclpy.executors import SingleThreadedExecutor +from sensor_msgs.msg import JointState + +from pymoveit2 import MoveIt2, MoveIt2Gripper +from pymoveit2.robots import panda + +TIMEOUT_SEC = 20.0 + + +def main() -> int: + rclpy.init() + node = rclpy.create_node("pymoveit2_smoke_test") + executor = SingleThreadedExecutor() + executor.add_node(node) + + joint_names = panda.joint_names() + moveit2 = MoveIt2( + node=node, + joint_names=joint_names, + base_link_name=panda.base_link_name(), + end_effector_name=panda.end_effector_name(), + group_name=panda.MOVE_GROUP_ARM, + ) + gripper = MoveIt2Gripper( + node=node, + gripper_joint_names=panda.gripper_joint_names(), + open_gripper_joint_positions=panda.OPEN_GRIPPER_JOINT_POSITIONS, + closed_gripper_joint_positions=panda.CLOSED_GRIPPER_JOINT_POSITIONS, + gripper_group_name=panda.MOVE_GROUP_GRIPPER, + ) + + assert moveit2.joint_names == joint_names, moveit2.joint_names + assert moveit2.joint_state is None, "joint state before anything was published" + + # Same node, so the same DDS participant: no network discovery is involved. + publisher = node.create_publisher(JointState, "joint_states", 1) + msg = JointState() + msg.name = joint_names + msg.position = [0.1 * i for i in range(len(joint_names))] + + deadline = time.monotonic() + TIMEOUT_SEC + while moveit2.joint_state is None and time.monotonic() < deadline: + msg.header.stamp = node.get_clock().now().to_msg() + publisher.publish(msg) + executor.spin_once(timeout_sec=0.1) + + received = moveit2.joint_state + ok = received is not None and list(received.name) == joint_names + if ok: + print("pymoveit2 smoke test: joint state received:", list(received.position)) + else: + print( + f"pymoveit2 smoke test: no joint state within {TIMEOUT_SEC} s", + file=sys.stderr, + ) + + gripper.destroy() + moveit2.destroy() + executor.shutdown() + node.destroy_node() + rclpy.shutdown() + return 0 if ok else 1 + + +if __name__ == "__main__": + sys.exit(main()) From eb3ec4fedd215e55c0214724ef991d3be229fe82 Mon Sep 17 00:00:00 2001 From: baradejoo Date: Mon, 23 Nov 2026 20:06:58 +0100 Subject: [PATCH 3/6] ci: evict pymoveit2 from the PR build cache The package got tests without a new build number; the cached builds of the first run carry none. Reset before merging. --- distros/humble/ci.yaml | 3 ++- distros/jazzy/ci.yaml | 3 ++- distros/lyrical/ci.yaml | 3 ++- distros/rolling/ci.yaml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/distros/humble/ci.yaml b/distros/humble/ci.yaml index 63d3a18eb..f3dd8b02a 100644 --- a/distros/humble/ci.yaml +++ b/distros/humble/ci.yaml @@ -23,4 +23,5 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: [] +evict_cache: + - pymoveit2 diff --git a/distros/jazzy/ci.yaml b/distros/jazzy/ci.yaml index 63d3a18eb..f3dd8b02a 100644 --- a/distros/jazzy/ci.yaml +++ b/distros/jazzy/ci.yaml @@ -23,4 +23,5 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: [] +evict_cache: + - pymoveit2 diff --git a/distros/lyrical/ci.yaml b/distros/lyrical/ci.yaml index 63d3a18eb..f3dd8b02a 100644 --- a/distros/lyrical/ci.yaml +++ b/distros/lyrical/ci.yaml @@ -23,4 +23,5 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: [] +evict_cache: + - pymoveit2 diff --git a/distros/rolling/ci.yaml b/distros/rolling/ci.yaml index 63d3a18eb..f3dd8b02a 100644 --- a/distros/rolling/ci.yaml +++ b/distros/rolling/ci.yaml @@ -23,4 +23,5 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: [] +evict_cache: + - pymoveit2 From f6b5e1830104729a35d0dd3e7d2b423bea81deea Mon Sep 17 00:00:00 2001 From: baradejoo Date: Wed, 25 Nov 2026 17:40:37 +0100 Subject: [PATCH 4/6] Re-run CI with yaml 0.2.7 From eba0f4c21eaef20a52de836dee2a78ff1c524de8 Mon Sep 17 00:00:00 2001 From: baradejoo Date: Wed, 25 Nov 2026 19:07:37 +0100 Subject: [PATCH 5/6] pymoveit2 smoke test: keep DDS on the loopback interface --- shared/tests/ros2-pymoveit2.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/tests/ros2-pymoveit2.yaml b/shared/tests/ros2-pymoveit2.yaml index 398bd4734..2b8568881 100644 --- a/shared/tests/ros2-pymoveit2.yaml +++ b/shared/tests/ros2-pymoveit2.yaml @@ -7,7 +7,11 @@ tests: pip_check: false # Smoke test without a running MoveIt: the arm and gripper interfaces of the Panda preset are created on a node (action and service clients for move_group), and the arm interface receives a JointState published on the same node. - script: - - python pymoveit2_smoke_test.py + env: + ROS_LOCALHOST_ONLY: "1" + ROS_AUTOMATIC_DISCOVERY_RANGE: LOCALHOST + content: + - python pymoveit2_smoke_test.py files: recipe: - pymoveit2_smoke_test.py From d1d6b3c7f96aa08dd9e01f58f536f95655df336c Mon Sep 17 00:00:00 2001 From: baradejoo Date: Wed, 25 Nov 2026 19:48:47 +0100 Subject: [PATCH 6/6] ci: reset evict_cache --- distros/humble/ci.yaml | 3 +-- distros/jazzy/ci.yaml | 3 +-- distros/lyrical/ci.yaml | 3 +-- distros/rolling/ci.yaml | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/distros/humble/ci.yaml b/distros/humble/ci.yaml index f3dd8b02a..63d3a18eb 100644 --- a/distros/humble/ci.yaml +++ b/distros/humble/ci.yaml @@ -23,5 +23,4 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: - - pymoveit2 +evict_cache: [] diff --git a/distros/jazzy/ci.yaml b/distros/jazzy/ci.yaml index f3dd8b02a..63d3a18eb 100644 --- a/distros/jazzy/ci.yaml +++ b/distros/jazzy/ci.yaml @@ -23,5 +23,4 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: - - pymoveit2 +evict_cache: [] diff --git a/distros/lyrical/ci.yaml b/distros/lyrical/ci.yaml index f3dd8b02a..63d3a18eb 100644 --- a/distros/lyrical/ci.yaml +++ b/distros/lyrical/ci.yaml @@ -23,5 +23,4 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: - - pymoveit2 +evict_cache: [] diff --git a/distros/rolling/ci.yaml b/distros/rolling/ci.yaml index f3dd8b02a..63d3a18eb 100644 --- a/distros/rolling/ci.yaml +++ b/distros/rolling/ci.yaml @@ -23,5 +23,4 @@ full_rebuild: false # # Remember that dependents are not rebuilt automatically: evict them as well if # they must pick up the change. -evict_cache: - - pymoveit2 +evict_cache: []