Settings

Theme

Control Mario Kart 64 with your car over CAN bus (2016)

github.com

197 points by stoppingin · 72 comments

Reader

15 threads
zyk

I was involved in a Nissan advertisement project connecting Playstation 4 with a cars as controllers[1]. They did a convention tour with 4 cars playing the same football game in front of a projector.

I did everything except front end and CAN interface though, $20 USB CAN reader device + python. I remember it took a while for my colleague to figure out the right input signals as the bus was quite chatty/high output, like tailing android logcat on verbose. We didn't use any factory unlock codes or anything to get more data.

As a gamer it was not really up to par - big deadzone when turning the wheel from one side to the other as we did not have time to get analogue movement read correctly.

On that particular car model you had to interact with the touch display every 15 minutes or else the whole car went into power saving mode and the CAN bus stopped sending messages.

[1] Nissan Project Driving Controller 2016: https://www.youtube.com/watch?v=QM958yUbr0Y

  • rozab

    Sounds like a really cool project to work on but the video is unintentionally hilarious

    No, the game is not Rocket League, it's just a regular football game and all these players have to talk to the camera about how great it was to play FIFA with a Nissan Qashqai. All the absurdity of USB steering wheel memes, but played with a straight face

  • unwind

    On that particular car model you had to interact with the touch display every 15 minutes or else the whole car went into power saving mode and the CAN bus stopped sending messages.

    Wait, what? I guess that doesn't disturb ordinary operation, i.e. driving? Very easy of course to imagine a scenario when you drive and don't touch the display for 15 minutes.

    That would have made sense if the CAN was for non-driving stuff only (like the entertainment system) but your application seems to indicate that not being true.

    How does the car still operate if the CAN bus goes dark?

    • mschuster91

      I'd assume that the demo car was not having its engine running - it's usual for cars to switch to power-save after 5-10 minutes, mostly to prevent cars from draining their battery if the user forgot to take the key out.

    • traverseda

      Presumably you can also have the engine running.

modeless

I'm surprised that nobody has mentioned yet that this is a built in feature on Teslas. Not Mario Kart, of course, but a generic kart game that you can play with the real steering wheel.

  • myko

    Be careful playing the Tesla kart game, don't wear your tires down by steering the wheel too much

    • mikepurvis

      Or do it sitting in a loose surface parking lot (dirt, gravel, whatever).

    • Graziano_M

      I doubt the wheels turn at all while in this mode.

      • omegabravo

        they do turn unfortunately turn

        https://www.youtube.com/watch?v=_sanbI_ze8c

      • myko

        As noted above they do turn. I think it would be potentially dangerous to allow a software change to prevent the wheel from turning the tires, so unlikely to be implemented.

        • Graziano_M

          I understand that, but also, the tesla has software configuration for e.g. how tight the steering is, so ostensibly it would be possible. But it does make sense that there would be no way for the steering column ECU's CAN messages to be blocked from reaching the steering ECU.

  • sundvor

    I've got a Sparco R383 steering wheel .. on a Fanatec Podium Hub and DD1 direct drive wheelbase.

    There's your real steering wheel, and it won't wear out your car's tyres either. ;)

quartz

I love how clever this is!

If I wasn’t pretty sure that gunning the engine in park repeatedly is a bad idea (and would draw more than a few stares when done from a street-parking space in Manhattan) I’d give it a try.

Would very much like to see a video of someone using this.

  • trojanviking

    Here is the video from the creator I think: https://www.vice.com/en/article/jpn45k/watch-this-dude-play-...

  • Waterluvian

    I’m also of the impression that dry turning the wheel isn’t great for the tie rods. But I welcome a car person to teach me the truth.

    • sokoloff

      Park the car with the front tires on two pieces of cardboard (each) to limit the turning forces.

      I wouldn’t sweat it for the duration of demo or until you (quickly) got bored with it. You do the same everyday you parallel park a car.

      • grepfru_it

        Dry steering will also damage your concrete or pavement. Should probably jack your car up while doing this or turn up the sensitivity so very small inputs translate to larger turns

      • ilyt

        Or just on jack stands

    • DANmode

      Worry about your tyres.

    • grecy

      The amount of force you're putting into the system, regardless of if the engine is running (and therefore the power steering pump is pumping) or not, is a fraction of the forces the system handles constantly while going around a corner at 60 mph or hitting a pot hole.

      It's perfectly fine.

      • short_throw

        For steering you're exactly wrong. Drive an old car without power steering, on the highway you'll barely notice, but you'll be using all your might to park. It's much easier to steer a rolling tire.

        Power steering systems create heat and rely on airflow for cooling...so prolonged steering back and forth in a parking space is a worst case scenario for the system.

        • grecy

          > For steering you're exactly wrong. Drive an old car without power steering, on the highway you'll barely notice, but you'll be using all your might to park. It's much easier to steer a rolling tire.

          So you're talking about the force the human has to use to turn the steering wheel. In a car with power steering, the human doesn't have to do much, because the pump effectively amplifies the force and exerts it on the tie rods, steering, etc. etc.

          Either way, the forces on the steering components are the same, and they're not a problem.

          > Power steering systems create heat and rely on airflow for cooling...so prolonged steering back and forth in a parking space is a worst case scenario for the system.

          I assume you mean while the engine is idling.. in which case the main cooling fan will kick on when the temp of any component requires it, so it's perfectly fine.

      • barbazoo

        Doesn't matter if the engine is running. It only matters whether you're in motion or not. The engine running just enables power steering but the strain on the steering system and the tires are the same.

      • Waterluvian

        Thanks! I’ll chill out about avoiding it then. What you say makes complete sense.

        • jamiek88

          Won’t damage tie rods or anything mechanical. May shorten life of tyres.

      • ilyt

        I... don't think you ever driven anything without power steering.

  • sokoloff

    Surely, you’d do this key on-engine off. (Key on so the CAN bus is active; engine off for obvious reasons.)

  • Gordonjcp

    I don't think you'd need to have the engine running for the throttle pot to send data.

