Project Proposal: Visual Gazebo robot model generator

The problem:
If your are like me, you’ve invested an insane amount of hours constructing Gazebo robot models for integration with ROS. Creating a new minimal working robot model often involves recycling old projects or utilizing online examples. This, however, proves time-consuming due to various reasons:

  • establishing a minimal model requires cleaning out all the junk code from recycled projects
  • need to always relearn/remember Gazebo and ROS plugins specific problems and all the weird ways of handling them
  • encountering a slow turnaround time, as even a simple coordinate change in URDF necessitates restarting Gazebo, which can be time-intensive even on high-performance computers.
  • Gazebos fairly vague and unclear of defining errors are not helping
  • remembering all the standards when creating the Gazebo and description packages inside of the ROS workspace
  • I could go on and on, you get the idea…

Idea:
A potential solution could be to a user-friendly tool that streamlines the establishment of a minimal working example by generating fully standardized and ROS-compatible packages for the most common ROS robots (e.g., differential drive, Ackermann, simple arms). Visualizing the tool, one might imagine a user interface where, by selecting a robot type and adjusting parameters, users can instantly preview the rendered robot. I imagine the tool could look something like this:
output

While the demo focuses on basic design adjustments, future iterations could include adding sensors (e.g., lidars, cameras, buttons) or even 3D renders of the robot. Once satisfied with the design, users could generate and download two ROS packages (Gazebo and description) that can be seamlessly imported into their ROS workspace. The exported robot would already include implemented links, joints, controllers, and macros, making it readily executable.

This would not completely eliminate the mentioned problems above, but would at least drastically lower the time needed to get a minimal working example upon which the user can build extensions. This would also lower the entry barrier for beginners and provide a solid, standardized template for making simulated robots.

I am curious to know if the community is aware of existing tools that address similar challenges. Additionally, I am keen to understand if others in the community encounter similar problems in Gazebo robot modeling (or ones that haven’t been mentioned here). Feedback about usefulness of such a tool along with any other comments would be very welcome.

Thanks :slight_smile:

5 Likes

Could you please provide a link to your project code?

As this project is still in the propoposal stage the code for actually generating a gazebo package does not exist. Im still validating the idea and if its even worth starting to code.

I managed to code an MVP for this, this is how it looks like:

output

Here is the link to the code: GitHub - JanezCim/robosimgen if anyone is interested in trying it out. Any feedback would be appreciated.

2 Likes

I did something similar for the Navigation University workshop at ROSCon last year.

I certainly love the idea of having live visual updates of your model and convenient ways to build them out.

though I’d say for myself at least, the biggest gap with existing tools would be if it supported meshes and basic mesh manipulation. I know there are some CAD → URDF/SDF converters out there, but sometimes you need to start from a mesh (e.g. for external models), and I’ve always found it really tedious to use some 3rd party software, like meshlab or blender, to realign or scale or clean up meshes, save them, then reload my URDF do see if I did a good job nailing the alignment in my model. Being able to do that in the context of an assembly (perhaps with ways of estimating diameter or axes of round features) would be hugely beneficial. Not saying it would be easy… but a guy can dream…

2 Likes

Wow yeah, this is similar. I’m interested what the motivation was behind developing this? Did you end up pushing this forward or was it just a workshop thing? I see its written for ROS2 and also has a custom RVIZ pannel - I didn’t know this exsited, will have to look into it.

Yeah I feel the pain. The whole process with the 3rd party software is already tedious enough and then you add the super long turnaround time of Gazebo restarts for every tweak to the mesh scale and origin (because of course they never align with what Blender thinks is the origin).
But one possible doable feature here could be that you could add an editor for basic collision shapes and with those build up something resembling your mesh (basically the same concept as we are doing within URDFs now but visualized)

This is not correct. If origins don’t align, then this is typically due to:

  • Either a misunderstanding of where the actual origin of that part is in Blender,
  • An issue with the export from Blender,
  • Or due to not having entered the right coordinates or reference frames in the SDF.

My process is:

  • To model in Fusion 360 (which has a free license for personal use),
  • Export as FBX,
  • Import the FBX in Blender,
  • If desired: apply textures in Blender and bake texture maps and light maps to get really good looking visuals in Gazebo,
    • This works really well, but is rather involved and typically takes a lot of time. The results are really nice though.
  • Export as DAE,
  • Include that DAE as mesh through the sdf file.

For more info, see my post on RSE.

In my opinion:

  1. Yes it is tedious, but then again this is typically a ‘do once, use many times’ type of task. For those tasks, the best option is generally to just get it over with, instead of trying to automate,
  2. I want nice visuals, so I prefer to spend an extra hour to generate nice models for my simulation, rather then to use a polyhedral model consisting of cubes, cylinders and balls,
  3. Even if I’d want a polyhedral model: modeling it in CAD takes very little time and will always be more versatile than what a tool can provide.

So my advice would be to spend your time looking into CAD modeling and above procedure, and ideally writing down some documentation on the process, rather than to develop a tool.

1 Like
3 Likes

Thank you for your lengthily response, I agree with most points and found really cool workarounds to some of the problems I faced in the past.

I agree that when doing complex, one-off models, when needing to add nice visuals and when adding other non-basic stuff to non-basic robots, CAD modelling and manual URFD/Gazebo file scripting will probably always be better then a tool. Especially because its a ‘do once, use many times’ type of task as you correctly put it.

That is why, what i’m actually trying to confirm is if providing a tool for getting started with simulating of the minimal working examples of the most common basic robot types (eg. differential, acherman, …) would be beneficial. How I imagine this tool would be advantageous to creating the same simple robots with the mentioned CAD procedure is:

  • it would spit out all necessary files required to quickly run a minimal working example of a specified robot in Gazebo (not only URDFs and DAEs, but also full description package with description.launch, CMakelists and package.xml files, all correctly formatted to simply import into workspace and run)
  • the files it would spit out would adhere to ROS standards and have a proper package and code structure and would set a precedent for further manual additions which speeds up further development.

Additionally because this is a ‘do once, use many times’ type of task, every time I had to do it, I found myself always having to recycle old projects along with all the errors and it took an unnecessarily long time to adapt it to my new uses.

And while writing down documentation and even just opensourcing a minimal working examples of all these robots would probably address a lot of mentioned issues, “a tool” would maybe bring robot simulation closer to the beginners and provide a quicker solution to experienced developers which need to deal with this from time to time.

Do you find these arguments compelling? Thank you for any toughs.

Extra working examples are surely always beneficial, especially the way you intend with full packages, launch files, etc.

And you seem keen to put in the work, so I’d say go for it! :slight_smile:

Make sure to have a look a the Gazebo example worlds and the ros_gz_project_template, which can help as a starter.

1 Like