Steering

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Steering

Felipe-44
Hello,

I'm facing a problem trying to simulate a carlike robot.

Some people had this problem too. But I have tried all solutions that I found,
with no sucess.

1)
First of all: Are simplecar.world and simplecar.model correct?
If I don't switch the value of body2 with body1 in hinge2 joints, I get the
following error running Gazebo:

ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in _dNormalize3()
[../../../include/ode/odemath.h]

I have already tried to compile ODE in different ways, like described here:
http://www.mail-archive.com/playerstage-gazebo@.../msg02242.html

What is the correct one ??

2)
If I switch body1 with body2, Gazebo runs, but the wheels seem strange. And if I
use the command setCarLike(), nothing happens and I get this message from Player:

warning : Unhandled message for driver device=16777343:6665:position2d:0
type=command subtype=3 len=16

Does anybody know this problem or has a solution ?

Thanks in advance.

Felipe.


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Steering

Jason Allen-5
On Oct 10, 2010, at 4:03 PM, Felipe wrote:

> Hello,
>
> I'm facing a problem trying to simulate a carlike robot.
>
> Some people had this problem too. But I have tried all solutions that I found,
> with no sucess.
>
> 1)
> First of all: Are simplecar.world and simplecar.model correct?
> If I don't switch the value of body2 with body1 in hinge2 joints, I get the
> following error running Gazebo:
>
> ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in _dNormalize3()
> [../../../include/ode/odemath.h]
>
> I have already tried to compile ODE in different ways, like described here:
> http://www.mail-archive.com/playerstage-gazebo@.../msg02242.html
>
> What is the correct one ??
>
> 2)
> If I switch body1 with body2, Gazebo runs, but the wheels seem strange. And if I
> use the command setCarLike(), nothing happens and I get this message from Player:
>
> warning : Unhandled message for driver device=16777343:6665:position2d:0
> type=command subtype=3 len=16
>
> Does anybody know this problem or has a solution ?
>
> Thanks in advance.
>
> Felipe.

Hello Felipe,

There are several issues with Gazebo, ODE, and wheeled vehicles, two of which you've noted.  My work was based on an earlier version of Gazebo (8533), so some of these issues may have been corrected in later revisions, but I suspect not.  Based on my research, I concluded:

1.  The ODE "bNormalizationResult" error is a result of the order of the bodies in some hinge2 joints in the packaged version of the simplecar model being reversed.  Unless you compile ODE with the "--disable-asserts" flag, a default install of Gazebo with a default install of ODE will fail when using the packaged version of the simplecar model.

2.  If you reverse the order of body declarations in some hinge2 joints, you have another problem.  The anchoroffset declaration does not do what the model files suggest it does.  Eliminate the anchoroffset declaration to increase stability.  If you don't, and if you reverse the order of body declarations in the ODE joints, the simplecar model will wobble which will cause instability at high speed.  This is probably a result of using a rotated unit cylinder as a wheel and how Gazebo implements the anchoroffset declaration.  When I was working with the simplecar model, the wheel would revolve around an axis perpendicular to the z-axis at a distance equal to the anchoroffset declaration when enough torque was applied, which is incorrect.

So, eliminate the anchoroffset declaration and another part of the problem goes away.

However, the packaged wheel classes cannot simulate a four-wheel drive vehicle, and the packaged controller does not implement Ackermann steering geometry.

If you want to simulate a four-wheel drive vehicle, you need to implement an improved wheel class.  You need fully powered front and rear wheels (i.e., drive torque is applied to each wheel).  The packaged simplecar model will only work in special cases for a rear-wheel drive car.  If you attempt to power the front wheels (give them a velocity), even after declaring them FULL wheels, they will effectively "bind" because of the way anchoroffset is implemented.

If you want to simulate a vehicle with Ackermann steering geometry, you need to implement an improved controller.  You get strange effects at high speed due to the way the packaged steering controller sets the angle of both the inner and outer steering wheels to the same angle, which is incorrect.  These angles have to be set independently for the model to properly simulate a vehicle at high speed.  At low speed it probably doesn't matter, and even at high speed the effect is an overall "flattening" of the path of the travel in a curve, which may not be a problem for you.

I posted improved controller and wheel classes to the playerstage-developers mailing list a few months ago which resolved these issues.  The improved controller also implements several features I used in my research, and which you probably don't need, but it may provide you with an alternative to the packaged controller, or at least an example of actual code used to simulate a four-wheel drive vehicle at high speed.

Finally, if you want to effectively simulate a vehicle, you need a realistic enough model.  The static stability factor of the model should approximate that of the real vehicle you are simulating.  Even then, the behavior of the model is not identical to the real vehicle.  You should expect rollover at high speed just like a real vehicle, if the kinetic friction between the wheels and the ground is high enough, but the onset of rollover may be delayed in simulation.

If you do look at the code I used to simulate a four-wheel drive vehicle and note a problem or problems, or make an improvement, I would appreciate it if you would let me know.

Regards,
J. C. Allen
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Steering

Felipe-44
In reply to this post by Felipe-44
Hi Allen!

Thanks a lot for your explanations!

I'm still trying to run Gazebo with your patch, but my robot is not moving
correctly yet. Maybe it's a problem with the world file.

I'm very busy now, but soon I will post again with my  comments.

Regards,

Felipe


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo