Robotics StackExchange | Archived questions

When my robot rotates instead of going straight ahead

Hello, I am having an issue with my robot's movement. When I publish linear x using the /cmd_vel topic, my robot attempts to turn left. Additionally, when I send an angular z command for left turn, it moves backward, and for right turn, it moves forward, despite my commands being different. This issue suddenly occurred despite there being no changes made to the robot. What steps can I take to resolve this issue?

thank you for reading.

Asked by seul on 2023-03-08 02:56:52 UTC

Comments

Can you add your /cmd_vel commands in the edit of the question? Can you show us your code? Maybe your input control to the velocities' translation has some issues

Asked by ljaniec on 2023-03-08 20:41:28 UTC

@ljaniec i just commanded rostopic pub /cmd_vel geometry_msgs/msg/Twist "linear: x: 0.1, y: 0.0, z: 0.0 angular: x: 0.0, y: 0.0, z: 0.0" but my robot rotates not going straight ahead

Asked by seul on 2023-03-08 23:20:16 UTC

Can you see the logs? What software is on the side of the robot?

Asked by ljaniec on 2023-03-09 08:49:31 UTC

@ljaniec thank you for answering. i solved this. still i don't know why because i used this for long times without any problems, and i didn't change anything... Eventually i changed motor direction settings in my code. i guess my motor firmware upgraded and that maybe changed how it works. i think it doesn't make sense, but i can not find any reasons :)...

Asked by seul on 2023-03-09 23:48:38 UTC

Answers