Robot can't turn with four motorized wheels
Hello everyone, I'm a teacher in a computer science school and students have to work on an application to control a Wifibot v3 robot (https://www.wifibot.com/). To help them work at home, I want to create a model of this robot in gazebo.
I've made a first version of the robot that integrates enough functionnalities. However, I got an issue when trying to make the robot turn.
The robot has four wheels and each wheel is motorized. When I try to implement it in Gazebo, the robot can't turn or just shake depending on parameters tuning.
A workaround I've found is to remove motorization on two wheels, the robot can turn but it doesn't follow the robot structure.
This is a simplified sdf model : C:\fakepath\model_simplified.sdf.
The plugin has several functionnalities, the code that manages the wheel movement is this one :
void WifibotPlugin::SetMove(int vl, int vr)
{
this->pid = common::PID(0.5, 0.9, 0);
SetSpeed(this->roue_fl, vl);
// SetSpeed(this->roue_bl, vl);
SetSpeed(this->roue_fr, vr);
// SetSpeed(this->roue_bl, vr);
}
Asked by Patisson on 2021-12-31 05:48:15 UTC
Answers
You don't have any parameters set in the model you shared. Check the specification for the available parameters (they are under collision/surface/{friction,contact,...}). Start playing with mu, mu2, and minDepth. Also, you probably need to define inertias.
Alternatively, google for another skid steer simulation for reference. If they are not using the planar move plugin, they have probably tuned the wheels properly.
Asked by nlamprian on 2022-01-02 20:09:25 UTC
Comments
Not sure if it's because the given sdf file is simplified, but I would suggest the mass and inertia can sometimes affect the dynamics of the robot quite significantly. Wheel collision can also have some effects (especially on the real-time factor, if it matters).
There is an example of car model (car_demo) by OSRF. The front wheels can be steered, so the model may not be exactly the same as your robot, but some parts may be useful. Adding simple suspension to the wheels can also improve the traction of the wheels.
Asked by Veerachart on 2022-01-03 21:55:16 UTC
Comments