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

Python, VisualStudio,Processsing and plugins

Discussion in 'Miscellaneous' started by accelero, Sep 15, 2025.

  1. accelero

    accelero Member

    Joined:
    Jun 30, 2015
    Messages:
    43
    Location:
    france
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    Hi guys , is there somewhere on the forum ( huge maze) a python plugin to send data from python to simtools for example a sin wave on roll axis to test the movements of a platform following changes on amplitude and frequency?
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,736
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    152,189Coins
    Ratings:
    +11,064 / 56 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. accelero

    accelero Member

    Joined:
    Jun 30, 2015
    Messages:
    43
    Location:
    france
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    OK , thanks a lot.
    I am on writing my own plugin, using the example you give for simtools2, so I was asking myself when going along the job, is it right to write something like (MyPath&"\mySketch.py" ).... or is it better to turn first "mySketch.py" into an exe, because the plugin has patched properly but I can't recieve any data, despite the chceking of the 4123 port with WireShark

    here is the way my data come out mySketch:
    # Map to OutSim fields
    sngOrientation2 = values.get("Roll", 0.0) * math.pi # Roll
    sngOrientation1 = values.get("Pitch", 0.0) * math.pi # Pitch
    sngOrientation0 = values.get("Yaw", 0.0) * math.pi # Yaw
    sngAcceleration2 = values.get("Heave", 0.0) * 10.0 # Heave
    sngAcceleration0 = values.get("Surge", 0.0) * 10.0 # Surge
    sngAcceleration1 = values.get("Sway", 0.0) * 10.0 # Sway

    # Pack into struct (6 floats)
    packet = struct.pack(
    "<6f",
    sngOrientation0,
    sngOrientation1,
    sngOrientation2,
    sngAcceleration0,
    sngAcceleration1,
    sngAcceleration2,
  4. accelero

    accelero Member

    Joined:
    Jun 30, 2015
    Messages:
    43
    Location:
    france
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    For those who ask themselves same kind of questions,
    Yes it seems obvious now that you have to turn any self written sketch, whatever software your are using , into an .exe

    Next big step for me is , as I'm not a specialist , to find out which data format is preferable.....
    ex : recieving ( Text as String ) and splitting it to CDbl for each roll,pitch .....that seems pretty simple ( C silva's method )

    or recieving (Text as String) and converting it to byte and copy to a byte array and then
    Get Proper Data With "MyOutsim_Internal" to get after calculation something like
    Roll_Output = ((.sngOrientation2 * 180 / 3.14159) - 90) which seems a bit more clever ( yobuddy' s method)

    trying out both and let you know :):)
  5. accelero

    accelero Member

    Joined:
    Jun 30, 2015
    Messages:
    43
    Location:
    france
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, AC motor, Arduino
    last hours work:

    Writing a basic UDP listener in visual Studio to recieve and process data with a "yobuddy like" method, printing the recieved values ( if recieved and well processed) to the console.
    Writing a basic UI that sends data for all six axes in the proper format to be read by the visual studio previous app.

    Next step turning the UI to an exe , expecting it is written with proper functions, and patching all the stuff to Simtools and perhaps getting the new five actuators platform moving .
    It already works fine with UI generated movements imported in VideoRide Player ......very smooth and fun :p