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

Rover: add frame type Omni3Mecanum #27551

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

srmainwaring
Copy link
Contributor

Add a frame type to support 3 wheel rovers that use Mecanum wheels. The frame requires different mixing weights to Omni3 to ensure the linear (v_x, v_y) and angular (omega_z) velocities align with the vehicle axes.

Testing

Mecanum wheeled rover examples have been added to the Gazebo models in ArduPilot/SITL_Models#139.

Figure: rc 3 controls forward and back movement.
omni3rover_fwd

Figure: rc 4 controls lateral movement.
omni3rover_lat

Figure: rc 1 controls yaw.
omni3rover_yaw

References

The weights are determined using the approach to derive the inverse kinematics described in A. Gfrerrer. "Geometry and kinematics of the Mecanum wheel", Computer Aided Geometric Design 25 (2008) 784–791. Retrieved from https://www.geometrie.tugraz.at/gfrerrer/publications/MecanumWheel.pdf.

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

Code looks good, and after staring at the vids for a little while I have convinced myself that the wheels are moving correctly.

Is the model independent or written from the same paper as the mixer? It would be nice to confirm with something, but I don't think we need to hold up the PR.

Is there a standard "roller angle" for macanum wheels? I guess we would need a new mixer for each type.

@rmackay9 rmackay9 added WikiNeeded needs wiki update MergeOnCIPass labels Jul 15, 2024
@rmackay9
Copy link
Contributor

Great thanks, we can merge once it passes CI. We will need to update this wiki page at some point as well. https://ardupilot.org/rover/docs/rover-motor-and-servo-connections.html

@srmainwaring
Copy link
Contributor Author

Thanks for the review @IamPete1.

Is the model independent or written from the same paper as the mixer? It would be nice to confirm with something, but I don't think we need to hold up the PR.

The Gazebo model is independent of the calculation in the paper. It doesn't have any knowledge of the inverse kinematics, instead the Mecanum wheels are modelled directly (each wheel has 9 rollers angled at 45 deg). The movement arises from the rigid body and contact dynamics. The main approximation is the collision mesh for each roller is a sphere - as a primitive type it has support in DART for fast collision logic which improves performance.

Is there a standard "roller angle" for macanum wheels? I guess we would need a new mixer for each type.

Yes, rollers at 45 deg seems to be the standard. The vehicle uses the 'left' orientation for the wheels and are positioned at the corners of an equilateral triangle. The mixer weights are scale invariant, but changes in orientation or relative distance of each wheel from the CoM will need a different mixer. I originally though to add a scripting interface like the one for the 6DoF motor model in copter, but it was a bigger change. It could be a nice follow up, allowing up to some max number of motors to be configured.

@rmackay9 rmackay9 merged commit 4084012 into ArduPilot:master Jul 16, 2024
93 checks passed
@srmainwaring srmainwaring deleted the prs/pr-rover-omni3mecanum branch July 16, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants