# Wrong trajectory by using force mode

**URL:** <https://forum.universal-robots.com/t/wrong-trajectory-by-using-force-mode/12429>\
**Category:** Technical Questions\
**Created:** [February 19, 2021, 7:28am UTC](https://forum.universal-robots.com/t/wrong-trajectory-by-using-force-mode/12429 "2021-02-19T07:28:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon29076222](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@anon29076222](https://forum.universal-robots.com/u/anon29076222)\
**Post date:** [February 19, 2021, 7:28am UTC](https://forum.universal-robots.com/t/wrong-trajectory-by-using-force-mode/12429/1 "2021-02-19T07:28:57Z")

</div>

Hello,  
I am having a problem using force mode. I have to draw on a plan with a marker.  
I pilot the robot in force mode so as not to damage the marker and keep contact with the surface.  
I calculate the position of different points. When I run the program the robot does not go to the calculated points.  
The trajectories are wrong but reproducible. If I run the program without force mode everything is ok, the TCP goes on the calculate position.

Here is a part of my program:

> freedrive\_mode()
> 
> sleep (5.0)  
> end\_freedrive\_mode()
> 
> i\_Reloc≔get\_actual\_tcp\_pose()
> 
> p\_contact\_piece≔pose\_trans(i\_Reloc,p[0,0,0,0,0,0])  
> p\_point1≔pose\_trans(i\_Reloc,p[0.105,0.14,0,0,0,0])  
> p\_point3≔pose\_trans(i\_Reloc,p[0.105,0.49,0,0,0,0])  
> p\_point22≔pose\_trans(i\_Reloc,p[-0.87,0.14,0,0,0,0])  
> p\_point24≔pose\_trans(i\_Reloc,p[-0.87,0.49,0,0,0,0])
> 
> zero\_ftsensor()  
> force\_mode(tool\_pose(), [0, 0, 1, 0, 0, 0], [0.0, 0.0, 2, 0.0, 0.0, 0.0], 2, [0.1, 0.1, 0.15, 0.17, 0.17, 0.17])
> 
> movel(p\_contact\_piece, a=1.2, v=0.25)  
> movel(p\_point1, a=1.2, v=0.25)  
> movel(p\_point22, a=1.2, v=0.25)  
> movel(p\_point24, a=1.2, v=0.25)  
> movel(p\_point3, a=1.2, v=0.25)  
> movel(p\_point1, a=1.2, v=0.25)
> 
> end\_force\_mode()

In this picture you can see my test trajectory.

 ![tracer 1](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/1983cca9e9bcccf72399d5f3942d90b0ad4ef9e4.jpeg)

Please can you help me or tell me where I made a mistake.

---

<div class="post-metadata">

**Author:** ![Ebbe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ebbe/32/1413_2.png) [@Ebbe](https://forum.universal-robots.com/u/Ebbe)\
**Post date:** [March 8, 2021, 1:23pm UTC](https://forum.universal-robots.com/t/wrong-trajectory-by-using-force-mode/12429/2 "2021-03-08T13:23:50Z")

</div>

Hi @anon29076222,

I would expect your marker not to be completely perpendicular to the board. In that case your tool-z axis force will contribute to a translation on the plane of the board.
