Skip to content

Conversation

@AlexWUrobot
Copy link

Overview

[Provide a brief overview of the changes in this pull request.]
OM1 publish welcome mode topic to ROS2 (Go2 robotdog)

Go2 robotdog will Initial Listener for OM1 Welcome Mode
Once the Welcome Mode message is received,
the robotdog initiates AprilTag detection, subscribes to IMU data, and
executes a PID-based 180° rotation.

Type of change

  • [ V ] New feature

Changes

[Detail the changes you have made in this pull request. Include any new features, bug fixes, or improvements.]
Add WelcomeStatusPublisher (welcome_status_publisher.py) in unitree_go2_autonomy_sim.json5

Checklist

  • [ V ] Code complies with style guidelines
  • [ V ] Self-review completed
  • [ V ] Local testing completed
  • [ V ] Tests added/updated (if applicable)
image

@AlexWUrobot AlexWUrobot requested a review from a team as a code owner January 30, 2026 20:17
Copilot AI review requested due to automatic review settings January 30, 2026 20:17
@AlexWUrobot AlexWUrobot requested review from a team as code owners January 30, 2026 20:17
@github-actions github-actions bot added robotics Robotics code changes python Python code config Configuration files labels Jan 30, 2026
Copy link
Contributor

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 adds functionality to publish a "welcome mode" status message to ROS2, enabling the Go2 robot dog to initiate AprilTag detection and execute a 180° rotation upon receiving the message.

Changes:

  • Added a new WelcomeStatusPublisher background plugin that publishes status messages to ROS2 or Zenoh
  • Configured the publisher in unitree_go2_autonomy_sim.json5 to broadcast on the om/welcome topic
  • Commented out the existing move_go2_autonomy agent action

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/backgrounds/plugins/welcome_status_publisher.py New background plugin implementing periodic status message publishing with ROS2/Zenoh fallback
config/unitree_go2_autonomy_sim.json5 Added WelcomeStatusPublisher configuration and commented out move_go2_autonomy action

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

ros2_topic: "om/welcome",
zenoh_topic: "om/welcome",
message: "welcome mode",
interval: 1.0
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Publishing the welcome message every second may be excessive for a status that doesn't change. Consider increasing the interval to reduce network traffic and resource usage, or publish only once on startup if this is meant as an initialization signal.

Suggested change
interval: 1.0
interval: 60.0

Copilot uses AI. Check for mistakes.
# Prefer ROS2
if self.ros2_provider is not None:
try:
self.ros2_provider.add_pending_message(text)
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The add_pending_message method is being passed a plain string, but the ROS2PublisherProvider may expect a specific message type. Verify that ROS2PublisherProvider correctly handles string messages, or consider using a standard ROS2 String message type to ensure compatibility with ROS2 subscribers.

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +59
except Exception:
# start may already have been called elsewhere
pass
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Silently catching all exceptions when calling start() makes it difficult to distinguish between 'already started' and actual errors. Consider checking a provider state flag or catching a more specific exception type if the provider raises one for 'already started' scenarios.

Suggested change
except Exception:
# start may already have been called elsewhere
pass
except Exception as e:
# start may already have been called elsewhere; log for diagnostics
logging.debug("WelcomeStatusPublisher: ROS2 provider start() failed (may already be started): %s", e)

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Comment on lines +41 to +45
// {
// name: "move_go2_autonomy",
// llm_label: "move",
// connector: "unitree_sdk_advance",
// },
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this.

Comment on lines +12 to +21
try:
import zenoh
except Exception:
zenoh = None

try:
from zenoh_msgs import String, open_zenoh_session
except Exception:
String = None
open_zenoh_session = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Please import it directly

Comment on lines +7 to +10
try:
from providers.ros2_publisher_provider import ROS2PublisherProvider
except Exception:
ROS2PublisherProvider = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove it

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

Labels

config Configuration files python Python code robotics Robotics code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants