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

Differential Drive: Added parameter & logic to set the minium turning… #22877

Closed
wants to merge 2 commits into from

Conversation

PerFrivik
Copy link
Contributor

… speed in the turning state

Solved Problem

The problem seen in #22819 originates from the fact that in the turn state, the rover will linearly scale the angular velocity required to turn towards the current waypoint, with the error of heading and waypoint. As the error grows smaller, the angular velocity setpoint also decreases, and for very small errors, it might seem like it is not moving at all.

Fixes #22819

Solution

To fix this I introduced a parameter, where the user can decide what the minimum angular velocity in the turn state should be. The default value is set to 0.5 for now.

Alternatives

Open to any suggestions.

Test coverage

  • Simulation

@PerFrivik
Copy link
Contributor Author

@slgrobotics I created a draft for now. This will probably still change architecturally.

@PerFrivik PerFrivik self-assigned this Mar 13, 2024
@PerFrivik PerFrivik requested a review from MaEtUgR March 13, 2024 13:49
@PerFrivik PerFrivik added Rover 🚙 Rovers and other UGV bug labels Mar 13, 2024
@slgrobotics
Copy link
Contributor

Tested it:

mkdir src000
cd src000
git clone https://github.com/PX4/PX4-Autopilot.git --single-branch --recursive -b per-pr_differential_drive_min_turn_speed
cd PX4-Autopilot/
make px4_sitl gz_r1_rover

the above kinda works, but the R1 rover moves in a very strange back-and-forth fashion and very slowly

make px4_sitl gz_lawnmower

this works very well, the mower rushes through the mission like a wild boar.

I used the same mission as I posted in #22819 - with legs around 50 meters.

@PerFrivik
Copy link
Contributor Author

@slgrobotics thanks for the update! Happy that the lawn_mower works 😄. I'll check what is wrong with the r1.

@PerFrivik PerFrivik force-pushed the per-pr_differential_drive_min_turn_speed branch from e890257 to d0aab45 Compare March 25, 2024 08:47
@PerFrivik
Copy link
Contributor Author

Rebased on main

@github-actions github-actions bot added the stale label Apr 25, 2024
@chfriedrich98
Copy link
Contributor

These changes were superseded by #23430.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Rover 🚙 Rovers and other UGV stale
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug] Rovers in SITL/GZ don't want to move when executing a mission
3 participants