The following video demonstrates a simulated vertical jump of the robot in a custom Python program I wrote. Center of mass is displayed by the black and yellow circle at mid-torso level, and the sizes are all exactly as planned.
Ignore the big block actuators shown on the leg... they were from an old design that will not be in the final leg... I'll update the simulator program later on.
A little bit of info on the simulation:
All joint info is calculated by a function which only takes the desired "charge" distance... 0m would be right at the peak of the jump when the leg is fully extended, and -0.70m is the charge amount when the robot is fully compressed. This function is likely to change later on to find the most optimal path/config for force production.
Input parameters are the following during the calculations at each step:
- force_scale: one leg is simulated, but the robot has 2 legs, so I can multiply the final output force by the one leg and simulate having both legs.
- motor_kv: rpm/v of the motors
- battery_voltage: voltage of the battery or power supply
- max_current: max current in amps to apply to all motors in the leg
- max_joint_torque: limits on joint output torque in Nm
The torque on the hip, knee, and ankle are all calculated based on motor_kv, battery_voltage, max_current, and the angular velocity of the joint to acount for the motor's torque/speed curve.
I'm using a linear torque speed curve where the motor can output 100% torque at 0rpm, and 0% torque at the no-load rpm.
Motor reduction ratios are as follows:
Hip: Constant 1:15 ratio
Knee: Rolling joint that varies according to:
This produces a non-linear reduction ratio ranging from 1:11.3 at the ends of the knee's travel, and 1:16 when the upper and lower legs are 90° apart. Theta is the internal pulley angles, and is offset 90°, so the knee ranges from -90 to +90 rather than 0 to -180.
Ankle: Rolling joint that varies according to:
This produces a non-linear reduction ratio ranging from 1:12.7 at the ends of the ankle's travel (+/-60°), and 1:18 when the ankle is at neutral position.
Once all joint torque's are calculated, the torques are transformed to normal force on the ground based on the current position. My joint info function produces results where the center of mass and ball of the foot are always at x=0, so using the following equation is all that is necessary to calculate normal force produced by each joint.
However, because all of these forces are likely to be different, I just take the minimum, and use that as the applied force on the ground.
In the end, the robot will determine motor torques to apply for a given ground reaction force, but this seemed like a good way to simulate the force production for given torques without having any more advanced joint angle functions where all joints produce the correct torques to stay on the desired path while also pushing off the ground with a desired force.
Because all of my actuators are cable-driven, I also calculate the tension acting on each cable system, and a safety factor so I can make sure I don't go outside any limits and snap cables that are too weak. (I decided on 1mm 7x7 stainless steel cable that has a supposed breaking strength of 140lbs or 622N, but I'll try to keep a safety factor of at least 2)
Taking into account the force pushing down on the robot, and the normal force on the ground, the net force is applied to the robot using simple Newtonian physics with F = ma. Each step then just applies the acceleration to the velocity, and integrates position according to velocity and acceleration during the time step (0.001s).
At the moment the robot disconnects from the ground, the current velocity is projected to find the expected jump height where the current kinetic energy must match the gravitational potential energy at the peak of the jump. The calculation to determine height (m) from velocity (m/s) ends up being:
I also just added calculations for mechanical power and the input current on the supply so I know what my requirements on batteries are.
Work can be calculated according to the work-energy theorem stating that total work done on the system is equal to the change in kinetic energy, and then converted to power by dividing by the time the jump actually took while pushing off the ground:
Info for the video:
- Major grid lines show 1m steps, and minor grid lines show 0.2m steps
- Net force vector is displayed on the cg, though scale is 1m = 500N
- Current velocity vector is displayed on the left at x=-1m and is scaled to 1m = 10m/s
- Full body simulated as a point mass of 25kg at the mid-torso point shown
- Motors are 100kv
- Battery voltage is 48V
- Max motor current: 50A
- ODrive can supply a max of 120A to each motor with good enough cooling, but these jumps are for a very short period of time so I have no problem with increasing this higher... ;)
- Total force multiplied by 2 to simulate both legs working together
- Joints limited to 100Nm, but never actually reached limits
- Max Normal Force: 660.70N
- Force due to gravity is 245.25N, so this is 2.69x the body weight
- Max torque: 61.20Nm
- Max cable tension: 204N
- Min Safety factor: 3.05
- Max torque: 60.78Nm
- Max cable tension: 150N
- Min Safety factor: 4.12
- Max torque: 62.63Nm
- Max cable tension: 248N
- Min Safety factor: 2.51
- First stage of jump pushing off the ground lasted 0.3s
- Final velocity was 4.487m/s
- Mechanical Power: 838.85W
- Expected height: 1.026m
- Like stated before, because I'm not close to the current limit, this can also increase significantly... I'm at my goal of >1m jump, but it should be able to go well beyond that if nothing breaks ;)
And finally the video