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

Adding wheel diameter(diff_drive_controller) for a stl file added in urdf

asked 2023-07-10 09:00:53 -0500

the_one gravatar image

I created a 4 wheel bot and i want it to move with the help of diff_drive_controller by giving parameters like all 4 wheel joints, wheel separation,wheel diameter and so on... the thing is my wheel is not created by a shapes, instead i added a stl file for left and right wheel. so, i have to give the wheel diameter to make it move, how can i give the diameter of a stl file which i don't know?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2023-07-10 10:10:38 -0500

MSanMon gravatar image

You can "measure" them creating a simple cylinder model and adjusting its radius to visually match the size of your wheels. Then you save the model and read the radius value in the .sdf file (<geometry><cylinder length="" radius=""/></geometry>).

edit flag offensive delete link more

Comments

It would also be useful when you are implementing collision geometry, as you certainly should when working with any robot. This way, you define your collision cylinder, and then copy over the diameter to your controller parameters

sampreets3 gravatar image sampreets3  ( 2023-07-11 05:12:40 -0500 )edit

i already gave the collision geometry for the wheels( same as added mesh file in visual geometry). I added an stl file for the wheels because of i don't want to implement the wheel part from just shapes.

the_one gravatar image the_one  ( 2023-07-11 23:49:49 -0500 )edit

hey, thank you for your reply. Actually i got the wheel size of an stl file from online free websites by just uploading and measuring it. I should have done that before asking here.

the_one gravatar image the_one  ( 2023-07-11 23:50:17 -0500 )edit

moving forward, how can i give the diff_drive_controller for a wheel wheeled bot? I searched online, many are 2 wheeled robots. i tried many different ways, but the robot doesn't move a mm when i run give this command in another terminal rostopic pub /cmd_vel geometry_msgs/Twist -r 10 -- '[0.2, 0.0, 0.0]' '[0.0, 0.0, 0.6]' and the wheels are in gazebo are so shaking. i don't know why. how can i make it move?

the_one gravatar image the_one  ( 2023-07-12 01:33:56 -0500 )edit
0

answered 2023-07-18 23:29:10 -0500

the_one gravatar image

I just followed this urdf tutorial for the 4 wheel bot("learning URDF step by step" context) driving with the help of diff_drive_controller.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-07-10 09:00:53 -0500

Seen: 72 times

Last updated: Jul 18 '23