How to specify motor/wheel orientation?
I'm building a 4-wheel drive mobile robot, and having some basic issues with control. In order to teleop my robot, I have to flip the angular scale with a negative sign as shown below in my teleop_xbox.yaml file:
teleop_twist_joy: axis_linear: 1 scale_linear: 0.4 scale_linear_turbo: 2.0 axis_angular: 0 scale_angular: -1.4 scale_angular_turbo: -2.4 enable_button: 6 enable_turbo_button: 7 joy_node: deadzone: 0.1 autorepeat_rate: 10 dev: /dev/input/js0
The real problem arises when I use move_base to autonomously navigate. I notice that the robot turns left when it should turn right, and vice versa. So, at this point I'm fairly confident that if I can figure out a way to correct the setup so I don't have to flip the sign on the angular scale in my teleop_xbox.yaml file, the move_base node will work as expected.
So, my question is, where do I specify the orientation of my motors/wheels. Is this done in the description.urdf file, and if so how does the diff_drive package pick this up? Does the package expect all 4 motors to be oriented in the same way, or does it expect one side to be opposite the other? I think I'm just confused about the correct way to setup a 4-wheel drive robot, and where to specify that the right side motors are oriented one way, and the left side motors are oriented the other way.
I apologize if this is a super basic question or poorly worded. I know how to do this manually with past arduino robots, but I am currently lost in figuring out what the ros packages expect. Thank you in advance.