dolly icon indicating copy to clipboard operation
dolly copied to clipboard

Deduplicate the robot model

Open chapulina opened this issue 2 years ago • 2 comments

There are 2 Dolly SDF models now, one for Gazebo Classic and one for Ignition Gazebo:

  • https://github.com/chapulina/dolly/tree/foxy/dolly_gazebo/models/dolly
  • https://github.com/chapulina/dolly/tree/foxy/dolly_ignition/models/dolly_ignition

I kept them separate for expediency, but they could be moved to a single dolly_description package and reused for both simulators. Xacro could be used to insert the plugins appropriate to each simulator.

chapulina avatar Sep 27 '21 02:09 chapulina

Hi!

I'm working on this branch, and I have some questions:

  1. Is it possible to include xacro tags directly in the SDF code? I was looking but I did not find decision blocks (similar to the xacro:if) for SDF. In ROS2 Foxy documentation I found that they can be replaced from the launch file, so I proceeded that way, processing the xacro file to get the robot description. But it would be great to replace them from the SDF.

  2. can revolution joints be used in a xacro file? In the original Dolly model, a Joint Revolute is used for the wheels. However, when I wrote the Xacro I use Continuous Joints since in this way the diff_drive plugin can work correctly. Or is it an error with my environment?

MartinNievas avatar Oct 11 '21 21:10 MartinNievas

Is it possible to include xacro tags directly in the SDF code?

I recently looked a bit into it and I couldn't find a way :confused: I originally thought that xacro was general enough to template any XML file but now I think it's very specific to URDF...

In this case, I think it may be possible to use SDF param passing. It's not as flexible as xacro, but it should be enough.

can revolution joints be used in a xacro file?

URDF has a revolute joint type, but in this use case, continuous would be more fitting. SDF uses revolute for both types.

I've been trying to stick to SDF with Dolly because it's more flexible than URDF, but as you're seeing, there are some details still to be figured out :slightly_smiling_face:

chapulina avatar Oct 19 '21 16:10 chapulina