{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/261","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/261/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/261/events","html_url":"https://github.com/ev3dev/ev3dev/issues/261","id":55581068,"number":261,"title":"Continuously varying the motor position without oscillation","user":{"login":"dsharlet","id":2181376,"avatar_url":"https://avatars.githubusercontent.com/u/2181376?v=3","gravatar_id":"","url":"https://api.github.com/users/dsharlet","html_url":"https://github.com/dsharlet","followers_url":"https://api.github.com/users/dsharlet/followers","following_url":"https://api.github.com/users/dsharlet/following{/other_user}","gists_url":"https://api.github.com/users/dsharlet/gists{/gist_id}","starred_url":"https://api.github.com/users/dsharlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsharlet/subscriptions","organizations_url":"https://api.github.com/users/dsharlet/orgs","repos_url":"https://api.github.com/users/dsharlet/repos","events_url":"https://api.github.com/users/dsharlet/events{/privacy}","received_events_url":"https://api.github.com/users/dsharlet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ev3dev/ev3dev/labels/motors","name":"motors","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-27T06:28:04Z","updated_at":"2015-01-29T09:10:44Z","closed_at":"2015-01-29T09:10:44Z","body":"Has anyone managed to successfully vary the position continuously over time without oscillation from the motors? If so, how?\r\n\r\nI've been attempting to do this without much success. I've tried using regulation mode and tuning the built in PID parameters. I've also tried building my own controllers, but it is hard to get low enough latency to build a good controller. \r\n\r\nAt least with the stock PID parameters, I've found that even simply repeatedly setting the same setpoint will cause pretty serious oscillation/instability in the motor position. This almost seems like a bug.\r\n\r\nWhile on the subject, what is 'K' in the controller parameters? It seems to basically do nothing, unless it is set to exactly 0, in which case the motors simply do not generate any torque at all. "},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/comments/71991823","html_url":"https://github.com/ev3dev/ev3dev/issues/261#issuecomment-71991823","issue_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/261","id":71991823,"user":{"login":"dsharlet","id":2181376,"avatar_url":"https://avatars.githubusercontent.com/u/2181376?v=3","gravatar_id":"","url":"https://api.github.com/users/dsharlet","html_url":"https://github.com/dsharlet","followers_url":"https://api.github.com/users/dsharlet/followers","following_url":"https://api.github.com/users/dsharlet/following{/other_user}","gists_url":"https://api.github.com/users/dsharlet/gists{/gist_id}","starred_url":"https://api.github.com/users/dsharlet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsharlet/subscriptions","organizations_url":"https://api.github.com/users/dsharlet/orgs","repos_url":"https://api.github.com/users/dsharlet/repos","events_url":"https://api.github.com/users/dsharlet/events{/privacy}","received_events_url":"https://api.github.com/users/dsharlet/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T09:10:44Z","updated_at":"2015-01-29T09:10:44Z","body":"A custom PID controller totally works. I'm not sure what I did wrong last time I tried to do this, I must have set one of the motor settings incorrectly (it was like the first thing I tried to do with ev3dev...).\r\n\r\nAnyways, the movement of my robot is now nice and smooth. Here's a video of the otherwise same robot (the same stereo vision code): https://www.youtube.com/watch?v=jHaB2zdfhHg\r\n\r\nThanks for all the help and sorry to lead everyone on a bit of a wild goose chase there."}}