NUbots / robocup

The NUbot's RoboCup Code
GNU General Public License v3.0
34 stars 17 forks source link

New kick engine not working #16

Open Jade-Fountain opened 11 years ago

mmetcalfe commented 11 years ago

Was looking at this last night. Rather than the time variables + interpolation causing issues (tb, te, t), it turns out that 'length' was incorrect. KickPlayer's getLength method is returning something like 7e+33. I think there's a problem with the loading of the phases (before WalkingEngineKick::init is called).

(although WalkingEngineKick::init is called by KickPlayer::init, which is called by WalkingEngine::updateKickPlayer() - and I may have forgotten to make some changes to that method that were made to Jake's code on Tuesday)

Jade-Fountain commented 11 years ago

I had a quick look and discovered that in the config files two parameters were commented out (using '#'), so I uncommented them. I can't quite see what is going wrong with the length though.

mmetcalfe commented 11 years ago

Wrote a method to more clearly print the tracks + phases in a WalkingEngineKick on Wednesday. Used it yesterday to have a look at what the kicks looked like right after loading them. There were a bunch of values that looked uninitialized, all of which were Value::value. Adding an initializer to Value's constructor that set it's value to 0 fixed this, and changed the robots behaviour (it sort of forces both of its legs backwards simultaneously, or just straightens out and stops walking, just moving it's head). WalkingEngineKick::firstValue was one of the Values that was uninitialized, but when i had a look for where it's used, i only found the places where it's created and deleted. It appears to be entirely unused (even in the original B-Human codebase).


Note: the b-human code also doesn't initialize Value::value in Value's constructor. Note, also: I couldn't find any usages of Value::value at all when i had a quick look. There must be some i missed, though?

josiahw commented 11 years ago

Pushing this back to 2014 so we can have working kicks now.