Skip to content

[ADAPTERS] Use logger.warning() instead of logger.warn()#13

Merged
saikishor merged 1 commit into
ros-controls:masterfrom
lakhmanisahil:fix/logger-warning
Jun 17, 2026
Merged

[ADAPTERS] Use logger.warning() instead of logger.warn()#13
saikishor merged 1 commit into
ros-controls:masterfrom
lakhmanisahil:fix/logger-warning

Conversation

@lakhmanisahil

Copy link
Copy Markdown
Contributor

Description

Replace deprecated logger.warn() calls with logger.warning().

On newer ROS 2 distributions (Lyrical/Rolling), rclpy no longer provides the Logger.warn alias, which results in an AttributeError when those code paths are executed. This can cause the node to crash in warning scenarios such as rejected goals or lifecycle publisher disconnects.

This change replaces all usages of .warn() with .warning(), which is supported on both Jazzy and Lyrical.

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

Tested on:

  • ROS 2 Jazzy
  • ROS 2 Lyrical

@saikishor saikishor merged commit 8a24df6 into ros-controls:master Jun 17, 2026
4 checks passed
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.

2 participants