# \[Bug\] Inaccurate movements

**URL:** <https://get-help.theconstruct.ai/t/bug-inaccurate-movements/32809>\
**Category:** Python Basics For Robotics\
**Created:** [October 4, 2024, 4:20pm UTC](https://get-help.theconstruct.ai/t/bug-inaccurate-movements/32809 "2024-10-04T16:20:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![professor.herman](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/professor.herman/32/9348_2.png) [@professor.herman](https://get-help.theconstruct.ai/u/professor.herman)\
**Post date:** [October 4, 2024, 4:20pm UTC](https://get-help.theconstruct.ai/t/bug-inaccurate-movements/32809/1 "2024-10-04T16:20:18Z")

</div>

This is an error report.

* * *

**Screenshot of the error**

 ![](https://get-help.theconstruct.ai/uploads/default/original/2X/c/c8f71f2ca5a03ed8f5722c4befcd1d3626494f8d.jpeg)
* * *

**Error details**

robotcontrol.turn("counterclockwise", 1.5708, 1) Doesn't this mean the robot should turn 1.5708 (ie. 90 deg) radians in one second?

---

<div class="post-metadata">

**Author:** ![jpvaldivia7](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jpvaldivia7/32/8925_2.png) [@jpvaldivia7](https://get-help.theconstruct.ai/u/jpvaldivia7)\
**Post date:** [October 8, 2024, 9:29pm UTC](https://get-help.theconstruct.ai/t/bug-inaccurate-movements/32809/3 "2024-10-08T21:29:22Z")

</div>

Hi @professor.herman, yes, you are correct that the method call `robotcontrol.turn("counterclockwise", 1.5708, 1)` is intended to make the robot turn **counterclockwise** at a speed of **1.5708 radians per second** for **1 second**.  
You can also check the method definition that is:

```auto
    def turn(self, clockwise, speed, time):

        # Initilize velocities
        self.cmd.linear.x = 0
        self.cmd.linear.y = 0
        self.cmd.linear.z = 0
        self.cmd.angular.x = 0
        self.cmd.angular.y = 0

        if clockwise == "clockwise":
            self.cmd.angular.z = -speed
        else:
            self.cmd.angular.z = speed

        i = 0
        # loop to publish the velocity estimate, current_distance = velocity * (t1 - t0)
        while (i <= time):

            # Publish the velocity
            self.vel_publisher.publish(self.cmd)
            i += 1
            self.rate.sleep()

        # set velocity to zero to stop the robot
        self.stop_robot()

        s = "Turned robot " + clockwise + " for " + str(time) + " seconds at " str(speed) + " radians/second"
        return s

```

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [October 13, 2024, 9:29pm UTC](https://get-help.theconstruct.ai/t/bug-inaccurate-movements/32809/4 "2024-10-13T21:29:36Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
