0
$\begingroup$

Gazebo Answers logo

I am interested in creating a Pacejka Tire model in Gazebo and during the past several months I have been looking through many examples and I have not seen any examples of vehicles with more complicated tire models. Is it difficult to implement something like this in Gazebo? If it is a straightforward thing, how would I go about doing it? Would I need to write a plugin?

Previously I looked into using the validated vehicle models in Chrono in Gazebo using this code, but was advised against it as Chrono is moving towards developing their own virtual environment and sensor models etc. But, since these sensor models and the environment does not seem as mature as Gazebo and does not integrate with ROS, I decided to stick with Gazebo.

I have been bouncing around a lot between using Chrono, Gazebo, and now I am toying with actually using ANVEL to develop an AV simulation environment. Ultimately as always it is a trade-off and for me I want mature software that is easy to use, but model fidelity is also important to me.

I am leaning towards Gazebo because it is mature, open-source, and well developed. But I am concerned that, while way that Gazebo defines the model is very straightforward, it seems rigid. In that if I wanted to add, for instance the Pacejka tire model it may be difficult.

At the end of the day, what I am wondering in this question is, how flexible is Gazebo in adding a (possibly external) model of some physical phenomena? For instance, if I have some C++ code that calculates tire force, can I inject the output of this easily back into Gazebo?


Originally posted by huckl3b3rry87 on Gazebo Answers with karma: 13 on 2017-10-23

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Is it difficult to implement something like this in Gazebo? If it is a straightforward thing, how would I go about doing it? Would I need to write a plugin?

You might be able to get some of your desired behavior by using directional friction & slip. Yes, I think you'll need to write a plugin.

At the end of the day, what I am wondering in this question is, how flexible is Gazebo in adding a (possibly external) model of some physical phenomena? For instance, if I have some C++ code that calculates tire force, can I inject the output of this easily back into Gazebo?

Writing a plugin is fairly straightforward.
Check out this tutorial (http://gazebosim.org/tutorials?cat=guided_i&tut=guided_i5) for the basics.

You'll want to determine what physical measurements you'll need for your empirical formula (torque, velocity, etc) and make sure that Gazebo generates those values. Then you'll need to write a plugin that pulls those measurements from the Gazebo physics engine, plugs them into your formula, and then applies the calculated tire forces back to the simulation environment.

You may be interested in this paper (http://www.cim.mcgill.ca/~dmeger/ICRA2015_GaitLearning/icra2015_gait_learning.pdf).

The authors used Gazebo plugins to implement empirical equations for a swimming robot's buoyancy, drag, and flipper thrust underwater. Here's their ROSCON 2017 presentation: [slides] [video]

At the end of the day, what I am wondering in this question is, how flexible is Gazebo in adding a (possibly external) model of some physical phenomena? For instance, if I have some C++ code that calculates tire force, can I inject the output of this easily back into Gazebo?

I think that this would be as "simple" as adding this C++ code to your plugin's OnUpdate/Update function


Originally posted by josephcoombe with karma: 609 on 2017-10-23

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by huckl3b3rry87 on 2017-10-23:
Thank you very very much, this is extremely helpful!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.