Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Wheeled robot model

Wheeled robot model

Hi!

First of all, I have to say that I am a new Modelica user. As part of my PhD (not directly related to modeling and simulation) I have to develop a model of the robot we have. It is a four-wheeled ground robot that can be seen here:
https://www.cifasis-conicet.gov.ar/robot/lib/exe/fetch.php?media=robot_sensors_coordinate_systems.png.
Even though we have already made a simple model that is useful for certain things, the idea is to have a more detailed one (as a long term goal, we do not discard integrating it with Gazebo to simulate the behavior of different sensors like camera, IMU, etc.). To do so, I am using the MultiBody library (tried to use MotorcycleDynamics but it was impossible to make it work for me).

I started by modifying the component Modelica.Mechanics.MultiBody.Joints.RollingWheel (see Robot.RollingWheel) to allow slippage and ground penetration because that is necessary for our robot. Then, after experimenting with some bike-like models and struggling a lot, I could make the Robot.FourWheels hardly work. With "hardly" I mean that it was needed to reduce the tolerance and increase the amount of intervals in order to make the simulation work. This is part of the visualization of a simulation:
https://drive.google.com/file/d/1h_kzxepUKyWt6yDicmMcML3mQsKamvh3/view?usp=sharing
Of course, the model Robot.FourWheels is just a bunch of connected components upon which it is impossible to scale. Because of that, I started developing a kind of library, following the MotorcycleDynamics approach, let's say. There, I just could not make it work the model Rodes.Examples.BasicRobot, which is supposed to be the same as Robot.FourWheels. I reached up to the point in which the OMC generates the C files for the model but apparently it has some convergence problems during the initialization.

My doctoral advisor has told me to check the initial conditions and the state selection and I did but could not make it work. Digging into the generated C files and the comments they have on theirselves I have found some strange things (for me) and I do not really know how to go on. I could see that the state selection does not exactly follows what I set (but I guess it could be fine since I do not understand how OMC internally works). Furthermore, something that caught the attention of my doctoral advisor was the fact that OMC is using dynamic state selection for the simulation. I have read something about that but I cannot avoid it. Moreover, the model Rodes.Examples.BasicRobot has different candidate variables for one of the two statesets with respect to Robot.FourWheels.

Other thing that I saw was that rearranging the components declarations in Robot.FourWheels (see Robot.FourWheelsRearranged) can significantly change the simulation results (the initial conditions change). Another strange thing was that when I set to zero the torques to turn the robot to the right, the simulation cannot "find the root" after 1.16 s and the simulation terminates (see Robot.FourWheelsNoTurning). Could you give me some insights about how to avoid these problems and the dynamic state selection?

The idea is to publish the models but until it is everything working, I prefer to keep them private. That is why I have send the files to OpenModelica@ida.liu.se following this: https://openmodelica.org/forum/default- … em#p10000. Anyway, if you cannot check the model, I can share all the outputs that I receive from the OMEdit GUI. I can even do some tests if you ask me so.

I am using Ubuntu 18.04 with OpenModelica 1.16.2. And for all the simulations I had to use the old frontend.

Please, I really need some help. It has been a long time working on this to just let it unfinished. Thank you.

There are 0 guests and 0 other users also viewing this topic