Hacker News new | past | comments | ask | show | jobs | submit login
Bicycle Control Design in Python (plot.ly)
77 points by sytelus on July 15, 2018 | hide | past | favorite | 27 comments



This is a really really good post because the ideas used to solve this problem are applicable in almost every control theory problem which is one of those tools all good engineers should have in their backpocket because they're so versatile.

Still, at the time of writing all 10 previous comments are about plotly. Talk about missing the forest for the trees.

EDIT: I also seem to remember that a couple of months ago there was a youtube video posted here on HN about a bycicle-like contraption that allowed you to simulate an environment of zero friction. The comments under that post quickly became a flame war on the subject of countersteering. To those people who might be reading this, I doubly encourage to read this post and make a good faith attempt to understand it.


Do you mean zero gravity? The "bricycle": https://www.tandfonline.com/doi/abs/10.1080/00423114.2014.95...


That's the thing I was thinking about.

And yes, zero gravity, thank you.


While most can learn to ride a bicycle with minimal effort, it turns out the control of an idealized bicycle is actually quite complex and has a storied history. For a brief rundown (and insight into the complexity of the problem), scan through this presentation (pdf warning): http://www.control.lth.se/media/Staff/KarlJohanAstrom/Lectur...


"Feedback Systems, An Introduction for Scientists and Engineers" by the same author, Karl Johan Astrom (and Richard Murray) is a readable introduction on how the basic equations come together. Think of it as the innate "language of motion" that is wired in our brain that allows us to bike and walk so effortlessly. Thanks to Newton and friends for their discovery.


Hey, you seem to know a bit about the subject. What is the reason for the name "feedback systems"? (I understand a name is just a name, but the fact that I don't understand why that name was picked suggests to me that I'm missing something.)

EDIT: From that book: The term feedback refers to a situation in which two (or more) dynamical systems are connected together such that each system influences the other and their dynamics are thus strongly coupled." So.... the whole system is governed by a system of coupled differencial equations...? This is so broad it's almost meaningless.


A feedback control system, aka a "closed-loop" control system is one in which the actual output is sampled and compared to the desired output and the "controller" adjusts the system gain to reduce the error (difference between actual and desired outputs).

i.e., a portion of the output is "fed back" to the input to obtain that difference between actual and desired output.

Does that help?


Newton and friends had nothing to do with discovery of feedback controls :)


Well, differential equations makes control theory. Write a system of differential equations, come up with an iterative scheme to solve it and there you begin to see the idea of feedback.


Actually the control of the bicycle is surprisingly simple regarding how complex the vehicle dynamics are. A simple proportional feedback control based on a roll rate measurement can balance a bicycle, causing it to always steer into the fall.


Huh, I wonder if I can use a servo and an accelerometer to make an actual remote-controlled bicycle with this.


You can. I'd recommend a rate gyro instead of an accelerometer though.


Cool idea - too bad they used plotly, can’t see the plots!


Even the plotly website can't use plotly. the irony.


Yeah not a great advertisement for plotly


Seems that plotly throttles # of views per plot if the user doesn't pay for an upgrade.


Had no problem. Even on mobile FF with adblock active.


Here I'm getting a "This embedded plot has reached the maximum allowable views given the owner's current subscription"


Oh man, here I thought that surely whatever needed for plotly is self-hosted.

Seems like a decent thing, first impression (it works for me) was that this might actually be one of the very few things that javascript seems to improve upon the old web.

But I can't fathom how anyone could pay to make their website useless.

Do an automatic to static image failover and also provide an option at the top of the page to do this manually if it for some reason doesn't work (or isn't worth it / making the site slow). Also self host it. Anything less and you couldn't pay me to use it.

EDIT: Actually, it should probably be static image first and then "click to make dynamic" for the rare cases when you actually would want it to be.


Plotly's got one great feature: Dash apps, that's it.

It's true bokeh can take a bit of work to get it to look like plotly, but I don't need to pay for it.

I think that's a more 'scalable' feature of bokeh.

It's just too damn bad that bokeh doesn't have something like Dash. I've tried Holoviews, bokeh apps, they just need so much more work. And its integration with flask/Django is just not there yet.

Hopefully future versions of bokeh will get this fixed.


I use plotly quite extensively. Never needed to pay a dime. Never even needed an account (until I wanted to use their forum).

So to me your critique isn't quite understandable.


There appears to be some volume limits for the free tier, that might explain the difference in experience.

Right now I get the following for most of the graphics on the linked page:

"This embedded plot has reached the maximum allowable views given the owner's current subscription.

Please visit the subscriptions page to learn more about upgrading."


Yes I'm aware its got the MIT licence [0].

I should have made myself clearer, I was referring to this particular example, where the OP's articles plots don't render anymore.

I know that's how they make money, by making it possible to share plots (or make them accessible) through their own platform.

One could have just* self hosted them with bokeh.

Oh well, to each their own. Maybe they just wanted to show the cool thing, rather than having to worry about all the devops stuff.

My gripe was pedantic, I know.

[0]https://github.com/plotly/plotly.js/blob/master/LICENSE

* with a non trivial amount of effort.


Plot Twist! Payment required...


Plotly has been on my list of new tech to investigate, but this isn't a great advert for their service...


I used plotly extensively for a year. I enjoyed their python API, but the product side is really bad. I was paying for the corporate subscription and without a single email or anything they removed chat support from my subscription. When I tried receiving chat support one day, the operator told me my subscription no longer had that feature and when asked why this wasn’t ever communicated to me I was left with silence. Really awful customer support, and sneaky little usage features that make the product ultimately not worth it.

I moved on to vega.js and it has been so much nicer in so many ways.

Sorry to divert from OP so much, but plotly started out as the type of dataviz solution i was looking for and morphed into a misdirected, poorly run business seemingly more focused on competing in the BI space than doing what they were originally good at. Too bad.


They raised $10M according to crunchbase, likely on the premise of building a BI solution




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: