SITL_Models icon indicating copy to clipboard operation
SITL_Models copied to clipboard

Gazebo: add OmniRover with Mecanum wheels

Open srmainwaring opened this issue 1 year ago • 0 comments

Add two omni rover frames using Mecanum wheels: a 4 wheel rover with frame type OmniX (FRAME_TYPE = 3), and a 3 wheel rover that uses a new frame type Omni3Mecanum.

Figure: 4 wheel rover using frame type OmniX. omnirover

Figure: 3 wheel rover using frame type Omni3Mecanum. omni3rover

Alternatives considered

The Gazebo model repo contains a Mecanum Lift. This model includes a planar controller plugin to move the model about in response to a planar twist command. The approach here is different in that the Mecaum wheels are modelled directly using 9 spheroid rollers in each wheel. There are models for left and right wheels that may be imported into another model using the SDF <include> element. This permits different geometries to be assembled, and allows the ArduPilot plugin to control each wheel directly by assigning it to a PWM channel.

Figure: Mecanum wheel detail displaying roller joints. mecanum_wheel

Related issues and discussion

  • https://discuss.ardupilot.org/t/support-for-omni-boats-coming-in-rover-3-5/31663/1
  • https://github.com/ArduPilot/ardupilot/issues/9352
  • https://github.com/ArduPilot/ardupilot/issues/11782
  • https://github.com/ArduPilot/ardupilot/pull/25204
  • https://github.com/ArduPilot/ardupilot/pull/27551

Usage

Run Gazebo

gz sim -v4 -s -r omnirover_playpen.sdf

Run SITL

sim_vehicle.py -v Rover --model JSON --add-param-file=$HOME/SITL_Models/Gazebo/config/omni4rover.param --console --map

Once armed, set the mode to MANUAL and control as follows:

Channel Low High
rc 1 yaw left yaw right
rc 2 not assigned
rc 3 move back move forward
rc 4 move left move right

Figure: omni rover moving laterally omnirover_3

srmainwaring avatar Jul 11 '24 22:07 srmainwaring