Ask Your Question
0

is it necessary to have URDF model for diff_drive_controller

asked 2018-08-16 15:20:34 -0500

ShehabAldeen gravatar image

updated 2018-08-16 18:08:45 -0500

Hello,

I am building a differential drive robot and trying to exploit the power of ros_control by using the diff_drive_controller into my project

I have found that I have to fulfill some hardware requirements to the controller in order to be able to use it and that's what I have done but due to my limited knowledge in URDF and TF I can't understand the part of the left_wheel_joint and right_wheel_joint in the configuration of the controller

shall I first make a URDF model of my robot to be able to use the diff_drive_controller or I can just make a TF to use or it's not possible? what shall I write in the following parameters?

left_wheel
right_wheel

I will appreciate your help

edit retag flag offensive close merge delete

Comments

Please change the title of your question.

The title makes it seem like you want to know whether urdf is required for TF in general, but your question text appears to be asking whether a urdf is needed for use with diff_drive_controller.

Those are two different things.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-16 15:48:11 -0500 )edit

Yes I missed that sorry

ShehabAldeen gravatar imageShehabAldeen ( 2018-08-16 18:08:24 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-08-17 03:59:05 -0500

Yes, it's necessary to have a URDF. The parameters left_wheel and right_wheel need to be set to the joint names from the URDF.

In your URDF, you also need a transmission for that joint. If you want to look at an example, in my mir_robot stack I use the diff_drive_controller (but only in Gazebo, not on the real robot). I have converted the xacro to a URDF (using xacro --inorder mir.urdf.xacro > mir.urdf) and deleted a couple of things that are not relevant to your question. The result is here:

https://gist.github.com/mintar/5d8e60...

You can see that there is one joint for each wheel and a transmission for both. There are also four caster wheels; you don't need them of course if your robot doesn't have them. Note that you need to run sudo apt install ros-kinetic-mir-description if you want to try the URDF.

edit flag offensive delete link more

Comments

Thank you for your help and for sure I will use your URDF code as a reference to write my own Thank you for your time

ShehabAldeen gravatar imageShehabAldeen ( 2018-08-17 07:07:16 -0500 )edit

I have another question, is it necessary to have URDF model even if I will not simulate the robot I just want to interface it directly to hardware?

ShehabAldeen gravatar imageShehabAldeen ( 2018-08-17 13:04:03 -0500 )edit

Yes. I had already removed everything from the URDF that is only necessary for simulation. But your URDF could even be much simpler than my example; for example, the caster wheels could be deleted. Also you don't even need the visual and collision tags for your purpose.

Martin Günther gravatar imageMartin Günther ( 2018-08-17 14:01:46 -0500 )edit

Thanks a ton

ShehabAldeen gravatar imageShehabAldeen ( 2018-08-17 16:36:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-08-16 15:20:34 -0500

Seen: 318 times

Last updated: Aug 17 '18