locked
controlling Simulated robot from external application RRS feed

  • Question

  •  

    Hi,

     

    I posted this message in simulation environment but couldnt get reply, may be i posted it in wrong forum.

     

    Actually i want to control a robot made in RS from someother program running on my computer. this program can be another program made in C#. My first question is how can i do this?

     

    Secondly after not getting reply in simulation forum, I tried to make a new thread and started it in Initialize() method. This thread basically starts a server socket which listen for commands from external program. I am using those commands in Update() method to update the simulation(i am using these commands to turn the robot). I have declared a Boolean "turn" as a class member and both threads(my thread and robotic studio thread) are sharing this variable. I can change its value when i receive command on socket and it shows in that its changed. but update method always shows the first value ie., false. Then i made another class and put "turn" as its data member and made object of that class in my Robot class, but no changes. I implemented lock and readerwriterlocks for thread but no changes.

     

    update only receives the changed value only if i pause the command prompt running besides the simulation. 

     

    my questions is if its the correct method to give input to robotic studio from other program. and if yes then what mistake i am making.

     

     

    Wednesday, November 7, 2007 11:08 AM

Answers

  • Hi, you will need to review our service tutorials to understand how to talk to services first. In there we describe how you can use your web browser, or a simple Windows Form UI to talk to your service, and your robot.

     

    To do this from an arbitrary C# EXE, you can use our DssEnvironment class. Please see our new HostingTutorials for details on this.

     

    Search for DssEnvironment in this forum and you will see many examples.

     

    RoboticsTutorial4 also has examples of using winforms to control services and robot drives, etc

     

    Thursday, November 8, 2007 11:24 PM