Skip to content

Add Python Behavior examples and demo Objective to lab_sim#810

Draft
noah-wardlow wants to merge 1 commit into
mainfrom
feat/python-behaviors
Draft

Add Python Behavior examples and demo Objective to lab_sim#810
noah-wardlow wants to merge 1 commit into
mainfrom
feat/python-behaviors

Conversation

@noah-wardlow

Copy link
Copy Markdown

[written by AI]

needs: moveit_pro/#20781

Motivation

Paired with moveit_pro#20781, which adds support for writing Behaviors in Python with no compilation step. That PR ships the loader and the example Behaviors; this one turns them on in lab_sim so the feature is reachable from the demo config and exercised by an Objective.

Brief description

  • lab_sim/config/config.yaml: adds moveit_pro::behaviors::PythonBehaviorsLoader to behavior_loader_plugins. That one line is the whole opt-in.
  • lab_sim/python_behaviors/: the example Behaviors, copied from the ones moveit_pro#20781 installs under share/moveit_pro_python_behavior/examples/. A config package owning its own Behaviors is the layout the feature is built around, and keeping them here means they can be edited in place to try the feature out.
    • example_python_behaviors.pyScaleValue, SummarizeJointState, MakePose, CountTicks
    • example_ros_sdk_behavior.pyComputeToolPose, which reads the robot description over ROS and computes forward kinematics with the MoveIt Pro Python SDK
    • _behavior_math.py — a helper module, which demonstrates that a Behavior can import ordinary modules sitting next to it
  • lab_sim/objectives/python_behavior_demo.xml: an Objective wiring them together. It deliberately includes MakePoseIsPoseNearIdentity, a Python Behavior writing a geometry_msgs/msg/PoseStamped that a C++ Behavior consumes — the pairing that proves the message path rather than just exercising Python.
  • .gitignore: ignores __pycache__/ and *.py[cod]. Python Behaviors live in a config package's source tree, so running them writes bytecode caches there.

How it was tested

Ran locally against lab_sim in MuJoCo sim with the paired moveit_pro branch built into the container. Python Behavior Demo returns SUCCEEDED via /do_objective, and all five Behaviors appear in the Behavior catalog with their declared port types. Offsetting MakePose's z by 1.0 m makes IsPoseNearIdentity fail the Objective, confirming the pose values genuinely cross the language boundary.

Release notes

None

@github-actions

Copy link
Copy Markdown

⚠️ This PR modifies 1 file(s) that also exist in PickNikRobotics/moveit_pro_empty_ws.

Consider whether the change should land upstream in moveit_pro_empty_ws first so downstream forks pick it up on the next sync.

Overlapping files
  • .gitignore

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e8253864-621c-4745-8e83-fc94c9a1fa6d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

@noah-wardlow
noah-wardlow force-pushed the feat/python-behaviors branch from bca88cb to 6fb53ed Compare July 25, 2026 03:20
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

@noah-wardlow
noah-wardlow force-pushed the feat/python-behaviors branch from 6fb53ed to 9c3535e Compare July 25, 2026 03:36
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

@noah-wardlow
noah-wardlow force-pushed the feat/python-behaviors branch from 9c3535e to dc4e0df Compare July 25, 2026 03:41
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noah-wardlow
noah-wardlow force-pushed the feat/python-behaviors branch from dc4e0df to b46a8ff Compare July 25, 2026 03:44
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

  • lab_sim
    • jazzy: no report produced — see run logs
  • hangar_sim
    • jazzy: no report produced — see run logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant