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

0
Not a bug

g4a duplicates Script

Benedikt Scholz 4 years ago in realvirtual.io Starter and Professional updated by Support 4 years ago 1

I am building some UI Elements to write PLCOutputFloats (bool, etc) from Input fields, toggles and buttons. 

Spontaneously I am getting errors because of ambigious names for these PLCOutput classes. 

Somehow g4a duplicates the classes so I get a PLCOutputBool1.cs

Can you explain what´s wrong?

Best regards

Benedikt

Image 335

Image 336

Answer
Support 4 years ago

G4A itself for sure not duplicates classes. Currently I don't know why this happens. Please delete the duplicated classes.

0
Not a bug

Import problem with Pixyz

Benedikt Scholz 4 years ago in realvirtual.io Starter and Professional updated by Support 4 years ago 1

The Import and update with the Pixyz Plugin does not work since updating to Unity 2019. The workaround you, Thomas, explained to me does not work. I can´t compare the Current and Update. The Problem is that the JT_Prop_Name does not appear in the Metada of the CAD-File. I get an error ".....is not unambigious". The Updater does not detect that the CAD-File changed during update. 

Pixyz said the plugins API will work with the next update which is going to be released around the end of February. 

Can you put that on your issue list so that it will work as soon as possible? The Updater is very important for us.

0
Fixed

Sensor "Limit Sensor To Tag" null Error

DAT 4 years ago in realvirtual.io Starter and Professional updated by Support 4 years ago 3

I have encountered a few error from sensor script:

The sensor script throws a null error when using the "Limit Sensor To Tag" function unless the parent object have a MU.

Even though I am using the "Limit Sensor To Tag" function the sensor still gets trigger by the parents objects of the object that have the tag. (Parents objects do have mesh collider attached)

Answer
Support 4 years ago

Hi Dat, I just checked. Objects wich are colliding with the Sensor must alway have the MU script on the same or in a level above the collider. This is the planned behaviour. I don't know in what combinatione exactly your problem comes up. Can you send me a simple example?

0
Completed

VR in Game4Automation

Pablo Navarrete 4 years ago updated by Support 4 years ago 1

Hello forum


I bought an Oculus Quest 2 headset last week and I would like to know if its possible to connect it to the demo of Game4Automation.

Is there any resource about how to use VR in Game4Automation?

Thanks in advance and please, try to translate the menu of the forum cause we all arent german :)

Answer
Support 4 years ago

Hello Pablo,

G4A is fully compatible with more or less all VR/AR solutions you can find for Unity.

you should follow the Occulus Documentation:

https://developer.oculus.com/documentation/unity/book-unity-dg/

Or you could use Steam - the advantage with Steam is that it works with most VR headsets on the market:

https://valvesoftware.github.io/steamvr_unity_plugin/articles/Quickstart.html

At the end, you need to integrate with all that VR Applications some standard Assets in your project and in your scene some standard components like VR Camera, Teleport and so on. You will need to deactivate or delete the G4A Camera because camera movement will be replaced by the VR application.

Maybe I will do soon an official tutorial about that. But if you follow the VR documentations and tutorials on the web you should be able to do that.

And sorry, did not notice, the forum is now also in English...

Best regards

Thomas

0
Answered

Unity Build Player Window error

Denis 4 years ago in realvirtual.io Starter and Professional updated by Support 4 years ago 8

Hello , I have errors when i trying to build player window , its works when i delete game4automation , and if i add game4automation and trying to compile i get some errors , I want to mention that I did not add the s7 interface, I did not add anything

Image 330

Answer
Support 4 years ago

Problem was solved by deleting Parts4Cad and Zip in Tools. Included ZIP is not compatible with UWP. We will change that in future.

0
Started

Kuka VKRC , integration example.

Дмитрий Мурашов 4 years ago in General Questions updated by Support 4 years ago 5

Kuka VKRC , integration example.

Youtube video
Answer
Support 4 years ago

Hi,

nice work. How did you connected to KUKA. 

There seems to be still a cycle time problem. If you would like I could support you, if you support me for getting it into the Professional version ;-)

Best regards

Thomas

0
Answered

S7 plc i want to show on scene value from the controller

Denis 4 years ago in realvirtual.io Starter and Professional updated 4 years ago 4

Hello , i want to show value from the controler as a text on scene , how i can do that?

Image 320

Answer
Support 4 years ago

Hello,

you need to do it with a little script that takes Signal.Value and which is putting this into a Unity UI text box.

0
Answered

Chain rotation is bugged

SMF - 3PTechnology 4 years ago updated 4 years ago 8

I implemented your chain script as descript in https://game4automation.com/documentation/current/chain.html and as you have done in the scene DemoChain. The rotation of my chain elements are not correct and jumps at some points along the chain. All my anchers and all their tangent have rotation (0,0,0). I don't understand what I have done wrong. 

Image 316

Answer
Support 4 years ago

I don't know exactly how you would like to align the objects. But playing around with the Align Object and the rotation of the geometry in your Chain Element should do the job. Please check the video:

QbVAbcVI4D.mp4

0
Answered

Change the model from CADLink to a prefab (MU)

zhou zhou 4 years ago in CADLink updated 4 years ago 2

Hi,


 I use CADLink importing a model into scene and want to make a MU.  How to change it to a prefab quickly ? Thanks so much.

Image 300



0
Answered

RobotDK jitter

