Gazebo | Ignition | Community
Ask Your Question
0

How to change from libsdformat version 9 to >=10 for parameter parsing in nested model.sdf files?

asked 2023-03-31 04:38:53 -0600

Happy25 gravatar image

updated 2023-04-14 02:39:02 -0600

Hello all,

I want to use the "include tag" in model.sdf files to reduce file duplication and to create instances of the same model like sensors, actors and some thing similar. Therefore it is necessary to pass parameters from the including model.sdf file to the included model.sdf file. Refer this page for an example.

In the example above, the specific sdf version and libsdformat version is:

SDF version: 1.7
libsdformat version: 10

So I checked my current setup with

apt list | grep libsdformat

that prints the installed libsdformat versions as follows:

libsdformat-dev/jammy 12.3.0+ds-2 amd64
libsdformat12-12/jammy 12.3.0+ds-2 amd64
libsdformat12-dbg/unknown 12.7.1-1~jammy amd64
libsdformat12-dev/unknown,now 12.7.1-1~jammy amd64 [installed]
libsdformat12/unknown,now 12.7.1-1~jammy amd64 [installed]
libsdformat13-dbg/unknown 13.4.1-1~jammy amd64
libsdformat13-dev/unknown 13.4.1-1~jammy amd64
libsdformat13/unknown 13.4.1-1~jammy amd64
libsdformat6-dev/jammy,jammy 12.3.0+ds-2 all
libsdformat9-9/jammy,now 9.7.0+ds-1 amd64 [installed,automatic]

To see which version is used for a running Gazebo simulation, I used

ldd $(which gazebo) | grep libsdformat

and the output is:

libsdformat9.so.9 => /lib/x86_64-linux-gnu/libsdformat9.so.9 (0x00007f4cf525f000)

Furthermore, the ros-humble-gazebo-plugins are used for the simulation and libsdformat9-9 is the connected version.

apt show ros-humble-gazebo-plugins | grep libsdformat

Depends: libboost-thread1.74.0 (>= 1.74.0), libc6 (>= 2.35), libgazebo11 (>= 11.10.2+dfsg), libgcc-s1 (>= 3.3.1), libignition-math6-6 (>= 6.10.0+ds3), libogre-1.9.0v5 (>= 1.9.0+dfsg1-9~), libopencv-core4.5d (>= 4.5.4+dfsg), libopencv-imgproc4.5d (>= 4.5.4+dfsg), libprotobuf23 (>= 3.12.4), libsdformat9-9 (>= 9.7.0+ds), libstdc++6 (>= 11), libtbb12 (>= 2021.4.0), ros-humble-camera-info-manager, ros-humble-cv-bridge, ros-humble-gazebo-dev, ros-humble-gazebo-msgs, ros-humble-gazebo-ros, ros-humble-geometry-msgs, ros-humble-image-transport, ros-humble-nav-msgs, ros-humble-rclcpp, ros-humble-sensor-msgs, ros-humble-std-msgs, ros-humble-std-srvs, ros-humble-tf2-geometry-msgs, ros-humble-tf2-ros, ros-humble-trajectory-msgs, ros-humble-ros-workspace

So the questions are how can the used libsdformat version be changed from 9 to 10 or 12 for a running Gazebo (version 11.10.2) simulation?
How is it possible to use libsdformat version 10 or 12 for the ros-humble-gazebo-plugins?

It would be very nice if someone can give me an advice or hint to achieve that.
I look forward to hearing from you.

Best regards

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-04-17 10:27:43 -0600

azeey gravatar image

Gazebo-classic (version 11) is built with libsdformat9. Changing to a different version requires making changes to the Gazebo source code to use the desired version of libsdformat, and compiling it. This may not be trivial, but should be doable. You might also have to do the same for ros-humble-gazebo-plugins.

edit flag offensive delete link more

Comments

Hello azeey, thank you for the reply. Can you confirm that parameter passing is working in Gazebo with libsdformat version 10? Or maybe libsdformat version 12?

Happy25 gravatar imageHappy25 ( 2023-04-19 12:39:45 -0600 )edit

No, it currently doesn't work for Gazebo-classic. You'll have to make the necessary code changes to make it work. It works in Gazebo Fortress or Garden if you want to take a look at those.

azeey gravatar imageazeey ( 2023-04-19 15:59:22 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-03-31 04:38:53 -0600

Seen: 643 times

Last updated: Apr 17 '23