Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Interactive Marker Control & Fixed Lint Issues #1065

Merged
merged 12 commits into from
Feb 21, 2025

Conversation

iamjunyeong
Copy link
Contributor

PR Description

This PR ports the TurtleBot3 Interactive Marker node to ROS2 Humble, enabling real-time control of TurtleBot3 within RViz using interactive markers. This update refines the marker-based movement system to provide a more intuitive and predictable control experience by ensuring linear and angular motions are properly separated.

Additionally, existing lint issues have been resolved, improving code maintainability and aligning with ROS2 best practices.

Summary of Changes

  1. Refined movement control for better usability

    • Separated movement types:
      • Move marker → Controls only linear velocity (cmd_vel.linear.x).
      • Rotate marker → Controls only angular velocity (cmd_vel.angular.z).
    • Fixed unintended forward movement when rotating, ensuring that rotation does not introduce linear velocity.
  2. Ensured rotation marker remains fixed to base_link

    • Previously, the rotation marker moved with the robot, making control unpredictable.
    • Now, it remains stationary at base_link, allowing users to rotate the robot easily without affecting its position.
    • This adjustment results in a more stable and user-friendly interactive control experience.
  3. Fixed existing linting issues

    • Applied formatting corrections to meet ROS2 Python style guidelines (PEP8).
    • Removed redundant code and improved readability.

Motivation

The original interactive marker control had several usability issues, including unintended linear movement while rotating and a floating rotation marker, which made precise control difficult.

This update significantly improves the user experience by:

  • Separating movement and rotation controls, preventing interference between the two.
  • Fixing the rotation marker at base_link, ensuring a stable and intuitive control scheme.

Additionally, resolving linting issues improves code clarity and maintainability, making future contributions easier.

Testing & Validation

  • Confirmed that linear and angular velocity controls function independently in ROS2 Humble.
  • Tested in RViz to verify that the rotation marker remains fixed at base_link.
  • Ran multiple tests with different movement patterns to ensure consistent behavior.
  • Verified that linting issues were resolved without introducing functional changes.

@robotpilot robotpilot added the enhancement New feature or request label Feb 20, 2025
Copy link
Member

@robotpilot robotpilot left a comment

Choose a reason for hiding this comment

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

@iamjunyeong Your base branch is weird. You need to update the main branch, which is your base, using the “git pull” command as shown below.

git pull origin main

@iamjunyeong iamjunyeong force-pushed the feature-humble-example-interactive-marker branch from 958008f to 8a28a5d Compare February 21, 2025 00:18
Copy link
Contributor

@yun-goon yun-goon left a comment

Choose a reason for hiding this comment

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

I confirmed that it moves well with the interactive marker. Looks great!

@yun-goon yun-goon requested a review from robotpilot February 21, 2025 10:38
Copy link
Member

@robotpilot robotpilot left a comment

Choose a reason for hiding this comment

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

LGTM

@robotpilot robotpilot merged commit 39ad7c3 into main Feb 21, 2025
9 checks passed
@robotpilot robotpilot deleted the feature-humble-example-interactive-marker branch February 21, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants