How to continuosly read robot joint configuration with PC SDK?
depa91
✭
in RobotStudio
I'm working on a project that requires creating a digital-twin between a robot controller and an Unity3D environment.
I'm using Robot Studio as an emulation environment with a virtual IRB 2600 robot.
When the virtual IRB 2600 moves in Robot Studio, another virtual IRB 2600 should move accordingly in the Unity3d environment.
My idea is to read the joint configuration (using PC SDK) of the IRB 2600 robot instantiated in Robot Studio and then send it to Unity3D over a socket connection.
According to https://developercenter.robotstudio.com/api/pcsdk/articles/Manual/Using-the-PC-SDK/Motion-domain.html the joint configuration can be accessed using the GetPosition() method of the MotionSystem class.
However, I'm not sure how to continuously read the joint configuration.
Should I use a simple "infinite" while loop or is it possible to be notified when the joint configuration has changed (e.g., with an event)?
Thank you
I'm using Robot Studio as an emulation environment with a virtual IRB 2600 robot.
When the virtual IRB 2600 moves in Robot Studio, another virtual IRB 2600 should move accordingly in the Unity3d environment.
My idea is to read the joint configuration (using PC SDK) of the IRB 2600 robot instantiated in Robot Studio and then send it to Unity3D over a socket connection.
According to https://developercenter.robotstudio.com/api/pcsdk/articles/Manual/Using-the-PC-SDK/Motion-domain.html the joint configuration can be accessed using the GetPosition() method of the MotionSystem class.
However, I'm not sure how to continuously read the joint configuration.
Should I use a simple "infinite" while loop or is it possible to be notified when the joint configuration has changed (e.g., with an event)?
Thank you
Tagged:
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings