Author Topic: Kuka Robot control with mxA in two sections with sensors  (Read 1877 times)


  • Forum User
  • *
  • Posts: 1
    • View Profile
Kuka Robot control with mxA in two sections with sensors
« on: July 09, 2021, 06:14:37 PM »

we are Construction Robotics students and now doing a project on robot controlling with sensors.

We successfully realize a process on robot with mxA and sensors:
The robot starts moving when the sensors fulfil the specific condition and send data.

We wonder whether it's possible to control the robot in two sections:
The robot is moving from A to B when the 1st sensor sends data (true);
then the robot waits in position B;
until the 2nd sensor sends data (true), the robot starts to move to C.

many thanks in advance
best wishes

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1346
    • View Profile
    • Robots in Architecture
Re: Kuka Robot control with mxA in two sections with sensors
« Reply #1 on: July 12, 2021, 07:51:23 AM »
Good Morning,

The tricky thing about this is the data flow in Grasshopper. Let's say you query your digital inputs every 100ms, it means that Grasshopper also creates a new toolpath every 100ms.
In default mode, every time you get a new set of movement commands, the robot starts from the beginning. In iterative mode it waits until it has finished it current set of commands before it moves to the next one, and in queue mode it just queues up commands (which would be a bad idea with a new toolpath 10 times per second).
Only if the toolpaths are identical it will skip them (the definition of "identical" in Grasshopper is sometimes tricky, though).

What I would test is to create a conditional statement (e.g. via Dispatch) in Grasshopper so that depending on your input you either send position B, a wait command, or position C and set the mxA mode to iterative.