## Mobile Wheeled Platform Directional Control Problem

Typically: "How do I... ", "How can I... " questions
ag_raed
Posts: 14
Joined: 04 Jul 2017, 14:54

### Mobile Wheeled Platform Directional Control Problem

Hello people,

I am having a Mobile platform that support a robotic arm which I would like to control the motion!
I am meant to set up the motion ( speed/direction .. ) in order to establish at the end the autonomous navigation and path planning model.

The mobile platform consists of 4 Wheels, each have a revolute joint in Force/Torque Mode.

I have written a function that from the wanted mobile platform linear/rotational speed, I derive each of the required wheel joint angular velocities as shows my code:

Code: Select all

-- Mobile Platform Inits
Linear_Velocity = 1 -- Vm in m/s
Rotational_Velocity = 0 -- Wm in °/s
Wheels_Diameter = 0.12 -- d in m
Wheels_Distance = 0.546 -- Distance between one left and right wheel in m
Time_Of_Motion = 5 -- Movie the mobile for 5 seconds

function MoveRobot(Vm,Wm,l,d)

Wr = (Vm + Wm*l/2)/d
Wl = (Vm - Wm*l/2)/d

simSetExplicitHandling(IK_Clean_Group,1)
simSetJointTargetVelocity(Joint_Wheel_1,Wr)
simSetJointTargetVelocity(Joint_Wheel_2,Wr)
simSetJointTargetVelocity(Joint_Wheel_3,Wl)
simSetJointTargetVelocity(Joint_Wheel_4,Wl)
simWait(Time_Of_Motion)
simSetJointTargetVelocity(Joint_Wheel_1,-Wr)
simSetJointTargetVelocity(Joint_Wheel_2,-Wr)
simSetJointTargetVelocity(Joint_Wheel_3,-Wl)
simSetJointTargetVelocity(Joint_Wheel_4,-Wl)
--simSetExplicitHandling(IK_Clean_Group,0)

end
Problem:

When I run the simulation, the mobile platform motion is inconsistent! the direction isn't linear even though the 4 wheels are spinning with the same angular velocities!
When I leave the simulation for 20 seconds, the mobile platform seems to follow a circular path instead of a linear path!

Anybody have an idea how to fix this problem? Is it about the thread execution time? After all, of course, it is clear that I want that the 4 wheels start spinning at the same time!

V Rep model:

Thanks for any kind of support!

coppelia
Posts: 6511
Joined: 14 Dec 2012, 00:25

### Re: Mobile Wheeled Platform Directional Control Problem

Hello,
have a look at your other post and my reply. Another factor that is probably influencing the trajectory of your mobile platform is probably that it is hyperstatic (4 contact point with the ground). This is sometimes problematic, since in simulation you don't have the natural compliance of links, as you would have in reality.
Make sure to also read this post for instance. Also, check out the demo model Models/examples/simple ackermann steering.ttm

Cheers

ag_raed
Posts: 14
Joined: 04 Jul 2017, 14:54

### Re: Mobile Wheeled Platform Directional Control Problem

Hello,

I have inspired myself of the SImple Steering Ackerman. ttm example model, I have then added 4 springs damper to each wheel, and for the front wheels, I have added a revolute joint for steering on each front wheel!

My goal here is to model the Swerve drive wheels and write their controller algorithm, so every wheel shall be modeled using 2 joints, one for rotating and one for steering!

I think I have done exactly like what has been done for the SImple Steering Ackerman. ttm, regarding stiffness/mass/inertia and applied thoroughly the design consideration 8 and 9 of Dynamic Simulation Design.

Problem:

- When I run the simulation and deactivate the script, the robot seems to lose stability and tilt on the in the front.
- I have tried to give to the robot a high mass ( 3000 kg instead of 200 kg ), but the robot still tilting to the front, but very high mass make the robot tilt to the back instead ...
- I don't want to stay looking for the proper mass to give to the robot in order to get stability because this isn't realistic!

Why does the robot lose stability and tilt? What do I miss !?

Scene file on:

https://files.fm/u/p49cpge5

Thanks for any help!

coppelia
Posts: 6511
Joined: 14 Dec 2012, 00:25

### Re: Mobile Wheeled Platform Directional Control Problem

With physics engines like Bullet or ODE, you often have to cheat by using non-realistic masses and/or inertias. Vortex handles this much better.

Cheers

ag_raed
Posts: 14
Joined: 04 Jul 2017, 14:54

### Re: Mobile Wheeled Platform Directional Control Problem

Hello and thanks for the reply!

The thing is that because of this, it became unpredictable for me to choose carefully the model mass/moment of Inertia in order to obtain realistic model!

It indeed worked for me to avoid the fall of the robotic arm! but when I changed the model with youBot wheels, the mobile vehicle doesn't move anymore! I have switched between many mass/moment of inertia configurations but the problem still the same!
I have copied the wheels of youBot and passed them to my model! the simulation work! but the vehicle isn't moving at all! even the wheels aren't turning properly!

I am actually using Newton engine during my simulations, until now .. it has done all the jobs properly I asked for!

Is there anything missing in my model!? I can't find a clue!

Thanks again for anybody giving ideas!

Scene model: