The Problem Being Addressed
Our senior design project is about one main question: how do you teach a two-legged robot to stay on its feet while riding a CyRide bus? Training on an actual bus isn’t really an option, since it’d be expensive, slow, and kind of risky for the robot and everyone on board. Simulation makes a lot more sense, but it only works if the simulated bus moves like the real thing. And real buses are messy. The same route never plays out quite the same way twice because of traffic, stops, different drivers, and road conditions. The robot has to deal with all of it: hard stops, sharp turns, jerky starts, and potholes. If we just made up a clean, idealized version of bus motion, a robot trained on it probably wouldn’t last long on a real bus.
So our goal is to build a model of how CyRide buses actually move, based on real data. We stick an IMU sensor on a bus handrail, ride the same routes over and over, and use those rides to build a probability distribution of the bus’s motion over time. That way we get both what a route usually feels like and how much it changes from ride to ride. We then feed the model into a MuJoCo physics simulation, so the simulated bus moves the way a real one would. That gives future robot training a realistic, repeatable, and safe place to practice. The tricky parts are figuring out how the bus’s movements affect each other and change from moment to moment, and making sure the simulation actually feels like riding the bus.
Our Project Idea
Our idea is to build a model of how CyRide buses move from real ride data, then use it to drive a physics simulation where a robot can eventually practice standing. The project breaks down into these main pieces:
- Data collection: A VectorNav IMU sits in a 3D-printed clamp on a bus handrail and plugs into a laptop running our own data acquisition program. It records the bus's acceleration, rotation, and orientation 100 times a second, and tags each moment with what the bus is doing (stopping, braking, turning, or cruising) along with the route and weather.
- Data cleanup: Before modeling, we fix the small tilt from how the sensor is mounted, so "level" really means level. We also line up repeated rides of the same route so we can compare them, since no two rides take exactly the same amount of time.
Defining the bus's state: At any moment, we describe the bus with a handful of numbers: its velocity in each direction, its pitch, roll, and yaw, and how fast each of those angles is changing. This "state" is what everything else is built on. - Discretizing the state: Raw sensor values are continuous, so we split each one into buckets to make the data workable. We're starting with evenly sized buckets, but some areas (like normal cruising) have way more data than others (like hard braking), so we may switch to adaptive buckets that are finer where the data is dense. We also have to keep the number of buckets under control, because the table size grows exponentially with every variable we add, and lookups need to stay fast.
- Building two probability distributions: The first, P*, describes how likely the bus is to be in any given state overall. The second, a conditional distribution, describes where the bus is likely to go next given where it is right now. It's basically a table of transition probabilities between buckets, built by counting how often the bus moves from one state to another in our data.
- Checking the model: To test whether the two distributions fit together, we sample a starting state from P* and then keep stepping forward with the conditional distribution for a long time. If the model is right, the states we visit over a long run should end up matching P*. If they drift off somewhere else, something in our transitions is wrong.
- Simulation in MuJoCo: We plug the model into a MuJoCo physics simulation. A simulated bus follows a stream of states generated by our model, with a controller keeping it on track, so it moves like a real CyRide bus with realistic ride-to-ride variation.
In the end, we'll have a simulated bus that feels like the real thing and can generate new, realistic rides on demand. That gives future robot training a safe and repeatable environment without anyone having to haul a robot onto a bus.