1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tutorial Proof of Concept - SketchyPhysics Alternative

Discussion in 'SimTools DIY Version' started by pillowsack, Mar 14, 2017.

  1. pillowsack

    pillowsack New Member Gold Contributor

    Joined:
    Feb 21, 2017
    Messages:
    28
    Occupation:
    Programmer
    Location:
    Vancouver, WA, USA
    Balance:
    369Coins
    Ratings:
    +18 / 0 / -0
    Since my sketches were drawn up in SU 2017 64bit, I didn't feel like redoing things in an older 32bit version to get SketchyPhysics running. So what I have here is a proof of concept for using SimTools with MSPhysics which the author picked up where SketchyPhysics stopped and runs an updated physics model. This PoC is for a 2dof motion sim

    Procedure is similar to the SketchyPhysics guides but still different. Simple sketch with two servo motors is set up as an example included in the zip below.

    1. Place simtools.rb into your Plugins folder for SU (location varies but recent versions are in your AppData/Roaming folder under SketchUp)
    2. Load up your copy of SU
    3. Search in the Extensions warehouse for AMS Library and MSPhysics
    4. Install both (disable SketchyPhysics just to keep the UI clean)
    5. Open up the servos.skp sketch
    6. Open MSPhysics UI and select each joint (orange circular arrows)
    7. Verify min / max are 0 to 180
    8. Verify controller has correct variable; left joint = $axis1 / right joint = $axis2
    9. Import the Axis and Interface presets into GameEngine
    10. Run game or Output Test in GameEngine
    This gets the ball rolling. A better sketch will be uploaded that will be a proper 2dof motion sim. Stay tuned.


    Attached Files:

    • Like Like x 6
    • Informative Informative x 3
    Last edited: Mar 15, 2017
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,553
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,136Coins
    Ratings:
    +10,779 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Like Like x 3
  3. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,918Coins
    Ratings:
    +1,285 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    Very Impressive and I need full details please ...
    • Agree Agree x 1
  4. pillowsack

    pillowsack New Member Gold Contributor

    Joined:
    Feb 21, 2017
    Messages:
    28
    Occupation:
    Programmer
    Location:
    Vancouver, WA, USA
    Balance:
    369Coins
    Ratings:
    +18 / 0 / -0
    Working on a full walkthrough like the current FAQ guides. Plus a full featured model.
    • Like Like x 2
    • Winner Winner x 1
  5. pillowsack

    pillowsack New Member Gold Contributor

    Joined:
    Feb 21, 2017
    Messages:
    28
    Occupation:
    Programmer
    Location:
    Vancouver, WA, USA
    Balance:
    369Coins
    Ratings:
    +18 / 0 / -0
    Okay put together a better connection script since I was having latency issues with no understandable reason. I haven't had any issues yet with this new script. Includes proper maths now too.

    I Also updated the sketch and the joints to do 0 - 180 degrees so the servo arms will be at their zero positions and will flatten out when Game Engine connects.
    • Like Like x 2
  6. Dave Kirkman

    Dave Kirkman New Member

    Joined:
    May 10, 2017
    Messages:
    6
    Location:
    UK
    Balance:
    205Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    3DOF, SCN6, Motion platform
    Has this been developed further? I've been having difficulty in getting it to work in Sketchup 2017.
    Looks like the ruby script isn't connecting to Sketchup. I assume the simtools.rb file just goes in the C:\Users\myuser\AppData\Roaming\SketchUp\SketchUp 2017\SketchUp\Plugins folder?
    Does Sketchup have the required ruby script socket.so? I'm confused!
  7. Dave Kirkman

    Dave Kirkman New Member

    Joined:
    May 10, 2017
    Messages:
    6
    Location:
    UK
    Balance:
    205Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    3DOF, SCN6, Motion platform
    I did it!

    If anyone else is struggling you'll need the socket.so file I've included in this zip file.
    I added a line in simtools.rb that spits out the axis too so you can check you're connecting to simtools.

    Now to build my platform!

    Attached Files:

    • Useful Useful x 3
    • Like Like x 1
  8. Dave Kirkman

    Dave Kirkman New Member

    Joined:
    May 10, 2017
    Messages:
    6
    Location:
    UK
    Balance:
    205Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    3DOF, SCN6, Motion platform
    Just to add you need to ensure the MSPhysics joints are labeled as $Axis1a and $Axis2a in the model.
    • Winner Winner x 1
    • Informative Informative x 1
  9. Ekain Lopez

    Ekain Lopez New Member Gold Contributor

    Joined:
    May 17, 2019
    Messages:
    29
    Location:
    Basque Country, Spain
    Balance:
    - 11Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hi. I can not get the data sent by Simtools to appear in the Ruby console. There only appears the MSPhysics Simulation Results.
    I get this error when I start SketchUp
    error5.png
    Any idea of how to solve it?
  10. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,166
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,214Coins
    Ratings:
    +5,038 / 16 / -0