NeLy-EPFL / flygym

Simulating embodied sensorimotor control with NeuroMechFly v2
https://neuromechfly.org/
Apache License 2.0
26 stars 7 forks source link

add default contact sensors #206

Closed sibocw closed 3 months ago

sibocw commented 3 months ago

Description

We have a lot of code that has something like this:

contact_sensor_placements = [
    f"{leg}{segment}"
    for leg in ["LF", "LM", "LH", "RF", "RM", "RH"]
    for segment in ["Tibia", "Tarsus1", "Tarsus2", "Tarsus3", "Tarsus4", "Tarsus5"]
]

fly = HybridTurningFly(
    contact_sensor_placements=contact_sensor_placements,
    ...
)

It's nice to add this hardcoded contact_sensor_placements as flygym.preprogrammed.default_leg_sensor_placements.

Does this address any currently open issues?

No

sibocw commented 3 months ago

Note: A test failed specifically on MacOS 13. This test tries to fit a path integration model on only 1 second of simulated data and asserts that we have a r2 score of at least 0.5. I don't know why it started failing here but made the simulation 2 seconds to make the r2 a bit more reliable (76dc981).