increase masses and control params
This commit is contained in:
parent
68449f2b6e
commit
9d82ddbf09
3 changed files with 9 additions and 9 deletions
|
@ -44,7 +44,7 @@ fn spawn_bike(
|
||||||
SleepingDisabled,
|
SleepingDisabled,
|
||||||
CyberBikeBody,
|
CyberBikeBody,
|
||||||
CatControllerState::default(),
|
CatControllerState::default(),
|
||||||
ColliderDensity(0.4),
|
ColliderDensity(20.0),
|
||||||
LinearDamping(0.1),
|
LinearDamping(0.1),
|
||||||
AngularDamping(2.0),
|
AngularDamping(2.0),
|
||||||
LinearVelocity::ZERO,
|
LinearVelocity::ZERO,
|
||||||
|
@ -163,7 +163,7 @@ fn wheels_helper(
|
||||||
Name::new("hub"),
|
Name::new("hub"),
|
||||||
SpatialBundle::from_transform(xform),
|
SpatialBundle::from_transform(xform),
|
||||||
RigidBody::Dynamic,
|
RigidBody::Dynamic,
|
||||||
MassPropertiesBundle::new_computed(&Collider::sphere(0.1), 8.0),
|
MassPropertiesBundle::new_computed(&Collider::sphere(0.1), 200.0),
|
||||||
))
|
))
|
||||||
.with_children(|parent| {
|
.with_children(|parent| {
|
||||||
let mesh: Mesh = Sphere::new(0.1).into();
|
let mesh: Mesh = Sphere::new(0.1).into();
|
||||||
|
@ -182,9 +182,9 @@ fn wheels_helper(
|
||||||
CyberWheel,
|
CyberWheel,
|
||||||
RigidBody::Dynamic,
|
RigidBody::Dynamic,
|
||||||
collider,
|
collider,
|
||||||
Friction::new(3.0).with_dynamic_coefficient(0.9),
|
Friction::new(0.9).with_dynamic_coefficient(0.6),
|
||||||
Restitution::new(0.1),
|
Restitution::new(0.1),
|
||||||
ColliderDensity(0.1),
|
ColliderDensity(30.0),
|
||||||
CollisionLayers::from_bits(2, 2),
|
CollisionLayers::from_bits(2, 2),
|
||||||
ExternalTorque::ZERO.with_persistence(false),
|
ExternalTorque::ZERO.with_persistence(false),
|
||||||
CollisionMargin(0.05),
|
CollisionMargin(0.05),
|
||||||
|
|
|
@ -47,13 +47,13 @@ fn ground_and_light(
|
||||||
Collider::cuboid(50.0, 0.5, 50.0),
|
Collider::cuboid(50.0, 0.5, 50.0),
|
||||||
CollisionMargin(0.1),
|
CollisionMargin(0.1),
|
||||||
ColliderDensity(1000.0),
|
ColliderDensity(1000.0),
|
||||||
Friction::new(3.0),
|
Friction::new(0.9),
|
||||||
))
|
))
|
||||||
.with_children(|p| {
|
.with_children(|p| {
|
||||||
p.spawn(PbrBundle {
|
p.spawn(PbrBundle {
|
||||||
mesh: meshes.add(Plane3d::default().mesh().size(50.0, 50.0)),
|
mesh: meshes.add(Plane3d::default().mesh().size(50.0, 50.0)),
|
||||||
material: materials.add(Color::from(SILVER)),
|
material: materials.add(Color::from(SILVER)),
|
||||||
transform: Transform::from_xyz(0.0, 0.5, 0.0),
|
transform: Transform::from_xyz(0.0, 1.0, 0.0),
|
||||||
..default()
|
..default()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,9 +18,9 @@ pub struct CatControllerSettings {
|
||||||
impl Default for CatControllerSettings {
|
impl Default for CatControllerSettings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
kp: 20.0,
|
kp: 950.0,
|
||||||
kd: 2.0,
|
kd: 10.0,
|
||||||
ki: 0.7,
|
ki: 50.0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue