Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: Bicycle simulator  (Read 21560 times)

Leanier

  • Newbie
  • Posts: 5
  • newbie
Bicycle simulator
« on: December 06, 2015, 07:06:44 pm »

I was wondering if there is an easy way to set up some sort of bicycle simulator.
All I am looking for is essentially a sim that I can connect to my bicycle so that in the winter I can ride my bike on an indoor trainer, have an arduino or something pull the speed off of the rear wheel, and then it can provide that to outterra somehow.

I would basically just need something that would allow the camera to track on a road, and then take a speed input.  This would make exercising much more interesting in the winter.

It would be easy to set up different routes etc.
Any way to do this?
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Bicycle simulator
« Reply #1 on: December 06, 2015, 09:42:25 pm »

Wow,

Simple but an absolutely brilliant idea!

Short answer. yes!  via the igc_plugin.dll

It's galled the IGC interface. In game camera.

1.) Can you code in C ?
2.) Can you get the arduino to spit out a lat/lon or get it to send speed (and direction) and have the dll do all the velocity -> position calcs.

Have a read through this: http://forum.outerra.com/index.php?topic=2705.0

L

Logged

Leanier

  • Newbie
  • Posts: 5
  • newbie
Re: Bicycle simulator
« Reply #2 on: December 06, 2015, 10:37:11 pm »

Well, my coding is pretty much limited to arduino stuff, and some vbasic, but I can probably figure it out..

Initially what I was thinking would work best was if there was a way to output the lat/lon of a road, the all I would provide is speed (and maybe a lookup of the lat/lon).  That way it will auto-track on the road, and the speed is all I am doing with the bike.

However, maybe I could modify my bike setup to include a method for turning.  sensor on the handlebar that will measure it turning, or some allowance for slight lean and measurement therein.

That would almost be easier to code, as then I would not have to find a way to import Lat/Lon of various roads that I create.  (Unless there is a way to just make the camera stick to the center of a road)

Going a step further, I could probably find a way to export the pitch of the terrain from outerra, then I could feed that into the arduino and have it set the resistance on the trainer.  That would be taking this quite a bit further in complexity of course..
« Last Edit: December 06, 2015, 11:21:28 pm by Leanier »
Logged

Leanier

  • Newbie
  • Posts: 5
  • newbie
Re: Bicycle simulator
« Reply #3 on: December 06, 2015, 11:55:20 pm »

Another way I could try to do it that may be more my skill level:

I could probably use the arduino to make a "joystick".  This would allow forward motion to be controlled by the rear wheel speed.  I'm sure I could find a way to set the movement speed based on the rear wheel speed.  Direction left/right would be set using some sort of turn sensor I install.

Perhaps make (or find) some sort of vehicle that would make this easy for me to link into with simple joystick controls (something with low or no mass and basic handling)

I could even go as far as setting up a head tracking software of some sort using a gyro/accel headset.. but I'm getting a bit ahead of myself now..
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Bicycle simulator
« Reply #4 on: December 06, 2015, 11:59:16 pm »

Even easier, just make an arduino joystick.


Leo is great for that. and then just use it to control an in game vehicle. Take one of the existing vehicles and just strip it down till there's no body left on it (that you can see).

Faster you peddle the higher the throttle axis.

Getting feedback back out of Outerra is basically a no go at the moment. Not sure if it can be done with the igc.dll or not.

Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Bicycle simulator
« Reply #5 on: December 07, 2015, 12:00:14 am »

Beat me by seconds :)
Logged

Leanier

  • Newbie
  • Posts: 5
  • newbie
Re: Bicycle simulator
« Reply #6 on: December 07, 2015, 12:04:52 am »

Haha,
I have made a joystick once before out of an arduino using teensy: https://www.pjrc.com/teensy/
Makes it very simple to make into a joystick.  I last did it to create a custom yoke for X-plane, it worked well until I ran out of time and just bought one.  (which doesn't work much better than the one I had)

I can use that pretty easily I think, this is looking more possible every second.
Logged

Varldsligist

  • Member
  • **
  • Posts: 50
  • Long time x, first time y
Re: Bicycle simulator
« Reply #7 on: December 07, 2015, 11:13:46 am »

@Langdon

You absolutely need a Oculus Rift for this purpose. Otherwise it seems to be something that is doable today with the engine in it's current state.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bicycle simulator
« Reply #8 on: December 07, 2015, 12:32:43 pm »

However, maybe I could modify my bike setup to include a method for turning.  sensor on the handlebar that will measure it turning, or some allowance for slight lean and measurement therein.

... maybe im just stupid, but I would just duckt-tape an older mouse on the rotating handle and give something in front of the laser to run on. Such easy mouse-turning.  =D  =D

P.S.: There was that guy doing that home-pit hanging glider ... http://forum.outerra.com/index.php?topic=997.msg11594#msg11594 ... if a proper model for a bicycle would be done (physics i mean), you could even build some vibrations/hydraulic leaning system based on the forces on the wheels. Would be pretty interesting to hopp-arround down some mountain track then. ( but might just end up as a more sophisticated rodeo-machine :D )
« Last Edit: December 07, 2015, 12:34:56 pm by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Bicycle simulator
« Reply #9 on: December 07, 2015, 08:26:54 pm »

I know the Teensy well. I just finished making a 747 FMC using a single Teensy.

RRE:: Oculus... I have a DK2...I get rotten motion sickness if I don't have a 'static' frame of reference. ie. some kind of cockpit surrounding me. Be sure you can look down and see some handlebars occasionally.

I could see a real world product in this... One of those doo-hickies you stick under the back wheel of your bike with a usb cable coming out of it and straight into the pc and outerra. Maybe a little linear actuator on it to give some bump feedback.

@Cameni.. how's that OSM import coming along?.. all the gyms in all the world with exercise bikes all hooked up to Outerra. "Where will I  ride today?"
That's one hell of a market!


Logged

toddwestleyTWO

  • Newbie
  • Posts: 1
Re: Bicycle simulator
« Reply #10 on: March 28, 2024, 02:17:29 pm »

I programmed Arduinos to convert riding a bike trainer into a throttle position.  The codes for the Arduinos can be found on gitbub "https://github.com/toddwestley/Arduinos-to-turn-equipped-bike-into-Joystick-with-throtle-axis"  There is also a powerpoint file that adds detail to the creation. 
Logged