empriselab / RCareWorld

RCareWorld simulation environment for caregiving robots
https://emprise.cs.cornell.edu/rcareworld/
Apache License 2.0
98 stars 17 forks source link

Sponge Test Cases & Reading Stability #172

Closed thisjustin123 closed 1 week ago

thisjustin123 commented 1 week ago

Description:

Adds stability infrastructure and a test case to sponge force reading.

Changes Made:

  1. I noticed that, since python tends to run at a faster framerate (several times faster) than Unity, the python GetForce() can in some form "out-pace" the Unity sim, causing 0.0 force values to be read in between real force values. I added some simple buffering code on the python sponge underneath .GetForce() to account for this.
  2. Added a test case to test the above, ensuring that sponge readings across several frames are nonzero.
  3. Replaced the executable with additional Unity code that stabilizes and simplifies the sponge force reading. There was a lot of dead code before.

Test Plan

Adds a test case for testing force reading.

Also manually tested in @editor script:

image