Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connecting to two different IP (2 UR Robots) #4

Open
CheAbdullah opened this issue Oct 27, 2022 · 3 comments
Open

connecting to two different IP (2 UR Robots) #4

CheAbdullah opened this issue Oct 27, 2022 · 3 comments

Comments

@CheAbdullah
Copy link

Hi Roman Parak,

I am tring to connect to two different UR16 - on two different IPs
if I use the same ur_data_processing(https://github.com/rparak/Unity3D_Robotics_UR/blob/main/Universal_Robots_Unity_App/Assets/Scripts/UR3/ur_data_processing.cs) then, the unity arm A will follow the actual Robot Arm A, but Unity Arm B will do the same as well, before it goes to the actual Robot Arm B's pose. And, this repeats over time, sometimes A copy B, and sometime B copy A.

How do I make sure that unity amr A copy actual Robot Arm A only, and the same for Arm B?

Thanks,
Kind regards,
Zul

@CheAbdullah
Copy link
Author

IEnumerator set_FlipflopSwitch2(int which)
{
yield return new WaitForSeconds(delay);// (0.05f);
if (which == 1)
{
LeftRobot.GetComponent<ur_data_processing>().enabled = true;
RightRobot.GetComponent<ur_data_processing>().enabled = false;

        LeftRobot.GetComponent<ur_data_processing>().main_ur_state = 1;
        LeftRobot.GetComponent<ur_data_processing>().connectionStatus = true;

        RightRobot.GetComponent<ur_data_processing>().main_ur_state = 0; // go to disconnect state
        RightRobot.GetComponent<ur_data_processing>().connectionStatus = false;
    }

@CheAbdullah
Copy link
Author

at the moment, I am just switching on and off the state for Arm A and Arm B. and, this results with A copying B, and A goes to the right pose for A, and then copy B again, afterwards.

@rparak
Copy link
Owner

rparak commented Oct 30, 2022

Hi Zul,

sorry for the late response, but I'm really busy.

The problem is that the program "ur_data_processing.cs" contains global variables for control, data collection and also for user interface control.

My advice is that you need to create another global variable to control and collect data from robot 2. It is also necessary to change the programs for collecting data from the robot joints "ur3_link{1 .. 6}.cs". Because inside the programs there is a global variable from "ur_data_processing.cs".

I'm working on a new update so I'll probably add a feature to connect multiple robots at the same time.

Thank you for your feedback. I hope everything is clear, if not, please email me again.

Best regards,
Roman Parak

Repository owner deleted a comment from rajmeetsng Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants