ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to specify motor/wheel orientation?

asked 2021-09-13 01:44:11 -0500

AidanK gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-13 15:23:22 -0500

Mike Scheutzow gravatar image

I asked this same question a couple months ago. Answer: #q382193

edit flag offensive delete link more

Comments

Thank you, I managed to wire my motor controller so that my navigation works as expected.

AidanK gravatar image AidanK  ( 2021-09-16 21:35:03 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-09-13 01:44:11 -0500

Seen: 162 times

Last updated: Sep 13 '21