Home | Tutorials | Wiki | Issues
Ask Your Question

Car with front wheel drive

asked 2017-11-17 06:04:11 -0600

Brosseau.F gravatar image

updated 2017-11-30 07:52:07 -0600

Hi everyone,

I'm trying to simulate a car with a front wheel drive (and a front steering system). The problem is that I am not able to keep the wanted speed when steering wheel are oriented at 0.7 rad.

I tried to control the wheel with setParam("vel"). I need to set a high value for the "fmax" parameter to follow the expected speed but it's unstable.

So I tried the SetVelocityTarget method but even with a high Proportionnal value. The speed is more stable but I still have the problem of the wanted speed not being respected. image description

In blue, the expected speed In green, the current speed In red, wanted steering In cyan, current steering

I tried to play with some model's parameters like mu, slip, etc ... but without success. I also had a look to the prius model but the only main difference is that the plugin is controlling the joint wheel with force instead of velocity.

I would like to know if someone already had this kind of problem and what are the parameters that I can change to solve this problem.

Thanks in advance.

Update : I tried another way as it was not possible for me to find why the simulated vehicle was slowing down in a turn.

So I just create a fake link (in my urdf file) which represents the kinematic center of the vehicle. And I tried to use SetLinearVel and SetAngularVel on this link to make my vehicle move (mu1 and mu2 on wheels are set to 0.0).

It works well for SetLinearVel but for SetAngularVel the value is not respected (i compare the value with the value retrieved by GetWorldAngularVel().z). It doesn't reach the expected value. Any ideas ?

edit retag flag offensive close merge delete


Hi, I'm one step behind you, trying to control my car using a cmd_vel topic (Twist message). Unfortunately, I cannot find any suitable plugin on Gazebo7. Can you give me some advice? Thank you very much

GuillaumeHauss gravatar imageGuillaumeHauss ( 2017-11-28 08:24:02 -0600 )edit

I started with the diff_drive_plugin but as I am using custom messages for the car command I have changed it a lot. Gazebo provide some tutorials and plugins available on the git repository. In simple case, it can work "out of the box", but it's more likely that you will take a plugin as a starting point and then work on it to make your project work. git repository for plugin : https://github.com/ros-simulation/gazebo_ros_pkgs/tree/kinetic-devel/gazebo_plugins

Brosseau.F gravatar imageBrosseau.F ( 2017-11-30 07:57:08 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-04 10:59:47 -0600

Brosseau.F gravatar image

I manage to make the workaround work.

In my plugin, I use the SetKinematic method on the fake link (only on the fake link) which represents the kinematic centre of my vehicle.

Commands sent to the vehicle are respected

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2017-11-17 06:04:11 -0600

Seen: 107 times

Last updated: Dec 04