Open BrightKnight02 opened 4 months ago
Wings now flap. The issue was that the spring constants for the pitching and stroke joints were not updating while the simulation was running. The stiffnesses were like 5Nm each, which the motor could not move. The stiffnesses now correctly update on the butterfly_wings
branch.
There is still a major issue I can see in the sim: the pitch joint is biased to the wrong location. I tried changing <spring_reference>
for the joint, but there seemed to be no meaningful difference to behavior for values between -50 and 50, mostly looking at values between -pi and pi.
Will run e2e test on checking spring stiffness's. I mean if the pitch joints were correct when there was no stroke input, that means the reference is most likely correct. Most likely in that case the aerodynamics could be affecting it. If this is during the simulation would be concert. Killing the simulator after the data generates might have unintended visual effects on the simulator before it fully closes.
For the correct updating on the joint stiffness's being taken in, are you able to open and link a PR to this issue?
When running full tests this week, I noticed that virtually no lift was being generated by the wing. When I went and zoomed into the simulator, the wings were vibrating at high frequency, probably the flapping frequency. Basically, there was little to no change on the stroke axis during simulation. When looking at the torque data, all of the applied torques looked reasonable for what we were trying to do, (all on the scale of 1-20mNm), but this seemed to not be nearly enough torque to get meaningful movement out of the wing even with a very low stroke joint stiffness.
I'm wondering if gazebo isn't interpreting the torques from ROS correctly and for some reason interpreting the inputs as like mNm rather than Nm. This may make sense if internally gazebo rescales itself based on the size of the components sent in to it, but I feel like this isn't the case. Debugging needs to happen.