srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
8 stars 2 forks source link

Add pressure-sensing fingers #372

Closed Adimote closed 1 year ago

Adimote commented 1 year ago

Adds fingers that fold down and lift up the front of the robot, thus lifting up a cube. The ends of the fingers are pressure sensors, in Arduino analog pins A6 (notably these don't exist on real arduinos), which then return a number proportional to the weight of the robot plus the object being carried.

See Video Demo: https://user-images.githubusercontent.com/2551763/216791604-d9f9adf9-2754-49e4-b0d4-ab22b4c83f3e.mp4

PeterJCLaw commented 1 year ago

Numbers I'm seeing:

Given that we're expecting the Gold tokens to weigh about the same as a Silver, this may not be representative.

WillB97 commented 1 year ago

I get the error:

WARNING: DEF ROBOT-0 Robot_2022 (PROTO) > DEF FINGERS Transform > DEF FINGER_HINGE HingeJoint > Solid > TouchSensor: Webots has detected that this solid is light and oblong according to its inertia matrix. This belongs in the physics edge cases, and can imply weird physical results. Increasing the weight of the object or reducing its eccentricity are recommended.

Adimote commented 1 year ago

I get the error:

WARNING: DEF ROBOT-0 Robot_2022 (PROTO) > DEF FINGERS Transform > DEF FINGER_HINGE HingeJoint > Solid > TouchSensor: Webots has detected that this solid is light and oblong according to its inertia matrix. This belongs in the physics edge cases, and can imply weird physical results. Increasing the weight of the object or reducing its eccentricity are recommended.

now fixed, just had to add 0.05kg :)

Adimote commented 1 year ago

I've now split the fingers into two separate servos/pressure sensors. It looks like they normally measure 0.5* the value when they were one, so students can just add them together to get the total pressure.

Also it means I no longer need to tips of the fingers to be 0.2kg, they're now neglegibly light, so the robot is 0.2kg lighter.