Raúl
Moderator
 Moderator
| Posts: 444 |  | Karma: 6
|
Re:Como insertar una nueva rueda loca a un objeto - 2008/10/22 16:59
Hola, puedes echar un vistazo en el fichero entities.cs cómo está creado el Pioneer3DX, pues se trata de un differential drive con una rueda de giro libre, que creo que es lo que quieres hacer tú. Fíjate que en el código a la rueda de giro libre en inglés se le denomina CASTER WHEEL.
Basicamente es esto:
| Code: | if (_casterWheelShape == null)
{
// add caster wheel as a basic sphere shape
CasterWheelShape = new SphereShape(
new SphereShapeProperties("rear wheel", 0.001f,
new Pose(CASTER_WHEEL_POSITION), CASTER_WHEEL_RADIUS));
CasterWheelShape.State.Name = "Caster wheel";
// a fixed caster wheel has high friction when moving laterely, but low friction when it moves
along the
// body axis its aligned with. We use anisotropic friction to model this
CasterWheelShape.State.Material = new MaterialProperties("small friction with anisotropy", 0.5f, 0.5f, 1);
CasterWheelShape.State.Material.Advanced = new MaterialAdvancedProperties();
CasterWheelShape.State.Material.Advanced.AnisotropicDynamicFriction = 0.3f;
CasterWheelShape.State.Material.Advanced.AnisotropicStaticFriction = 0.4f;
CasterWheelShape.State.Material.Advanced.AnisotropyDirection = new Vector3(0, 0, 1);
}
base.State.PhysicsPrimitives.Add(_casterWheelShape);
|
Raúl Arrabales Moreno. conscious-robots.com/raul |