Robot is moving in different directions

Hi Everyone,

I am facing an unexpected behavior here. While I am operating the Bot using “teleop_twist_keyboard” usually the following keys should work as expected
i
j k l
,

In my case, while I am pressing the “j” key the bot is moving on the right direction instead of Left direction as expected and “i” is going backwards rather moving forward.

My right wheel is connected to the M0 now.

Any help is appreciated.
@towen

Errrrr. Sounds like you have a sign wrong somewhere. :stuck_out_tongue:

Normally in ROS, you have coordinate transform objects to convert between different coordinate spaces, like XY to JT (where J and T are your ODrive axes).

(I assume you are using ROS, based on the fact that you mention teleop_twist_keyboard which IIRC is the name of a ROS input driver…)

Hi @towen Thanks for your response.

Yes, I am using ROS melodic. which parameters should I changed in “odrive_ros” package to correct this?

Can’t you insert a transformation of [-1, 0; 0, -1] between the teleop_twist and odrive_ros nodes?
It’s been a while since I’ve used ROS though.