Skip to content

Bump 0.8.0#84

Merged
robotpilot merged 97 commits intojazzyfrom
main
Jan 26, 2026
Merged

Bump 0.8.0#84
robotpilot merged 97 commits intojazzyfrom
main

Conversation

@Seongoo
Copy link
Member

@Seongoo Seongoo commented Jan 26, 2026

No description provided.

- Create physical_ai_bt ROS2 package with generic BT framework
- Implement base classes: BTNode, BaseAction, BaseControl, BaseDecorator
- Add control nodes: Sequence and Fallback
- Implement InferenceAction: monitors AI Server status and manages VLA inference
  - Detects inference start from AI Server via /task/status topic
  - Maintains inference for configurable duration (default 5s)
  - Sends FINISH command to properly terminate inference
  - Adds 0.5s delay after stop to ensure AI Server cleanup
- Implement RuleAction: moves robot to fixed target positions
  - Publishes to /leader/joint_trajectory
  - Monitors /follower/joint_states for position feedback
  - Configurable position threshold and timeout
- Add tree_builder for constructing BT structures
- Create generic bt_node executor with config integration
- Add launch file with omx_f_config.yaml parameter loading
- Integrate with physical_ai_server's joint_order configuration

Architecture: Sequential execution (Inference -> Rule-based movement)
- AI Server starts inference independently
- BT detects and monitors inference state
- After timeout, BT stops inference and executes rule-based control

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Remove unused parameters from InferenceAction:
  - policy_path (not used in current implementation)
  - task_instruction (not used in current implementation)
- Remove excessive debug logging:
  - Status callback no longer logs every tick
  - Removed initialization logs
  - Removed periodic waiting logs
- Make TreeBuilder more flexible:
  - Accept current_positions and target_positions as parameters
  - Remove hardcoded position values
- Update BT Node parameters:
  - Add current_positions and target_positions parameters
  - Remove policy_path and task_instruction parameters
- Update launch file:
  - Remove unused launch arguments
  - Simplify parameter passing
- Update XML tree definition:
  - Remove unused input ports from InferenceAction
  - Reflect actual implementation parameters

Result: Cleaner, more maintainable code with only necessary functionality
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Major fixes:
- Fix joint_states topic name: /follower/joint_states -> /joint_states
- Add joint order reordering logic to handle config mismatch
  - joint_states publishes: [gripper_joint_1, joint1-5]
  - Config expects: [joint1-5, gripper_joint_1]
  - Automatically reorders positions to match config order
- Increase AI Server cleanup wait time: 0.5s -> 2.0s
  - Prevents trajectory command conflicts after inference stops

Code cleanup:
- Remove excessive debug logging in InferenceAction
  - Remove "Inference duration reached" logs
  - Remove "Waiting for AI Server" logs
  - Remove "AI Server cleanup completed" logs
- Remove verbose logging in RuleAction
  - Remove "Sent fixed trajectory command" log
  - Remove "Published trajectory to joints" log
  - Remove position comparison logs during execution
  - Keep only essential logs (target reached, timeout, errors)
- Simplify trajectory publishing logic
- Add error logging guard to prevent log spam

Result: Clean, production-ready code with successful BT execution
- Inference: 5s monitoring -> FINISH command -> 2s cleanup
- Rule-based: 2s trajectory execution -> SUCCESS

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add xml_loader.py for Groot-compatible XML tree parsing
- Replace programmatic tree_builder.py with XML-driven approach
- Implement runtime parameter injection via placeholders ({param_name})
- Add dynamic robot config loading based on robot_type
- Support multiple robot types (omx_f, ffw_bg2_rev4, etc.)
- Add bt_node executable entry point
- Update launch file with OpaqueFunction for dynamic config path
- XML tree structure editable in Groot, runtime params via ROS2

Features:
- XML placeholders: {inference_timeout}, {current_positions}, etc.
- Auto-load {robot_type}_config.yaml
- Fallback to omx_f_config.yaml if not found
- joint_names injected from config at runtime
- Launch params override XML defaults

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add ControlActionPublish service to pause/resume AI Server action publishing
- Implement PauseActionPublishAction and ResumeActionPublishAction BT nodes
- Add execution_active flag to InferenceAction to prevent stale callback processing
- Clean up unused code and debug logs
- Fix InferenceAction timing issues with proper state management

This allows BT to control when AI Server publishes actions, enabling
seamless integration of rule-based movements without topic conflicts.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add omx_test.xml and omx_test_2.xml for testing BT workflows
- Update bt_node launch file configuration
- Update robot_control_tree.xml

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Update omx_test.xml with proper Pause/Resume pattern
- Remove omx_test_2.xml and robot_control_tree.xml (obsolete)
- Update bt_node launch configuration

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Removed joint_names input port definition from TreeNodesModel
- Removed joint_names="" attributes from all RuleAction instances
- joint_names is automatically loaded from physical_ai_server config
- Cleaner XML for Groot2 tree design
- Changed default tree_xml back to omx_test.xml in launch file

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…ibute errors

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…e_from_start to zero, only publish valid start/goal points, match inference topic structure. Also update goal positions and swerve rotation logic.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…ig loading clarified, indentation and parameter handling improved

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…er; now runtime_params is not used and only managed in XMLTreeLoader if needed.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…on, improved Twist publishing, and elapsed time logging

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
… RuleSwerve, fix XML and loader references, and remove Fallback control node.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…oint1 >= 1.0 for 2 seconds to end inference

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…erver inference control

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…ence and refactor related code

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…icate definitions, and ensure proper initialization and callback logic.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…efaults

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…te RuleSwerve tolerance and register CameraDepth in loader.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…int state feedback. Update tick_rate and swerve tolerance.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…ach target positions; remove timeout fallback.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
…rove feedback logic, and ensure BT loader/XML integration

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Seongoo and others added 18 commits January 26, 2026 18:17
Combine left and right arm joint checking into a single loop by
merging joint_names and positions lists. This eliminates code
duplication and improves maintainability.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
The Rotate action uses Twist messages for mobile base rotation,
not JointTrajectory messages. Removed the unused trajectory_pub
and its import to improve code clarity.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add AGENTS.md to .gitignore for project documentation
- Remove redundant bt_node entry point from setup.py

The physical_ai_bt entry point is sufficient and more descriptive
than the generic bt_node name.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Add else clause to _load_node method to raise ValueError when
encountering unknown node types or IDs. This prevents silent
failures and makes debugging easier.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Reorganize behavior tree base classes into clearer file structure:
- Create bt_core.py for BTNode and NodeStatus (core classes)
- Update actions/base_action.py to only contain BaseAction
- Create controls/base_control.py for BaseControl and BaseDecorator
- Update all imports across action and control files

This improves code maintainability by placing each class in an
appropriately named location that reflects its purpose.

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Create physical_ai_bt/constants.py with descriptive constant names
- Update all action files (move_arms, move_head, move_lift, rotate) to use constants
- Improve code self-documentation and maintainability
- No functional changes, purely refactoring

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add DEFAULT joint name constants to MoveArms, MoveHead, MoveLift
- Update action constructors to accept optional joint_names parameters
- Add TreeLoader helper to extract joint names from topic_config
- Pass configured joint names from TreeLoader to action instances
- Maintain backward compatibility with hardcoded defaults
- Support different robot types through configuration alone

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Add threading.Lock to protect shared result state
- Add threading.Event for clean thread signaling and shutdown
- Replace _thread_done/_thread_success with lock-protected _result
- Ensure thread-safe access in tick(), _control_loop(), and reset()
- Apply fix to all action classes (MoveArms, MoveHead, MoveLift, Rotate)
- Prevent torn reads, stale values, and undefined behavior

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
- Remove control_action_publish_callback method (never registered as service)
- Remove action_publish_enabled flag (always True, never changed)
- Remove inference_paused flag (no service to control it)
- Simplify publish_action method to always publish
- No functional impact as BT never uses this functionality

Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
Signed-off-by: Seongwoo Kim <kimsw@robotis.com>
@Seongoo Seongoo added this to Platform Jan 26, 2026
Copilot AI review requested due to automatic review settings January 26, 2026 09:34
@Seongoo Seongoo added the bump Increase the version number to release label Jan 26, 2026
@github-project-automation github-project-automation bot moved this to 🌱 Todo in Platform Jan 26, 2026
@Seongoo Seongoo moved this from 🌱 Todo to 📝 Pull Request in Platform Jan 26, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Seongoo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the robot's autonomous capabilities by integrating a new behavior tree system. It provides a structured and extensible framework for defining complex robot behaviors through XML configurations and a set of pre-defined action nodes for various robot movements, streamlining the development of rule-based control strategies. This foundational change is accompanied by a synchronized version update across related packages.

Highlights

  • New Behavior Tree Package: Introduced a new physical_ai_bt package for implementing rule-based robot control using behavior trees. This package includes core BT logic, a blackboard for shared data, and a TreeLoader for XML-based configuration.
  • Robot Action Nodes: Added several trajectory-based action nodes for robot control: MoveArms (for dual-arm manipulation), MoveLift (for vertical movement), MoveHead (for head articulation), and Rotate (for mobile base rotation).
  • XML Configuration: Behavior trees can now be defined using XML files, allowing for flexible and declarative specification of robot behaviors. An example XML tree (ffw_sg2_rev1.xml) is provided.
  • Version Bump: Updated the version of physical_ai_bt, physical_ai_interfaces, physical_ai_manager, physical_ai_server, physical_ai_tools, and rosbag_recorder packages to 0.8.0.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ros-ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new physical_ai_bt package, implementing a behavior tree system for robot control. It includes base classes for actions and control nodes, specific action implementations for moving arms, head, lift, and rotating the base, an XML-based tree loader, and a ROS 2 node to execute these trees. The changes also involve version bumps across several related packages and minor adjustments to configuration files. Overall, the new package provides a structured and extensible way to define robot behaviors. However, there are several areas where code quality and maintainability can be improved, particularly regarding Python import practices and parameter handling.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the version to 0.8.0 and introduces the new physical_ai_bt package, which implements a Python-based Behavior Tree system for robotic control. The package provides rule-based sequential execution of robot actions including arm movements, head control, lift positioning, and mobile base rotation.

