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.
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.
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.
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.