Skip to content

Booster support greeting mode#14

Open
WenjinFu wants to merge 16 commits intomainfrom
booster-support-greeting-mode
Open

Booster support greeting mode#14
WenjinFu wants to merge 16 commits intomainfrom
booster-support-greeting-mode

Conversation

@WenjinFu
Copy link
Collaborator

@WenjinFu WenjinFu commented Mar 4, 2026

Overview

Update dockerfile and docker-compose.yml to support booster env

WenjinFu and others added 16 commits January 29, 2026 22:01
#2)

* add support for greeting mode and following mode with intergration of lidar & camera or realsense

* update comment

* fix format

* fix format

* fix format

---------

Co-authored-by: openminddev <boyuan.eth@gmail.com>
* add support for greeting mode and following mode with intergration of lidar & camera or realsense

* update comment

* fix format

* fix format

* fix format

* Implement PersonFollower node with OM1 integration and state machine for tracking and greeting

* Add GreetingStatus message and improve formatting in person_follow_greet.py

* Add .gitignore file to exclude environment, build artifacts, and IDE files

* upload uv package install config files

* update README

* fix format

* update pyproject

* update docker file

* update engine file

* Refactor person_follow_greet.py to integrate Zenoh for greeting status and remove unused GreetingStatus messages

* Fix merge conflicts: keep pinned torchvision version and add torchaudio source

* Add CMake configuration and custom message definitions for om_api package

- Create CMakeLists.txt for building the om_api package with required dependencies.
- Define custom message types including Paths, LocalizationPose, MapStorage, and others.
- Update person_follow_greet.py to integrate path handling and obstacle avoidance logic.

* Fix typo in angle_tolerance parameter retrieval in PersonFollower class

* Add Go2 greeting mode launch file and update dependencies in Dockerfile and pyproject.toml

* Add HTTP server for mode control in PersonFollower and update operation modes

* add intrinsics and extrinsics files to support different robot

* fix format

* update files to auto compile for .engine files

* fix format

* update the file

* update files

* updated odom based geofence feature

* remove unnecessary comments and clean up code structure

* update Go2 greeting launch file and improve geofencing parameters

* Add support for multiple robot types in greeting mode and update configurations

- Introduced ROBOT_TYPE argument in Dockerfile for flexibility in robot selection.
- Created specific configuration files for G1 and Tron robots.
- Updated go2_greeting_launch.py to load parameters based on ROBOT_TYPE.
- Enhanced person_follow_greet_geofence.py to log the selected robot type.
- Adjusted docker-compose.yml to accommodate new robot configurations.

* Refactor Dockerfile and docker-compose.yml to remove ROBOT_TYPE argument and clean up volume mounts

* Swap ruff/isort hooks and adjust linting/imports

Swap the ruff and isort entries in .pre-commit-config (run ruff --fix and isort --profile black) and remove the "I" code from tool.ruff.lint.select in pyproject.toml. Also apply small import reordering/cleanup in source files (go2_camera_with_adjustable_publisher.py, person_follow_greet.py, person_follow_greet_geofence.py) to satisfy linting rules.

* Remove isort config and tidy imports

Remove isort from .pre-commit-config.yaml and delete the [tool.isort] section from pyproject.toml. Also clean up imports in source files: remove an extra blank line in go2_camera_with_adjustable_publisher.py, move om_api.msg.Paths into the main import group and consolidate zenoh_msgs imports in person_follow_greet.py and person_follow_greet_geofence.py for clearer ordering and formatting.

---------

Co-authored-by: openminddev <boyuan.eth@gmail.com>
Co-authored-by: jerinpeter <jerinpeter@gmail.com>
Co-authored-by: openmindev <147775420+openminddev@users.noreply.github.com>
* add support for greeting mode and following mode with intergration of lidar & camera or realsense

* update comment

* fix format

* fix format

* fix format

* Implement PersonFollower node with OM1 integration and state machine for tracking and greeting

* Add GreetingStatus message and improve formatting in person_follow_greet.py

* Add .gitignore file to exclude environment, build artifacts, and IDE files

* upload uv package install config files

* update README

* fix format

* update pyproject

* update docker file

* update engine file

* Refactor person_follow_greet.py to integrate Zenoh for greeting status and remove unused GreetingStatus messages

* Fix merge conflicts: keep pinned torchvision version and add torchaudio source

* Add CMake configuration and custom message definitions for om_api package

- Create CMakeLists.txt for building the om_api package with required dependencies.
- Define custom message types including Paths, LocalizationPose, MapStorage, and others.
- Update person_follow_greet.py to integrate path handling and obstacle avoidance logic.

* Fix typo in angle_tolerance parameter retrieval in PersonFollower class

* Add Go2 greeting mode launch file and update dependencies in Dockerfile and pyproject.toml

* Add HTTP server for mode control in PersonFollower and update operation modes

* add intrinsics and extrinsics files to support different robot

* fix format

* update files to auto compile for .engine files

* fix format

* update the file

* update files

* updated odom based geofence feature

* remove unnecessary comments and clean up code structure

* update Go2 greeting launch file and improve geofencing parameters

* Add support for multiple robot types in greeting mode and update configurations

- Introduced ROBOT_TYPE argument in Dockerfile for flexibility in robot selection.
- Created specific configuration files for G1 and Tron robots.
- Updated go2_greeting_launch.py to load parameters based on ROBOT_TYPE.
- Enhanced person_follow_greet_geofence.py to log the selected robot type.
- Adjusted docker-compose.yml to accommodate new robot configurations.

* Refactor Dockerfile and docker-compose.yml to remove ROBOT_TYPE argument and clean up volume mounts

* Swap ruff/isort hooks and adjust linting/imports

Swap the ruff and isort entries in .pre-commit-config (run ruff --fix and isort --profile black) and remove the "I" code from tool.ruff.lint.select in pyproject.toml. Also apply small import reordering/cleanup in source files (go2_camera_with_adjustable_publisher.py, person_follow_greet.py, person_follow_greet_geofence.py) to satisfy linting rules.

* Remove isort config and tidy imports

Remove isort from .pre-commit-config.yaml and delete the [tool.isort] section from pyproject.toml. Also clean up imports in source files: remove an extra blank line in go2_camera_with_adjustable_publisher.py, move om_api.msg.Paths into the main import group and consolidate zenoh_msgs imports in person_follow_greet.py and person_follow_greet_geofence.py for clearer ordering and formatting.

* update config

* updated params for LimX Tron

* Refactor greeting and switching logic to improve history management and logging

* Enhance person-following system with background verification and timeout handling for approaching state

* Update g1_params.yaml

* Add USB camera support for tron robot in greeting launch file

* Remove DEVICE_TYPE environment variable and update camera topic path for tron robot in launch files

* Reformat launch_actions.extend block

Reformat the launch_actions.extend call in launch/go2_greeting_launch.py to use a multi-line list wrapped in parentheses for improved readability. No functional changes; purely stylistic.

---------

Co-authored-by: openminddev <boyuan.eth@gmail.com>
Co-authored-by: Wenjin Fu <57229263+WenjinFu@users.noreply.github.com>
Co-authored-by: openmindev <147775420+openminddev@users.noreply.github.com>
Update docker-compose.yml to use underscore-based names instead of hyphenated ones: image changed to openmindagi/person_following:latest and container_name to person_following. This aligns naming with the repository/image convention and does not change runtime or network settings.
Revise release workflow to build and push ARM64 images with updated actions and metadata. Changes include:

- Rename workflow and job to clarify ARM64 build intent and add workflow_dispatch trigger.
- Use ubuntu-22.04-arm runner and rename job to build-arm64.
- Bump actions/checkout to v5 and switch docker/login-action to v2 (login now always runs).
- Configure docker/metadata-action with corrected image name (openmindagi/person_following), add semver tag patterns and a conditional latest tag for main, and keep branch/sha tags.
- Use docker/build-push-action@v5 (with id) to build and push for linux/arm64, remove explicit Dockerfile path, and wire tags/labels from metadata.

These changes standardize tagging, ensure ARM64 builds, and align action versions and metadata handling for releases.
* Rename src/ to person_following and update paths

