LinearAlgebra updates
This commit is contained in:
parent
6ee5bc44f8
commit
2b6912a2c9
@ -84,7 +84,7 @@ Polar DifferentialDrive::GetVelocity() {
|
||||
|
||||
float direction = speed >= 0 ? 0.0F : 180.0F;
|
||||
float magnitude = fabsf(speed);
|
||||
Polar velocity = Polar(direction, magnitude);
|
||||
Polar velocity = Polar(magnitude, direction); // Polar(direction, magnitude);
|
||||
return velocity;
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 64ca76830c81974eaac9b0d7edad631522a14b12
|
||||
Subproject commit 791bd78e2909065f2f7e3bd47dbf3fce14c4286a
|
@ -104,7 +104,7 @@ void NetworkPerception::ReceivePoseMsg(unsigned char *data, Roboid *roboid) {
|
||||
float angle =
|
||||
Vector3::SignedAngle(Vector3::forward, localPosition, Vector3::up);
|
||||
|
||||
Polar position = Polar(angle, distance);
|
||||
Polar position = Polar(distance, angle); // Polar(angle, distance);
|
||||
/*
|
||||
Vector2 worldPosition2D = Vector2(worldPosition);
|
||||
|
||||
|
@ -478,14 +478,16 @@ void Perception::Update(float currentTimeMs) {
|
||||
float distance = distanceSensor->GetDistance();
|
||||
if (distance >= 0) {
|
||||
float angle = sensor->position.angle;
|
||||
Polar position = Polar(angle, distance);
|
||||
// Polar position = Polar(angle, distance);
|
||||
Polar position = Polar(distance, angle);
|
||||
// AddTrackedObject(distanceSensor, position);
|
||||
}
|
||||
|
||||
} else if (sensor->type == Thing::SwitchType) {
|
||||
Switch *switchSensor = (Switch *)sensor;
|
||||
if (switchSensor->IsOn()) {
|
||||
Polar position = Polar(sensor->position.angle, nearbyDistance);
|
||||
// Polar position = Polar(sensor->position.angle, nearbyDistance);
|
||||
Polar position = Polar(nearbyDistance, sensor->position.angle);
|
||||
// AddTrackedObject(switchSensor, position);
|
||||
}
|
||||
} else {
|
||||
|
@ -37,6 +37,6 @@ void Propulsion::SetTwistSpeed(Vector3 linear, float yaw, float pitch,
|
||||
|
||||
void Propulsion::SetVelocity(Polar velocity) {}
|
||||
|
||||
Polar Propulsion::GetVelocity() { return Polar(0, 0); }
|
||||
Polar Propulsion::GetVelocity() { return Polar::zero; }
|
||||
|
||||
float Propulsion::GetAngularVelocity() { return 0; }
|
Loading…
x
Reference in New Issue
Block a user