Repository Summary

Description This is a workspace where you can easily and using its wizard, make your own mobile robot URDF file in minutes. Let's try it!
Checkout URI https://github.com/ali-pahlevani/mobile_robot_urdf_maker.git
VCS Type git
VCS Version main
Last Updated 2025-05-19
Dev Status UNKNOWN
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

README

Mobile_Robot_URDF_Maker (v3)

Automate the process of making a URDF for your mobile robot using this “Wizard

Preview_Image

  • You can now easily choose any controller you want for your selected mobile robot. A new page has been added to the wizard which let’s you choose one of the six available controllers.
  • Based on the type of your robot, you may choose one these controllers:
  • 2-Wheeled Robot with a Caster Wheel:
    • Differential-Drive Controller
  • 3-Wheeled Robot (Tricycle):
    • Tricycle Controller
    • Tricycle-Steering Controller
  • 4-Wheeled Robot:
    • Differential-Drive Controller (Skid-Steering)
    • Ackermann-Steering Controller
    • Mecanum-Drive Controller
  • After choosing the controller type and setting the parameters of the robot, the corresponding values for the controller will be set in the specific config file of that controller type (config files can be found at: /mobRobURDF_control/config/).

Controller_List

  • Other good news is that now you can simulate your robot in Modern Gazebo (since the Gazebo Classic has reached its EOL). In order to do that, a new launch file has been added. By launching this launch file, robot, Gazebo world, and all the controllers will be spawned. Also, Rviz2 window will open up as well; so, please build the workspace, source it, and finally run the following command:
ros2 launch mobRobURDF_launch gazebo_test.launch.py

Gazebo_Scene


  • It should be mentioned that for now, all the twist commands are unstamped; however, the stamped versions are on the way. For now, in order to control the robot in gazebo teleoperately, please run one of the following lines in another terminal based on your controller type:

Differential-Drive Controller:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/diffDrive_controller/cmd_vel_unstamped

Tricycle Controller:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/tricycle_controller/cmd_vel

Tricycle-Steering Controller:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/triSteer_controller/reference_unstamped

Differential-Drive Controller (Skid-Steering):

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/diffDrive_controller/cmd_vel_unstamped

Ackermann-Steering Controller:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/ackerSteer_controller/reference_unstamped

Mecanum-Drive Controller:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/mecDrive_controller/reference_unstamped

Rviz2


  • One more thing to mention is that some of the controllers don’t publish odom->base_link tf by themselves. For those ones, you’ll need to run a separate node for publishing odom->base_link tf and odometry topic. Soon, I’ll add those necessary nodes as well, so that you won’t need to do anything at all.

  • Finally, you can modify the Gazebo physical properties for your simulation in the following file: /mobRobURDF_description/urdf/gazebo_files/gazebo_properties.xacro. Also, you may add a new world (based on your needs) in the following directory: /mobRobURDF_gazebo/worlds/ (and then modify the launch file).

  • I almost forgot it. Another good news is that now, by generating the URDF for your robot, not only a .urdf file is created, also a .urdf.xacro file is created as well (/mobRobURDF_description/urdf/mobRob.urdf and /mobRobURDF_description/urdf/mobRob.urdf.xacro), so that you can easily modify the parameters after closing the wizard.

  • Finally, one minor fix is that in this version, the caster wheel (for the 2WC robot type) has 3-DOF for free motion (instead of its previous fixed joint).


Just like the previous version, the path to run the wizard is as simple as you can see:

In order to run the Wizard, first you need to clone the workspace:

git clone https://github.com/ali-pahlevani/Mobile_Robot_URDF_Maker.git
cd Mobile_Robot_URDF_Maker

For the next step, you’ll need to install the dependencies:

sudo apt update
rosdep install --from-paths src --ignore-src -r -y
sudo apt install python3-pyqt5 python3-pyqt5.qtopengl
pip install PyOpenGL PyOpenGL_accelerate
pip install ruamel.yaml

After that, you should build the workspace and source the installation:

```bash colcon build –symlink-install source install/setup.bash

File truncated at 100 lines see the full file