Дмитрий Мурашов 4 years ago in General Questions updated by Support 4 years ago 2
Hello, i add RobotDK API to game4automation
Youtube video
if check on video Comm cycle in very long, without moving in RobotDK it's 3-5ms, during movment is is 1500ms, is any possibility to make it smaller and more stable? or it is problem of RobotDK ?


Here is code od RobotDK script.

using System;
using UnityEngine;
using Sharp7;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace game4automation
{
public class RoboInterfaceDK : InterfaceThreadedBaseClass
{

[ReadOnly] public string notifybar;
[ReadOnly] public string txtJoints;

public string Adress = "localhost"; //!< The ip adress of the PLC

public Drive Axis1;
public Drive Axis2;
public Drive Axis3;
public Drive Axis4;
public Drive Axis5;
public Drive Axis6;



private RoboDK RDK = null;
private bool starting = true;

// Keep the ROBOT item as a global variable
private RoboDK.Item ROBOT = null;


public bool Check_RDK()
{
// check if the RDK object has been initialised:
if (RDK == null)
{
notifybar = "RoboDK has not been started";
return false;
}

// Check if the RDK API is connected
if (!RDK.Connected())
{
notifybar = "Connecting to RoboDK OK!";
// Attempt to connect to the RDK API

if (!RDK.Connect())
{

notifybar = "Problems using the RoboDK API. The RoboDK API is not available...";
return false;
}


}
return true;
}

public string Values_2_String(double[] dvalues)
{
if (dvalues == null || dvalues.Length < 1)
{
return "Invalid values";
}
// Not supported on .NET Framework 2.0:
//string strvalues = String.Join(" , ", dvalues.Select(p => p.ToString("0.0")).ToArray());
string strvalues = dvalues[0].ToString();
for (int i = 1; i < dvalues.Length; i++)
{
strvalues += " , " + dvalues[i].ToString();
}

return strvalues;
//return "";
}
public void SelectRobot()
{
notifybar = "Selecting robot...";
if (!Check_RDK())
{
ROBOT = null;
return;
}
ROBOT = RDK.ItemUserPick("Select a robot", RoboDK.ITEM_TYPE_ROBOT); // select robot among available robots
//ROBOT = RL.getItem("ABB IRB120", ITEM_TYPE_ROBOT); // select by name
//ITEM = RL.ItemUserPick("Select an item"); // Select any item in the station
if (ROBOT.Valid())
{
ROBOT.NewLink(); // This will create a new communication link (another instance of the RoboDK API), this is useful if we are moving 2 robots at the same time.
notifybar = "Using robot: " + ROBOT.Name();
}
else
{
notifybar = "Robot not available. Load a file first";
}
}

public bool Check_ROBOT(bool ignore_busy_status = false)
{
if (!Check_RDK())
{
return false;
}
if (ROBOT == null || !ROBOT.Valid())
{
notifybar = "A robot has not been selected. Load a station or a robot file first.";
SelectRobot();
return false;
}
try
{
notifybar = "Using robot: " + ROBOT.Name();
}
catch (RoboDK.RDKException rdkex)
{
notifybar = "The robot has been deleted: " + rdkex.Message;
return false;
}

// Safe check: If we are doing non blocking movements, we can check if the robot is doing other movements with the Busy command
/*if (!MOVE_BLOCKING && (!ignore_busy_status && ROBOT.Busy()))
{
notifybar = "The robot is busy!! Try later...";
return false;
}*/
return true;
}

//! Updates all signals in the parallel communication thread
protected override void CommunicationThreadUpdate()
{
if (!Check_ROBOT(true)) { return; }

double[] joints = ROBOT.Joints();
//Mat pose = ROBOT.Pose();

// update the joints
Axis1.TargetStartMove = !Axis1.TargetStartMove;
Axis1.TargetPosition = (float)joints[0];

Axis2.TargetStartMove = !Axis2.TargetStartMove;
Axis2.TargetPosition = (float)joints[1] + 90;

Axis3.TargetStartMove = !Axis3.TargetStartMove;
Axis3.TargetPosition = (float)joints[2] - 90;

Axis4.TargetStartMove = !Axis4.TargetStartMove;
Axis4.TargetPosition = (float)joints[3];

Axis5.TargetStartMove = !Axis5.TargetStartMove;
Axis5.TargetPosition = (float)joints[4];

Axis6.TargetStartMove = !Axis6.TargetStartMove;
Axis6.TargetPosition = (float)joints[5];

string strjoints = Values_2_String(joints);
txtJoints = strjoints;

}


public override void OpenInterface()
{

if (RDK == null) { RDK = new RoboDK(); }
base.OpenInterface();
}


public override void CloseInterface()
{
//if (!Check_RDK()) { ;}
// Force to stop and close RoboDK (optional)
// RDK.CloseAllStations(); // close all stations
// RDK.Save("path_to_save.rdk"); // save the project if desired
//RDK.CloseRoboDK();
RDK = null;

base.CloseInterface();
}

private void Update()
{
//Check_RDK();
/*if (Check_RDK()) { starting = false; }

if (!Check_RDK() && !starting)
{
RDK = new RoboDK();

}*/


}
}
}

Answer
Support 4 years ago

Hi, I checked your example on my computer. It moves smoothly on my side´(RoboDK and G4A),

I think your started to implement your own RoboDK Interface because you did not purchased professional version - right?

It could save you some time to use G4A Professional. Please get in contact with me if you need an offer.