0

I am currently a university student working on an extracurricular project where we built a 3D printed SCARA robot that will be remotely controlled. On one end, you have the user that is moving their hand and gathering location based on x,y, and z coordinates. Those coordinates will then be sent to the SCARA robot which will move to those coordinates.

Currently we are attempting to figure out the best way to do this with as little latency as possible.

Our current idea is to create an API that sits between the two — with the users client making an update request to the API with the coordinates and pushing them to the SCARA robot.

Our greatest concern with this is latency and what happens when when there is a delay on one end.

The reason I am posting here is I'm looking to inquire into whether any of you have suggestions on where we should look for help with this or have any ideas that would be a better solution. We seem to be at a road block and just looking for some fresh eyes. We are all undergrad students.

So what would be the best way to accomplish this?

Thank you so much for your time and if there is anything I can add for clarity, please don't hesitate to ask.

Best

7
  • 2
    I think in order to answer this question we'd need to know how the API communicates with the robot. Is there a custom hardware peripheral? How is that accessed?
    – John Wu
    Commented Oct 6, 2021 at 6:13
  • 2
    A good idea is to start measuring and estimating the requirements. How fast does the robot respond? How long latency does the protocol have? for some uses 10ms latency is terrible, but completely irrelevant for others. When unfamiliar with a system, it is fairly easy miss-identify the problem areas.
    – JonasH
    Commented Oct 6, 2021 at 7:38
  • Besides the latency, also think about how often position updates need to be communicated to follow the user's movements and what the consequences are of missing some updates. Commented Oct 6, 2021 at 8:18
  • Consider using a framework such as ROS.
    – JS Lavertu
    Commented Oct 6, 2021 at 13:51
  • Over a network (you mentioned HTTP in an answer comment), you inherently have to accept either eventual consistency and/or dropped messages. Depending on the content of the messages (relative vectors vs absolute positioning), this can create considerable issues with the movement of the robot arm. Your question is setting the bar high, but you're lacking the necessary analytical depth to actually weigh the options you need to weigh here.
    – Flater
    Commented Oct 6, 2021 at 14:52

1 Answer 1

1

create an API that sits between the two — with the users client making an update request to the API with the coordinates and pushing them to the SCARA robot.

A classic HTTP API is most likely going to be too slow. But you need to start by defining the system and what you have available. What does the "client" look like? What does the networking environment look like? Are they in the same room being controlled visually, or is there a video link in the other direction (huge latency risk there).

The best case would be if the robot control PC and the client were on the same network, and using a continuous protocol for control. Websockets are probably adequate.

You might want to look at the networking techniques of games, since they focus heavily on latency management.

You will definitely need to consider safety: what happens if the link is lost, or latency spikes?

3
  • Thank you for the response. Unfortunately, it will be over an internet connection which is making it more challenging. I'll dig into the networking techniques of games though! Thank you.
    – Doug
    Commented Oct 6, 2021 at 13:57
  • @Doug consider also looking into modern things like WebRTC, it can not only carry data, but also interfaces with the video api's for remote viewing. Web based games use this
    – Ferrybig
    Commented Oct 6, 2021 at 14:59
  • @Ferrybig thank you!
    – Doug
    Commented Oct 6, 2021 at 17:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.