Teilen Sie Ihre Erfahrunge und Wünsche mit uns und anderen Usern!

0
Answered

Unity Physics and Kinematics

Michael 6 months ago in realvirtual.io Starter and Professional updated by Support 6 months ago 1

I've been using realvirtual.io for a week. But I'm struggling with kinematics links modeling.

As I see in your documentation, you are using either parenting or dynamics on game objects.

The thing is, for certain kinematics chains, neither technique worked...

There is futher example of mechanism i need to model :

There is a way to model complex kinematics chains (Without using mass and force)?

Answer
Support 6 months ago

Hi Michael,

There are several approaches you can take to achieve this:

  1. Position Control via End Element: You can manage the positioning by moving only the endpoint. Although this endpoint is not a real drive, you can connect it to the actual drive using Unity Physics joints. This setup ensures precise endpoint control. While the joints in between might exhibit some shaking, this should not affect the overall functionality.
  2. Integrated Drives with Gears or CAMS: Another method involves equipping all joints with drives and synchronizing them through the use of gears or CAMs. This setup mimics the movement based on a "Master" Drive, which aligns with the position of the actual drive. For more details, you might find these resources helpful:

  3. Using Unity Physics for Kinematics: Employ Unity Physics and Unity Joints (details at Unity Joints Documentation) to handle forward kinematics. In cases requiring purely linear movements, consider using Articulation Bodies (Articulation Body Documentation). Be aware that Unity Physics can be somewhat unstable or jittery, which can be mitigated by reducing the Physics fixed timestep at the cost of performance.

