How to Create a URDF for a Mobile Robot That Can Paint Like in the Video?

I want to create a URDF for a mobile robot that can perform painting tasks exactly like in the video in below link. The robot needs to move around and apply paint to surfaces accurately in simulation.

The link: https://www.youtube.com/watch?v=cTrxOl3FSrA&pp=ygUJdHVyZiB0YW5r

I’m looking for guidance on:

  1. Defining the robot’s structure in URDF (chassis, wheels, painting arm, etc.)
  2. Adding actuators and joints for precise painting movement
  3. Simulating the painting action in Gazebo or another simulator
  4. Integrating sensors (e.g., cameras or LiDAR) for navigation and painting precision

Has anyone worked on something similar? Any tips, example URDFs, or relevant resources would be greatly appreciated!

As you write about your open problems, you probably need professional Gazebo/ROS consulting. Search the web, there are some consultants.

Generally, the official ROS2 (Humble) Tutorial on how to make a robot simulation from scratch is this:

which is quite verbose, including how to use it in Gazebo:

Beware that Gazebo Classic is EOL, if e.g. you are using ROS2 Humble, the official Gazebo Version would be Gazebo IONIC.

This should solve your problems 1. 2. and 4.

Painting is another thing. My best guess is:

“Paint” could a static model in Gazebo. Gazebo let’s you spawn models while it’s running. If you define a ROS2 service to spawn a paint-model on the position and heading of your robot, you might get it good enough. The robot could just call that service whenever if wants to paint.

Beware you are spawning stuff in the Gazebo-frame not map, odom ROS2 frames etc. Curves would naturally never be perfect, since everything would be a string of straight paint pieces.

Generally people don’t build an URDF by hand unless they are using it for educational or research purposes.

I would wager that the vast majority of URDF files used in the wild are generated from the robot’s CAD files.

I disagree. I am yet to see a CAD model (of a student) to be good enough to come out good from automatic URDF export. There is a lot to go wrong and it will make an non-debuggable mess of autogenerated code. It’s a good idea for professionals with very good CAD models where everything (joints, masses, inertia) is correct, not for beginners.

If you build your rigid bodies in CAD (e.g. wheels and body in the simple driving robot case), you can then write your URDF by hand and reference the CAD files (.dae .stl etc.) as collision and visual meshes.

You need to add sensors, plugins etc. by hand in the end, too, in both cases.

I usually start the process by modeling the robot using Simscape and then exporting the rigid body as URDF. Simscape allows you to build very complex rigid body assemblies and simulate them. You can then hook up your model to controllers defined in Simulink and have a complete simulation setup. Give it a try.

Here is a link to how to build a robot using Simscape:
https://www.mathworks.com/matlabcentral/fileexchange/119268-excavator-design-with-simscape

Yet another thread that I learned so much from. I did not know there were so many URDF exporters available and was under the impression most did it by hand. Im just now completing the design of my first robot in F360 and looking forward to getting in the sim.

it seems the key aspects of a good URDF to get the most out of a sim is to get the Masses, Centers of Masses, and inertia diagonals correct while keeping the collision geometry simple to optimize performance, as mentioned in Alex Hatori’s excellent blog: Stride - Wheeled Biped: Mujoco Sim — ALEX HATTORI

Also. slightly off topic but.. the evaluation phase always takes the longest.

As mentioned, id like to complete a primer in gazebo and move through the F3D to URDF authoring pipeline, but long term id like to look into MuJoco as they have a very cool unity plugin and “live” in editor tutorial… GitHub - Balint-H/mj-unity-tutorial: Introductory set of tutorials for using the Unity plugin of MuJoCo with the ML-Agents framework.

works with URDFs but aparently also has their own mjcf format that offers a little more flexibility.

Looks like you looking for GitHub - drfenixion/freecad.robotcad: RobotCAD is a FreeCAD workbench to generate robot description packages for ROS2 (URDF) with launchers to Gazebo and RViz. Includes controllers based on ros2_controllers and sensors based on Gazebo.