# 如何使用servoj走出精确的圆？

**URL:** <https://forum.universal-robots.com/t/servoj/29072>\
**Category:** 中文提问(Questions in Chinese)\
**Created:** [June 19, 2023, 12:15pm UTC](https://forum.universal-robots.com/t/servoj/29072 "2023-06-19T12:15:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robotq](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@robotq](https://forum.universal-robots.com/u/robotq)\
**Post date:** [June 19, 2023, 12:15pm UTC](https://forum.universal-robots.com/t/servoj/29072/1 "2023-06-19T12:15:26Z")

</div>

你好，我正在做机器人的轴孔装配应用，并通过rtde上位机控制机器人。我需要走一个圆的轨迹来寻找孔的位置，同时在寻找过程中需要具有一定的柔顺性。因此我选择使用servoj来编写我的力控算法，但是这样一来，我就必须使用servoj来实现圆的轨迹，而不是movec。  
请问servoj的工作原理是什么？我感觉servoj在每个loop里都走不到我发送的位置，它可以精确地走出圆的轨迹吗？能否提供一些思路或者demo？谢谢！

---

<div class="post-metadata">

**Author:** ![tizh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tizh/32/4176_2.png) [@tizh](https://forum.universal-robots.com/u/tizh)\
**Post date:** [July 17, 2023, 3:15am UTC](https://forum.universal-robots.com/t/servoj/29072/2 "2023-07-17T03:15:51Z")

</div>

Hi,

Servoj是一种类似PID控制思路的底层控制指令，它不存在速度规划，所以需要您自己做速度规划，然后将离散点下发。

可参考以下文章  
[https://www.universal-robots.com/articles/ur/programming/servoj-command/](https://www.universal-robots.com/articles/ur/programming/servoj-command/)

> [@Usage of servoj](https://forum.universal-robots.com/t/usage-of-servoj/4447):
>
> Hello, I’m trying to replay a sampled trajectory and in order to do it smoothly I need to use servoj (according to what I’ve read on the forum). I want to replay my trajectory as recorded, meaning with the same speed. But the speed is correlated to the gain with servoj. I don’t really understand how this variable work on the movement. If you have anything to help me, and if you have a formula showing how the speed is calculated with servoj. It would be perfect. Thank you.