For complex scenarios not involving parallel kinematics, which are typically challenging and unstable with Unity Physics, you might explore using AGX from Algoryx (see https://doc.realvirtual.io/extensions/agx-physics9. This is a more robust solution for accurately simulating complex physics interactions, although it is not free and the definition of kinematics is on my point of view more complicated).

In general, whenever feasible, we prefer to resolve these issues using non-physical forward kinematics, whether it’s a straightforward kinematic chain of a robot or something that can be easily managed with defined cams or gears.

I hope this helps! Let me know if you need further assistance.

Best,

Thomas

0
Answered

Adding kinematics on pendulum like Object

G. Hildebrandt 6 months ago in realvirtual.io Starter and Professional updated by Support 6 months ago 5

Model-Pose1Model-Pose1

STEP File



Yesterday, I tried to dive deeper into the kinematics of more "complex" objects in Unity. However, I reached my limits when working on the kinematics of the model in the attached image, and I wanted to ask for your assessment of the complexity involved.

From my experience, chaining linear and independent movements doesn't seem to be a problem. However, combining rotational and linear movements appears to be more complex.

The model is actually a relatively simple construction. On a base-plate, there is a rotatable and driven turret. At the top of this turret, there is a shaft driven by a motor, which, through a connecting rod-like mechanism, is supposed to exert a linear movement on the "sleeve" around the turret. I have illustrated this with two images.

I have tried various combinations of kinematic chains and also tested the use of Unity's internal joints like the "Hinge Joint." I always got to the point where I still needed to add the linear movement of the sleeve. However, I couldn't implement this final step under the conditions of the existing movements.

In general, I have the following questions:

  • Is it possible to use the joints provided by Unity in combination with the drives from Realvirtual?
  • Are there any similar "joints" from Realvirtual that constrain kinematic movement (i.e., without additional drive)?
  • I had the feeling that a functioning kinematics heavily depends on the hierarchical arrangement of the game objects. It seems that the linear constraint of the sleeve to the turret doesn't work due to the hierarchy. Do you have any tips or rules that need to be followed, and is such a kinematic chain as desired in the model even possible?

I have also attached the STEP file of this model and would appreciate any feedback.

Answer
Support 6 months ago

We recognize that despite the significant changes made in the last release to ensure the drive fixed update sequence for cams and gears, there is still a bug affecting functionality.

After investigation, we have identified the solution. To resolve this issue, please modify the Drive script by adding !issubdrive around line 880. This fix will also be included in our upcoming release.

Image 1148

0
Answered

how to use the interface for commands?

MarkH 6 months ago in realvirtual.io Starter and Professional updated 3 months ago 13

I want to interface the realvirtual digital twin with a c# application. The c# application already exists and controls resources like motors with resource commands. The commands are already expressed in a message that is send via TCP. No PLC is used.

An example message would be:

- message type -> eg resource command request

- object id -> eg Xaxis

- command id -> eg move

- parameters -> eg position, speed, acceleration and deceleration parameters

The individual parameters in the message are extracted from the message by a decoding procedure.

I would like to use an industry standard like MQTT (or OPC UA) to interface with the digital twin. Therefore the TCP message has to be converted to a MQTT message.

I have limited knowledge in this area, but from what I understand is that the digital twin requires signals. Drive_DestinationMotor for example requires 5 PLC outputs and 4 PLC inputs, the PLC outputs/inputs should be mapped to signals, signals should be connected to MQTT topics, each MQTT topic represents 1 signal. Am I right?

I can understand how to convert the TCP message to multiple MQTT messages, but how can I make sure that parameters like position and speed signals are received all at once or before the actual "start drive" signal?

Are there examples available on how to do this or should I use a different approach? What would happen when I replace Drive_DestinationMotor by a controller with states? Are there examples of such a controller?

0
Answered

Digital Twin Professional 2021 mit Simulation 2022

Sven 7 months ago in realvirtual.io Starter and Professional updated by Support 6 months ago 4

Hallo,

wie kann ich die oben genannten Pakete noch nutzen?

Ich habe die Assets direkt über unity gekauft im Dezember 2022.

Wenn ich jetzt ein frisches Projekt anlege (aktuelles Unity 2021 LTS) bekomme ich haufenweise Fehler.

0
Answered

Ask some questions about using Drive Component

haoyu yi (Hari) 7 months ago in realvirtual.io Starter and Professional updated by Support 7 months ago 2

Hello

I have a requirement to reproduce the gripping and placing of a SCARA robotic arm. My current idea is to divide the model into joints and add Drive components to the axis position of each joint, so that it can be moved, so as to achieve the process of motion restoration. But when I use the rotation function of the drive component, I find that it can only rotate all the time, can I set an angle for the drive component to rotate only the angle I set?

Or can you see if there is a better way to simulate the movement of a SCARA robot?

I don't need to add complicated IK algorithms, I just want to give the rotation angle of each axis of the SRACA robotic arm and let it rotate to the target position.


Thanks

Answer
Support 7 months ago

Hi, you need to add a Drive behavior (https://doc.realvirtual.io/components-and-scripts/motion/drive-behavior) to the drive e.g. a Drive_DestinationMotor to control the drive and to send it via signals to certain destination position for each axis. Alternatively you could control the Drive via a script and use the Method Drive.DriveTo(float destination) of the Drive.

0
Fixed

PLCSimAdvancedCoupler startet bei Simulation nicht

david hilla 7 months ago in realvirtual.io Starter and Professional updated by carHock 6 months ago 4

Hallo Thomas,

ich bekomme keine Verbindung von Unity zu PLCSimAdvanced V5.0. Bei Simulationsstart kommt jedes mal die Fehlermeldung (in Unity):

"You need to download PLCSimAdvancedCoupler.exe and place it into the \PLCSimAdvanced\Ressources\ folder"

Die genannte .exe habe ich im in meinem Projekt - Ablageordner unter:

C:\Unity Projekte\Zuluftanlage\Assets\realvirtual\Interfaces\PLCSimAdvanced\Ressources

abgelegt. Dennoch scheint Unity die .exe nicht zu finden. Auch die "Siemens.Simatic.Simulation.Runtime.Api.x86.dll" hab ich im entsprechenden Ablageordner für PLCSimAdvanced V5.0 abgelegt unter:

C:\Program Files (x86)\Common Files\Siemens\PLCSIMADV\API\5.0

Was ich weiter versucht habe ist:

- deinstallieren von "Npcap 1.71" und installieren von "Npcap 1.79"

- bilden einer Instanz in PLCSimAdvanced mit Konfiguration PLCSIM sowie TCP/IP 

- deaktivieren der Windows - Firewall

- starten der PLCSimAdvancedCoupler.exe manuell (Fehlermeldung siehe Screenshot!)

Geladen wurde die PLCSimAdvanced Instanz mit TIA Portal V18. Anbei befinden sich ein paar Screenshot.

Viele Grüße

David

Image 1124

Image 1123

Inspector nach Bestätigen der Fehlermeldung

PLCSimAdvancedCoupler nicht gefunden

0
Answered

Stop MU on conveyor by stopper

Andreas 7 months ago in realvirtual.io Starter and Professional updated 6 months ago 17

How can I prevent a jumping MU on a (guided) conveyor?

For this I used the invisible conveyor system from your demo project "Guided Transport".

The MU stops at the stopper but starts jumping up and down immediatetly. 

Is there an easy way to prevent this? 


I played around with the Rigidbody parameters and realised it stops if I activate "Is Kinematic". I guess I could do this by writing a scripts that activates this parameter at collision with transport layer.

Image 1118

Answer
Support 6 months ago

Hallo,

anbei die Antworten zu Ihren Fragen:


Im Umlaufsystem stapeln sich die WTs ab einer Staulänger von 4 Wts. Wie kann ich das verhindern?
Bitte verwenden Sie ausschließlich guided Transport. Die Kombination aus normaler Transportsurface und guided Transport wird nicht funktionieren.


Wie kann ich ein "Transport Guided (Script)" unterbrechen (durch zB einen Heber) und danach wieder fortführen?
Hier gibt eine Umsetzung in der Demoszene zum guidedTransport, welche als Vorlage genutzt werden kann. (realvirtual/Scenes/DemoGuidedTransport)

Wie kann ich eine "Guideline" bei einem Transportsystem mit zwei "Transport Surfaces" einfügen?
Ein System wie in ihrem Beispiel wird immer nur mit einer Transportsurface umgesetzt, damit kann einfach eine Guideline ergänzt werden. Unity betrachtet immer nur eine "Collision".


Unter main/realvirtual/ui/button1 wird ein image verwendet. Wo finde ich die Datei?
Button-GameObject in der Hierarchie auswählen und im Inspector auf das definierte Bild klicken. Es wird dann im Projekt angezeigt.

Roboter bewegen sich zu bestimmten Positionen deutlich langsamer. Warum ist das so?
Die Bewegung richtet sich nach der langsamsten Achse.


Grüße Christin

  • How can I prevent WTs from stacking up after a queue length of 4 WTs in the circulation system?

    Use only guided transport. Combining normal transport surfaces with guided transport will not work.

  • How can I interrupt a "Transport Guided (Script)" (e.g., by a lift) and then resume it?

    There is an implementation in the demo scene for guided transport that can be used as a template. (realvirtual/Scenes/DemoGuidedTransport)

  • How can I add a "Guideline" to a transport system with two "Transport Surfaces"?

    A system like the one in your example is always implemented with a single transport surface, allowing an easy addition of a guideline. Unity only considers one "Collision".

  • Where can I find the file used for the image under main/realvirtual/ui/button1?

    Select the Button-GameObject in the hierarchy and click on the defined image in the Inspector. It will then be displayed in the project.

  • Why do robots move significantly slower to certain positions?

    The movement speed is determined by the slowest axis.

  • Regards Christin


    0
    Under review

    UWP Deployment for Hololens 2 does not complete successfully Unity 2021.3.21f1

    Dominik Zawalich 7 months ago in OPCUA4Unity updated 7 months ago 5

    Hello, it seems like we are having an issue with the OPCUA4Unity asset that we want to use for our Hololens build. We created a new project and were able to create a build for the Hololens without any problems. We then imported the asset from the Asset Store and tried to build again, but to no avail. We didn't add the demo scene into the build, so the problem is not with the scene itself. The build settings match the attached screenshot.

    After creating the build in Unity, we open the build folder in Visual Studio and launch the .sln file. We select the Release, ARM64 and Device options and start the process. However, the build process gets stuck at a certain point, as shown in the screenshot.

    Image 1112

    Image 1111

    0
    Not a bug

    Override values (Unity to PLC) does not work as expected

    Gonçalo Nascimento 8 months ago in realvirtual.io Community updated by Support 5 months ago 6

    Greetings.

    I am using S7 TCP/IP connection on a Unity project and I am physically connected to an S7-1200.

    I am using various PLC Inputs and Outputs (created automatically from the .sdf file).

    The PLC outputs are being read correctly on Unity, but when I force (overrite) a BOOL input value, the PLC detects the change but does not hold the new value. For example, I can see on the TIA Portal monitor window that the value is FALSE. I press write to True on Unity but the monitor on TIA Portal still shows False, although it did acknowledge the pulse (mabye it was a very short pulse)? Is this the way writing to PLC inputs works? By pulses? Because I would like to change a boolean (or any other type) value and hold that state for long periods of time.

    These are my settings for the S7 Interface

    Image 1101

    And this is an example of a PLC Input component (Is it normal that the component is deactivated during runtime??):

    Image 1103


    This is the correspondent GameObject during runtime:

    Image 1102

    Thanks for your time!

    Answer
    Support 5 months ago

    Hi Andreas,


    here are my answers:

    1. This behavior is by design from Siemens. It's not possible to change this. If a hardware value is at a certain level, you can't overwrite it with software.
    2. This is not a bug; it's a common characteristic of all software solutions utilizing real Siemens PLC hardware. To avoid values being overwritten, you can modify your hardware configuration or use a simulated PLC.

    To the best of my knowledge, you don't need to change the program itself. However, you do need to adjust the hardware configuration to ensure the symbol you are using does not conflict with a real hardware input.

    Solutions that Work Without Changing Hardware Configuration for Siemens Controllers:

    • Use PLCSimAdvanced
    • Use Simit in Combination with a Simulation Unit

     

    0
    Answered

    Can realVirtual built for web

    zilong 8 months ago in realvirtual.io Starter and Professional updated by Support 7 months ago 5

    When I choose the WebGl plat for build my unity projects which use realVirtual-io tool, the system has the follow error:

    "Assets\realvirtual\private\Interfaces\SharedMemory\Editor\SharedMemoryInterfaceEditor.cs(9,26): error CS0246: The type or namespace name 'SharedMemoryInterface' could not be found (are you missing a using directive or an assembly reference?)"。

    Answer
    Support 8 months ago

    Hi,

    it seems that you are using an old version. This issue has been solved. Some interfaces need to be deactivated before compiling because they are using functions which are not available in WebGL.


    You should upgrade to the latest version or delete the interfaces (the full folder of it) which are not supported in WebGL. You can check the table on this page here: https://doc.realvirtual.io/advanced-topics/supported-platforms