tomglynch

Why purchase a racing simulator cockpit or steering wheel when you've already got a perfectly good one at home!?

_Microft

Today it would be possible to use e.g. a Raspberry Pi Pico (~6€ including VAT, the CAN module would be more expensive than that) and make it identify as USB input device directly instead of connecting a full single-board computer via network.

charles_f

My favorite part about it is this issue https://github.com/DanH42/CatchMeIfYouCAN/issues/1

batch12

Heh, this would be cool to do with a junk car and a bunch of screens.

  • ilyt

    I mean, if you have a bunch of free space and itch to play some sim racing, getting the cockpit out of some junker aint a bad idea to start

the_cat_kittles

when did it become common to have an encoder on the steering wheel in a car, and for what purpose?

  • sircastor

    I would assume it’s been a while actually. Consider that modern cars want to know both what the wheels are doing as well as what you’re trying to get them to do. The oldest driver assist features try to adjust for over-correction and low friction surfaces.

  • maxerickson
  • t0mas88

    For stability control systems already in older cars and for lane keeping systems now in newer cars. If you want to have servo control over the steering (if even just for automatic parking), you're going to need a position sensor for feedback of the current position.

  • irq

    Steering angle is a critical input for antilock break systems, so quite a while.

    • kube-system

      ABS is very simple and only needs to know the difference between the speed of the tire and the speed of the road. It is more complicated systems like ESC (which works with ABS) that need to know about steering inputs.

      • rjmunro

        I thought the "speed of the road" was calculated by checking the speeds of the other types, which is trivial if you are going in a straight line, but needs correction if you are steering, hence needs steering angle?

        Or is there a simpler way in non-ESC systems?

        • ilyt

          Simple ABS only cares if the wheel is stationary/goes much slower vs other wheels. Like it wouldn't be perfect but still vast improvement over locking all 4 wheels. Hell, the older ABS systems controlled pair of wheels and activated on both regardless of which one was locking

          I'd imagine once they are implementing ESC the ABS also gets the benefit of steering sensor but it is not strictly necessary.

          • kube-system

            To nitpick, simple ABS is an improvement over locking some of the wheels. It often struggles with preventing a lock of all 4 wheels, because it loses reference for the road speed. A dumb ABS system with just wheel speed sensors can't tell if [0,0,0,0] means all 4 are locked, or if you're stationary.

            I don't know as much about the implementation details of modern ESC systems, but I'm guessing this problem is much easier to solve with accelerometer data.

            • ilyt

              > To nitpick, simple ABS is an improvement over locking some of the wheels

              In direction control, sure, but you are getting less braking out of it. The earlier ones could be outbraked by skilled driver keeping brake just at the edge of wheel locking, but that isn't the case for the modern ones, precisely because it can brake each wheel separately

              > A dumb ABS system with just wheel speed sensors can't tell if [0,0,0,0] means all 4 are locked, or if you're stationary.

              I'm actually curious how they deal with ice, you might be breaking but still getting near zero decceleration from it. Then again if it is that slipper it doesn't matter all that much...

  • numpad0

    Often cited reason is electric power steering, which technically don't need absolute angle because they assist with torque. Stability controls sounds more plausible to me, and self driving can be another reason.

    I don't know for sure, but I think all of above benefit from an encoder and it would be logical enough to have one for any of those.

jmiskovic

I wonder if there's a market for VR simulator that uses your actual car as a controller? Mostly for practicing maneuvers like parallel parking, or entering a busy multi-lane turnaround, but also for more immersive racing. It would require ODB-to-Bluetooth adapter and a standalone headset. Main tech difficulty would be dealing with all the different cars, and limitations of standby mode like the lack of power steering.

realjhol

Can it play Carmageddon?

mortenjorck

First and last commit was in 2016 - has anyone ever gotten this working (and perhaps recorded a video)?

fwlr

“Use item: Activate your winshield wipers.”

Absolutely glorious, thank you for this.

mzs

Reminds me of the SEGA arcade in Tokyo: https://youtu.be/3I-a5onDg7s

ChickeNES

So...who else is tempted to go to a Pick-A-Part now?

arvind1508

throwback to CdT and being around when Dan first posted this project

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection