Module: robotics.mobile
The utilities contains functionality for mobile robots based on the EXUDYN example MecanumWheel RollingDiscPenality specific friction angle of rolling disc is used to model rolls of mecanum wheels
Author: Martin Sereinig, Peter Manzl and Johannes Gerstmayr
Date: 2021-10-01 Updated: 2023-09-15
Notes: formulation is still under development
Function: MobileRobot2MBS
MobileRobot2MBS(mbs, mobileRobot, markerGround, flagGraphicsRollers = True, *args, **kwargs)
function description: add items to existing mbs to build up a mobile robot platform, there are options that can be passed as args / kwargs, which can contains options as described below. The robot platform is built out of rigid bodies where the wheels can be modeled as rolling discs (mecanum wheel x/o configuration) or with a detailed mecanum wheel simulation approach
input:
mbs: the multibody system which will be extendedmarkerGround: a rigid body marker, at which the robot will be placed (usually ground)mobileRobot: a dictionary including all information about the mobile robot platform
output: the function returns a dictionary containing nodes, body, object and marker numbers of individual mobile robot parts nPlatformList, bPlatformList, oPlatformList, mPlatformList; nodes, bodies, objects and marker of the platform [nPlattform] [bPlattform] [oPlattform] [] oAxisList, mAxlesList; objects and marker of the axles [a1, a2, a3, a4] nWheelsList, bWheelsList, oRollingDiscsList, mWheelsList; nodes, bodys, objects and markers of the four wheels [w1, w2, w3, w4]
notes: for coordinate system, see Python function definition
Relevant Examples (Ex) and TestModels (TM) with weblink to github: ROSMobileManipulator.py (Ex)
Function: Generatrix2Polynomial
Generatrix2Polynomial(param, GeneratrixFunction, tol = 1e-14, nFit = 101, nTest = 1001)
function description: create a polynomial describing a generatrix function
input:
param: list containing data (lRoll, aPoly, …)
author: Peter Manzl
notes: create and fit a polynomial of an order high enough to approximate the given GeneratrixFunction with a given tolerance. The error is measured as the Chebyshev distance.
Function: GeneratrixRoll
function description: generatrix function for a roll of a Mecanum wheel
input:
u: parameter, max. +- pi/2 param[‘r’]: radius of the associated Mecanum wheel param[‘delta’]: angle of the rolls rotation axis to the wheels rotation axis param[‘dRoll’]: smallest distance of roll axis to the wheel axis
output: x and y values for the function in the local frame. The rotation around the local x-yxis creates the surface of the roll.
author: Peter Manzl
notes: parametric equation, x,y are the generatrix of the roll in its local frame with the axis of rotation x, see Gfrerrer2008.
Function: FunDiffPoly
function description: calculates the derivative of the polynomial \(a0*x^n + ... \)
input:
x: value at which the polynomial is evaluateda: coefficients
output: f:
author: Peter Manzl
notes: helper function polynomial describing a generatrix function
Function: FunDDiffPoly
function description: calculates the second derivative of a polynomial
input:
x: value at which the polynomial is evaluateda: coefficients
output: f:
author: Peter Manzl
notes: helper function polynomial describing a generatrix function
Function: MecanumXYphi2WheelVelocities
MecanumXYphi2WheelVelocities(xVel, yVel, angVel, R, Lx, Ly, wheeltype)
function description: DEPRECATED: the wheel velocities of a mecanum platform for the velocities [xVel, yVel, angVel]; use MobileKinematics
Relevant Examples (Ex) and TestModels (TM) with weblink to github: mobileMecanumWheelRobotWithLidar.py (Ex), laserScannerTest.py (TM), mecanumWheelRollingDiscTest.py (TM)
Function: MecanumWheelVelocity2XYphi
MecanumWheelVelocity2XYphi(w, R, Lx, Ly, wheeltype)
function description: DEPRECATED: the platform velocities [xVel, yVel, angVel] of a mecanum platform for the wheel velocities w; use MobileKinematics
CLASS MobileKinematics (in module robotics.mobile)
class description: calculate 4 wheel velocities for a mecanum wheel driven platform with given platform velocities
author: Peter Manzl, Johannes Gerstmayr
notes: still under development; wheel axis is mounted at y-axis; positive angVel rotates CCW in x/y plane viewed from top; for coordinate system, see Python class definition
Class function: init
__init__(self, R, lx, ly, flagAdjusted = False, lcx = 0, lcy = 0, wheeltype = 0)
class function description: initialize mobileKinematics class
input:
R: wheel radiuslx: wheel track widthly: wheel basewheeltype: 1=x-config (bad), 0=o-config (good)
author: Peter Manzl
Class function: GetWheelVelocities
GetWheelVelocities(self, vDes)
class function description: calculate wheel velocities from Cartesian velocities
input:
vDes: desired velocity [vx, vy, omega] in the robot’s local framevx: platform translational velocity in local x directionvy: platform translational velocity in local y directionomega: platform rotational velocity around local z axis
output: w: wheel velocities w=[w0,w1,w2,w3]
author: Peter Manzl
Class function: GetCartesianVelocities
GetCartesianVelocities(self, w)
class function description: calculate Cartesian velocities from wheel velocities
input:
w: wheel velocities w=[w0,w1,w2,w3]
output: v: Cartesian velocity [vx, vy, omega] in the robot’s local frame vx: platform translational velocity in local x direction vy: platform translational velocity in local y direction omega: platform rotational velocity around local z axis
author: Peter Manzl
Relevant Examples (Ex) and TestModels (TM) with weblink to github: ROSMobileManipulator.py (Ex)