Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Vibration, force or sound produced during a simulated drilling process

Discussion in 'General Discussion' started by Matteo1505, Mar 31, 2021.

  1. Matteo1505

    Matteo1505

    Joined:
    Mar 31, 2021
    Posts:
    4
    Hello everybody,
    I uploaded my urdf kuka model on unity and used RosBridgeClient to comunicate with ROS so that to be able to move my robot in unity using MoveIt!
    I put as an end effector of the Kuka a cutter that I want to use to make a hole inside an object composed by three different layers, the first and the last layer made up of the same material (same density) while the one in the middle softer, and I would like to automatically stop the drilling once the robot reaches the third layer.
    To be able to stop automatically the drilling I would like to use one of the three following signals:
    1- The force exchanged in the interface between the cutter and the object
    2- The vibration produced during the drilling process
    3- The sound produced during the drilling process
    Once I can get one of this three signals I would like to make some processing on it in MatLab to extract some features and use them to stop the robot.

    So my question is:
    It is possible to reproduce the vibrations produced during the drilling of an object in unity in real time? Or is it possible to acquire instead the sound or the force signal produced during the drilling process?

    I know it's a bit complicated but I tried my best to explain everything as clear as I could, hope someone will be able to help me.

    Thanks
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,352
    i'd think the easier way is to do all of those calculations in matlab or other external tools (if its already there in between?).

    unity game physics wouldn't be too accurate,
    instead from matlab you can control what unity or your robot does with tcp/udp sockets.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Sound can be read with a mic, vibration can be theoretically read with an accelerometer, the FORCE, though....

    To read a force you'd need the arm to incorporate a dynamometer, you should maybe check if it is possible to read control signals from the servos of your robot arm.

    Unity Physics is not incredibly precise and runs at 50 frames per second (by default). With very high vibration frequency it wouldn't be surprising to end up in a situaiton where the vibration is incorrectly reproduced at unity side.
     
    Antypodish and Joe-Censored like this.
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You can increase the physics fps (decrease fixed time step), but it is unlikely that Unity does any testing of the physics system at extremely high rates. You might still get unexpected or unreliable results. The CPU usage might also end up too high.
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    @Matteo1505 for scientific purposes, use Unity only for visualisation and optional interface, to control manipulator. Don't try using it, to simulate real world data, when catching inputs in real time. As already mentioned, there are other more suitable tools.

    What you could to, just evaluate manipulator behaviour on the ROS side and provide state to Unity.
    I.e. manipulator is drilling and vibrates.

    Alternatively you could collect data from the device and send bunch of it to Unity. You could then build a simulation, but won't be in real time. And as mentione, Unity imposes frame frequency limit. So that is to be held in mind.
     
    EternalAmbiguity likes this.