Changes:

  • Version bumped to 0.8.0 across all packages (rosbag_recorder, physical_ai_server, physical_ai_interfaces, physical_ai_manager, physical_ai_tools)
  • Added new physical_ai_bt package with Behavior Tree implementation including Sequence control node and trajectory-based actions
  • Added physical_ai_bt as dependency in physical_ai_tools meta-package and CI workflow

Reviewed changes

Copilot reviewed 35 out of 39 changed files in this pull request and generated 24 comments.

Show a summary per file
File Description
rosbag_recorder/package.xml Version bump to 0.8.0
rosbag_recorder/CHANGELOG.rst Added changelog entry for 0.8.0
physical_ai_tools/package.xml Version bump to 0.8.0 and added physical_ai_bt dependency
physical_ai_tools/CHANGELOG.rst Added changelog documenting physical_ai_bt release
physical_ai_server/setup.py Version bump to 0.8.0
physical_ai_server/physical_ai_server.py Minor formatting change (added blank line)
physical_ai_server/package.xml Version bump to 0.8.0
physical_ai_server/config/ffw_sg2_rev1_config.yaml Minor whitespace fix
physical_ai_server/CHANGELOG.rst Added changelog entry for 0.8.0
physical_ai_manager/package.json Version bump to 0.8.0
physical_ai_manager/package-lock.json Version bump to 0.8.0
physical_ai_manager/CHANGELOG.rst Added changelog entry for 0.8.0
physical_ai_interfaces/package.xml Version bump to 0.8.0
physical_ai_interfaces/CHANGELOG.rst Added changelog entry for 0.8.0
physical_ai_bt/trees/ffw_sg2_rev1.xml New behavior tree XML configuration
physical_ai_bt/setup.py New package setup configuration
physical_ai_bt/setup.cfg New package setup configuration
physical_ai_bt/resource/physical_ai_bt New resource marker file
physical_ai_bt/physical_ai_bt/controls/sequence.py New Sequence control node implementation
physical_ai_bt/physical_ai_bt/controls/base_control.py New base control node class
physical_ai_bt/physical_ai_bt/controls/init.py Controls package initialization
physical_ai_bt/physical_ai_bt/constants.py Constants for BT configuration
physical_ai_bt/physical_ai_bt/bt_nodes_loader.py XML-based tree loader
physical_ai_bt/physical_ai_bt/bt_node.py Main ROS 2 BT node implementation
physical_ai_bt/physical_ai_bt/bt_core.py Core BT classes and status enum
physical_ai_bt/physical_ai_bt/blackboard.py Singleton blackboard for shared data
physical_ai_bt/physical_ai_bt/actions/rotate.py Mobile base rotation action
physical_ai_bt/physical_ai_bt/actions/move_lift.py Lift positioning action
physical_ai_bt/physical_ai_bt/actions/move_head.py Head movement action
physical_ai_bt/physical_ai_bt/actions/move_arms.py Dual arm movement action
physical_ai_bt/physical_ai_bt/actions/base_action.py Base action class
physical_ai_bt/physical_ai_bt/actions/init.py Actions package initialization
physical_ai_bt/physical_ai_bt/init.py Package initialization
physical_ai_bt/package.xml Package manifest
physical_ai_bt/bt_bringup/params/bt_node_params.yaml Node parameter configuration
physical_ai_bt/bt_bringup/launch/bt_node.launch.py Launch file for BT node
physical_ai_bt/CHANGELOG.rst New package changelog
.gitignore Removed extra blank line
.github/workflows/ros-ci.yml Added physical_ai_bt to CI workflow
Files not reviewed (1)
  • physical_ai_manager/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

self._thread = None
with self._lock:
self._result = None
self.joint_state = None
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential race condition: self.joint_state is reset to None in the reset() method (line 181) without lock protection, while it may be concurrently accessed or modified by the _joint_state_callback running in a different thread. Consider protecting this assignment with self._lock.

Copilot uses AI. Check for mistakes.
@robotpilot robotpilot merged commit 9bb5006 into jazzy Jan 26, 2026
18 checks passed
@github-project-automation github-project-automation bot moved this from 📝 Pull Request to 🚩Done in Platform Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump Increase the version number to release

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants