Skip to content

Commit

Permalink
chnage all three target angles as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioJerez committed Sep 20, 2024
1 parent ff7671c commit 3892f7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,7 @@ namespace ndAdvancedRobot
{
ndFloat32 angle = hinge->GetAngle();
ndFloat32 deltaAngle = actions[index] * ND_ACTION_SENSITIVITY;
//ndFloat32 targetAngle = ndAnglesAdd (angle, deltaAngle);
ndFloat32 targetAngle = angle + deltaAngle;
//ndAssert(ndAbs(targetAngle - ndAnglesAdd(angle, deltaAngle)) < 1.0e-3f);
hinge->SetTargetAngle(targetAngle);
};

Expand Down Expand Up @@ -835,7 +833,7 @@ namespace ndAdvancedRobot
m_robot->m_targetLocation.m_x = ndReal(ND_MIN_X_SPAND + ndRand() * (ND_MAX_X_SPAND - ND_MIN_X_SPAND));
m_robot->m_targetLocation.m_y = ndReal(ND_MIN_Y_SPAND + ndRand() * (ND_MAX_Y_SPAND - ND_MIN_Y_SPAND));

yaw = 0.0f;
//yaw = 0.0f;
//roll = 0.0f;
//pitch = 0.0f;
//m_robot->m_targetLocation.m_x = 0.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ namespace ndSimpleRobot
m_robot->m_x = ndReal(ND_MIN_X_SPAND + ndRand() * (ND_MAX_X_SPAND - ND_MIN_X_SPAND));
m_robot->m_y = ndReal(ND_MIN_Y_SPAND + ndRand() * (ND_MAX_Y_SPAND - ND_MIN_Y_SPAND));

m_robot->m_yaw = 0.0f;
//m_robot->m_yaw = 0.0f;
}

if (change)
Expand Down

0 comments on commit 3892f7c

Please sign in to comment.