Skip to content

Commit

Permalink
made new signal zero by when on ground, that way has zero effect on c…
Browse files Browse the repository at this point in the history
…urrent controller. sor off. (wip)
  • Loading branch information
Julio Jerez committed Feb 19, 2024
1 parent 754d21c commit a1e11ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions newton-4.00/applications/ndSandbox/demos/ndUnicycle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace ndUnicycle
m_topBoxAngle,
m_topBoxOmega,
m_jointAngle,
m_hasWheelContact,
m_isOnAir,
m_stateSize
};

Expand Down Expand Up @@ -320,7 +320,7 @@ namespace ndUnicycle
state[m_topBoxAngle] = ndReal(angle);
state[m_topBoxOmega] = ndReal(omega.m_z);
state[m_jointAngle] = ndReal(m_legJoint->GetAngle() / ND_MAX_LEG_JOINT_ANGLE);
state[m_hasWheelContact] = HasSupportContact() ? ndReal(1.0f) : ndReal(0.0f);
state[m_isOnAir] = HasSupportContact() ? ndReal(0.0f) : ndReal(1.0f);
}

void ApplyActions(ndBrainFloat* const actions) const
Expand Down

0 comments on commit a1e11ee

Please sign in to comment.