Has anyone here built the Simulate worm brain project for GoPiGo and had it working well?
I have just modified the motor control from GoPiGo to BrickPi but although the worm does move around it doesn’t seem to do what I expected. The main surprise is that when it gets nose touch it doesn’t back up but can more just accelerate into the wall. Another surprise is that it just slowly wiggles forward then every now and then it shoots forward super fast then stops.
Are others that have built this project find the same behavior?
It worked in the video. It is most likely your code, must have slipped up somewhere. For example you said go forward instead of backwards. Do it all the time.
The code atm is the same except changed GoPiGo motor commands to BrickPi motor commands. The problem seems to be the way the worm brain muscle outputs have been implemented intoi wheel commands. The code just accumulates up all the muscle contractions on 1 side of the worm and sends that result to 1 wheel then does the same on the other side. The locomotion of the worms works quite different in the real world. Muscles only work by contraction or relaxation, so for all worm locomotion whether forward or backwards the worm brain will output muscle contractions it is just a case of the muscle contractions r in a different order. So when the worm brain wants to back up it contacts muscles but if we are driving the robot by accumulating up muscle contracts then we will be driving wheels forward when the worm brain wants to go backwards.