Skip to content

Conversation

@gdoffe
Copy link
Contributor

@gdoffe gdoffe commented Nov 17, 2025

Changes

This MR replaces the boolean allow_reverse parameter with a MotionDirection enum to provide finer control over robot movement direction during path navigation.

The new enum supports three modes:

  • BIDIRECTIONAL: Robot chooses optimal direction (forward or backward based on orientation)
  • FORWARD_ONLY: Force forward-only motion
  • BACKWARD_ONLY: Force backward-only motion

Motion Direction Enum

  • Replace boolean allow_reverse with MotionDirection enum in C++ models (PoseOrder, PoseOrderList)
  • Replace boolean allow_reverse with MotionDirection enum in Python models (PathPose)
  • Add MotionDirection enum with three values: BIDIRECTIONAL, FORWARD_ONLY, BACKWARD_ONLY
  • Update all planner actions to use MotionDirection enum
  • Update copilot to use MotionDirection.FORWARD_ONLY

Protobuf Update

  • Update protobuf from 3.20.3 to 5.29.5 to align with mcu-firmware's EmbeddedProto version
  • Regenerate all Python protobuf bindings with protobuf 5.29.5
  • Fix protobuf 5.29.5 API change: replace including_default_value_fields with always_print_fields_with_no_presence

Testing

  • Add TestRectangleAlternatingAction test demonstrating all three motion direction modes with rectangle pattern and diagonal movements

@gdoffe gdoffe linked an issue Nov 17, 2025 that may be closed by this pull request
@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from 49e3def to a0b40fc Compare November 17, 2025 14:51
Copy link
Contributor

@ecourtois ecourtois left a comment

Choose a reason for hiding this comment

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

Please check few comments and bugs.

I'd prefer if you squash the 2 first commits, and the 4 last commits. None of them can work or can be reverted alone.

@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from a0b40fc to 1b3a5b7 Compare November 29, 2025 00:08
@gdoffe gdoffe requested a review from ecourtois November 29, 2025 00:15
Copy link
Contributor

@ecourtois ecourtois left a comment

Choose a reason for hiding this comment

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

LGTM!

Just add the commit to update submodules before merge.

@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from 1b3a5b7 to b3f2150 Compare December 14, 2025 10:47
@ecourtois ecourtois force-pushed the 180-planner-allow-forcing-backward-motions branch from b3f2150 to 70859a5 Compare December 17, 2025 19:54
@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from 70859a5 to 56937cf Compare December 19, 2025 19:37
gdoffe and others added 3 commits December 19, 2025 20:38
Replace the boolean allow_reverse parameter with MotionDirection enum
(bidirectional, forward_only, backward_only) to provide finer control
over robot movement direction during path navigation.

Changes:
- Add MotionDirection enum in C++ and Python models
- Update PoseOrder and PoseOrderList classes
- Update all planner actions to use MotionDirection enum
- Update copilot to use MotionDirection.FORWARD_ONLY

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Add TestRectangleAlternatingAction that demonstrates all three
MotionDirection enum values:
- BACKWARD_ONLY: moving right and left sides of rectangle
- FORWARD_ONLY: moving up and returning to start
- BIDIRECTIONAL: diagonal movements for optimal path selection

The robot traces a rectangle pattern with diagonal back-and-forth
movements, looping infinitely.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
Update protobuf from 3.20.3 to 5.29.5 to align with mcu-firmware's
EmbeddedProto version and ensure compatibility between generated
protobuf messages.

Changes:
- Update pyproject.toml dependency
- Update uv.lock
- Regenerate all Python protobuf bindings
- Fix API change: replace including_default_value_fields with
  always_print_fields_with_no_presence

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from 56937cf to d44a829 Compare December 19, 2025 19:39
- RIOT: bump to last upstream version plus one commit for latest ETL
version support
- mcu-firmware: bump to latest firmware version
@gdoffe gdoffe force-pushed the 180-planner-allow-forcing-backward-motions branch from d44a829 to 002093d Compare December 19, 2025 21:27
@ecourtois ecourtois merged commit 20d9046 into master Dec 19, 2025
4 checks passed
@ecourtois ecourtois deleted the 180-planner-allow-forcing-backward-motions branch December 19, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Planner: Allow forcing backward motions

2 participants