Refactor codebase by moving the top-level src package into person_following and updating all runtime references. Adjust Dockerfile, launch files, and README to use the new package paths (e.g. tracked_person_publisher_ros.py, person_follow_greet_geofence.py, person_follower.py) and update the start_person_following.sh location. Remove several now-unused legacy files under src (camera intrinsics, example camera publisher, pyproject and related build artifacts). This keeps imports and runtime commands consistent with the new package layout.

* Handle SWITCH in IDLE and remove auto-switch

When receiving a HandshakeCode.SWITCH, start person following even if the node is currently IDLE: log start, transition to SWITCHING and call the switch command. Preserve the existing behavior for GREETING_IN_PROGRESS (start switching to next person). Update the zenoh log message to remove the "- conversation finished" suffix. Also stop automatically triggering a switch from _handle_idle_state (no more auto-call when tracking_status_received); the idle handler now waits for an external SWITCH command. Changes applied to both person_following/person_follow_greet.py and person_following/person_follow_greet_geofence.py to keep behaviors consistent.

* Add unitree_go/unitree_hg msgs and classical mode

Expose Unitree ROS interfaces and toggle classical walk mode from person followers.

- person_following: import unitree_api Request types, add /api/sport/request publisher, and toggle classical walk mode on state transitions (enable for moving states, disable for idle/greeting). Implements _enable_classical_mode and _disable_classical_mode to publish Request(api_id=2049) with JSON parameter true/false.
- Added two new ROS interface packages: unitree_go and unitree_hg. Each includes CMakeLists.txt, package.xml and many message definitions (MotorCmd/MotorState, IMUState, LowCmd/LowState, SportModeCmd/SportModeState, Bms*, Uwb*, PathPoint, TimeSpec, etc.) to support Unitree robot APIs.

These changes allow the person-following nodes to command Unitree gait mode and add the message types needed to integrate Unitree hardware/software.

* Add geofencing to follower node, remove unitree

Integrate geofencing and odometry into the person follower node and remove duplicate/unitree packages.

- Merge geofence functionality into person_following/person_follow_greet.py (deleted person_follow_greet_geofence.py).
- Add odom subscription, quaternion->yaw helper, geofence parameters (radius, soft radius, return speed, etc.).
- Enforce geofence in greeting mode: check person global position, scale/block forward velocity in soft/hard zones, auto-set/reset center, and provide HTTP endpoints (/geofence, /geofence/enable, /geofence/disable, /geofence/reset_center).
- New state RETURNING_TO_CENTER with logic to generate return targets, navigate back using /om/paths for obstacle-aware returns, and handle stuck/timeout conditions.
- Improve search and approach behavior: rotation counting, boundary-stuck detection, approach position timeouts, and safer transitions (reject targets outside geofence).
- Minor refactors: increased state machine tick, consolidated logging into startup helper, tightened docstrings and type hints, reorganized HTTP handler responses.
- Removed unitree_go and unitree_hg packages and their message files (deleted many unitree_* files).

This commit centralizes geofence logic, tightens safety checks when greeting, and removes obsolete/duplicated unitree package artifacts.

* Restructure folders (#6)

* Restructure package; add controllers and geofence

Reorganize person_following into subpackages (controllers, managers, nodes, utils) and move/rename several modules. Add MotionController (PD follow/approach logic with path safety) and GeofenceManager (odom handling, geofence checks, soft/hard radius handling and return target generation). Add new person_follow_greet ROS2 node integrating OM1/Zenoh greeting, HTTP mode control, state machine hooks, path/odometry subscribers, and geofence-aware behaviors. Misc: move model_manager and person_following_command into managers/controllers and rename various utility modules.

* Point launch files to person_following/nodes

Update launch/greeting_launch.py and launch/person_following_launch.py to use the relocated scripts under person_following/nodes (tracked_person_publisher_ros.py, person_follow_greet.py, person_follower.py) instead of the previous top-level paths. This aligns the launch commands with the new package layout so processes are started from the correct file locations.

* Refactor project structure and update Dockerfile for improved organization

* Format code and update launch usage

Update launch usage and refactor formatting across the repo without changing logic. Changes include:

- launch/greeting_launch.py: update usage to run colcon build, source install/setup.bash, and corrected launch path.
- launch/person_following_launch.py: wrap long command path entries for readability.
- person_following/main.py: add missing time import.
- person_following/controllers/motion_controller.py, managers/geofence_manager.py, managers/model_manager.py: inline single-line function/type signatures and wrap long expressions/arrays for consistent formatting.
- person_following/nodes/*.py: group and format imports, compact publisher creation, reflow long log lines and expressions for readability.
- person_following/nodes/tracked_person_publisher_ros.py, person_following/nodes/person_following_system.py: multiline imports for clarity.

These edits are primarily stylistic and aim to improve readability and maintainability.

* Update package source to editable for person-following-system

* Add unitree_go package with message definitions and CMake configuration

* Format PersonFollower logging; fix HeightMap comments

Refactor person_following/nodes/person_follow_greet.py for readability by wrapping the state-check tuple and log message across multiple lines (no behavioral change). Update unitree_go/msg/HeightMap.msg comments to correct the index variable used in the examples (iy -> it) and clarify the position/data indexing description.

* Update Dockerfile to include unitree_go in colcon build

* Add ros-jazzy-rosidl-generator-dds-idl package to Dockerfile
* Rename src/ to person_following and update paths

Refactor codebase by moving the top-level src package into person_following and updating all runtime references. Adjust Dockerfile, launch files, and README to use the new package paths (e.g. tracked_person_publisher_ros.py, person_follow_greet_geofence.py, person_follower.py) and update the start_person_following.sh location. Remove several now-unused legacy files under src (camera intrinsics, example camera publisher, pyproject and related build artifacts). This keeps imports and runtime commands consistent with the new package layout.

* Handle SWITCH in IDLE and remove auto-switch

When receiving a HandshakeCode.SWITCH, start person following even if the node is currently IDLE: log start, transition to SWITCHING and call the switch command. Preserve the existing behavior for GREETING_IN_PROGRESS (start switching to next person). Update the zenoh log message to remove the "- conversation finished" suffix. Also stop automatically triggering a switch from _handle_idle_state (no more auto-call when tracking_status_received); the idle handler now waits for an external SWITCH command. Changes applied to both person_following/person_follow_greet.py and person_following/person_follow_greet_geofence.py to keep behaviors consistent.

* Add unitree_go/unitree_hg msgs and classical mode

Expose Unitree ROS interfaces and toggle classical walk mode from person followers.

- person_following: import unitree_api Request types, add /api/sport/request publisher, and toggle classical walk mode on state transitions (enable for moving states, disable for idle/greeting). Implements _enable_classical_mode and _disable_classical_mode to publish Request(api_id=2049) with JSON parameter true/false.
- Added two new ROS interface packages: unitree_go and unitree_hg. Each includes CMakeLists.txt, package.xml and many message definitions (MotorCmd/MotorState, IMUState, LowCmd/LowState, SportModeCmd/SportModeState, Bms*, Uwb*, PathPoint, TimeSpec, etc.) to support Unitree robot APIs.

These changes allow the person-following nodes to command Unitree gait mode and add the message types needed to integrate Unitree hardware/software.

* Add geofencing to follower node, remove unitree

Integrate geofencing and odometry into the person follower node and remove duplicate/unitree packages.

- Merge geofence functionality into person_following/person_follow_greet.py (deleted person_follow_greet_geofence.py).
- Add odom subscription, quaternion->yaw helper, geofence parameters (radius, soft radius, return speed, etc.).
- Enforce geofence in greeting mode: check person global position, scale/block forward velocity in soft/hard zones, auto-set/reset center, and provide HTTP endpoints (/geofence, /geofence/enable, /geofence/disable, /geofence/reset_center).
- New state RETURNING_TO_CENTER with logic to generate return targets, navigate back using /om/paths for obstacle-aware returns, and handle stuck/timeout conditions.
- Improve search and approach behavior: rotation counting, boundary-stuck detection, approach position timeouts, and safer transitions (reject targets outside geofence).
- Minor refactors: increased state machine tick, consolidated logging into startup helper, tightened docstrings and type hints, reorganized HTTP handler responses.
- Removed unitree_go and unitree_hg packages and their message files (deleted many unitree_* files).

This commit centralizes geofence logic, tightens safety checks when greeting, and removes obsolete/duplicated unitree package artifacts.

* Restructure folders (#6)

* Restructure package; add controllers and geofence

Reorganize person_following into subpackages (controllers, managers, nodes, utils) and move/rename several modules. Add MotionController (PD follow/approach logic with path safety) and GeofenceManager (odom handling, geofence checks, soft/hard radius handling and return target generation). Add new person_follow_greet ROS2 node integrating OM1/Zenoh greeting, HTTP mode control, state machine hooks, path/odometry subscribers, and geofence-aware behaviors. Misc: move model_manager and person_following_command into managers/controllers and rename various utility modules.

* Point launch files to person_following/nodes

Update launch/greeting_launch.py and launch/person_following_launch.py to use the relocated scripts under person_following/nodes (tracked_person_publisher_ros.py, person_follow_greet.py, person_follower.py) instead of the previous top-level paths. This aligns the launch commands with the new package layout so processes are started from the correct file locations.

* Refactor project structure and update Dockerfile for improved organization

* Format code and update launch usage

Update launch usage and refactor formatting across the repo without changing logic. Changes include:

- launch/greeting_launch.py: update usage to run colcon build, source install/setup.bash, and corrected launch path.
- launch/person_following_launch.py: wrap long command path entries for readability.
- person_following/main.py: add missing time import.
- person_following/controllers/motion_controller.py, managers/geofence_manager.py, managers/model_manager.py: inline single-line function/type signatures and wrap long expressions/arrays for consistent formatting.
- person_following/nodes/*.py: group and format imports, compact publisher creation, reflow long log lines and expressions for readability.
- person_following/nodes/tracked_person_publisher_ros.py, person_following/nodes/person_following_system.py: multiline imports for clarity.

These edits are primarily stylistic and aim to improve readability and maintainability.

* Update package source to editable for person-following-system

* Add unitree_go package with message definitions and CMake configuration

* Format PersonFollower logging; fix HeightMap comments

Refactor person_following/nodes/person_follow_greet.py for readability by wrapping the state-check tuple and log message across multiple lines (no behavioral change). Update unitree_go/msg/HeightMap.msg comments to correct the index variable used in the examples (iy -> it) and clarify the position/data indexing description.

* Update Dockerfile to include unitree_go in colcon build

* Add ros-jazzy-rosidl-generator-dds-idl package to Dockerfile

* Add position validation in GeofenceManager to handle invalid odometry data

* Fix formatting issues in YAML files by adding missing newlines at the end of the files

---------

Co-authored-by: openmindev <147775420+openminddev@users.noreply.github.com>
Co-authored-by: openminddev <boyuan.eth@gmail.com>
…s; refine extrinsics and intrinsics YAML files (#9)
Add a new CONVERSATION enum value and a message:String field to PersonGreetingStatus in zenoh_msgs, and set message when publishing an APPROACHED greeting in person_follow_greet.py (now sends "Person approached successfully"). This allows sending a human-readable message with greeting updates; note this changes the serialized IDL struct and consumers/subscribers should be updated accordingly.
* Implement LiDAR Tracker with Kalman Filter for enhanced person tracking

- Added lidar_tracker.py to manage LiDAR cluster tracking using a Kalman Filter.
- Integrated methods for loading camera intrinsics and extrinsics from YAML.
- Implemented functions for processing LiDAR scans, projecting them into camera space, and clustering points.
- Introduced LidarTracker class to handle enrollment, updates, and drift detection.
- Enhanced switch_state.py to simplify candidate iteration and decision-making during target switching.
- Removed unnecessary timeout and multi-frame voting logic for candidate checks.
- Improved logging for candidate skipping and tracking status.

* Update Tron robot parameters for improved tracking performance

* update tron calibration file

* Update Tron robot parameters

* update dockerfile

* Increase distance threshold for close proximity detection in motion controller

* uv lock

---------

Co-authored-by: jerinpeter <jerinpeter@gmail.com>
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.

4 participants