How to access directly libsdformat package with python?

I install gazzebo latest version and can not find libsdformat is installed but I can access gz sdf command in terminal. Version is 14.1.1 for gz sdf --version command.

How to access directly libsdformat package with python? and also gz package?

you can see here: Python bindings — Documentation

When import package, show not package installed.

import sdformat13 as sdf

try:

import sdformat14 as sdf

Even import sdformat14 as sdf this also not work. How to troubleshoot this to check where it is install and why it is not import. rclpy package can import but this can not. No module.

Please send me manual install method for Ubuntu.

I try to install

sudo apt install libsdformat14-dev libsdformat14
AND
conda install libsdformat --channel conda-forge

But still can not import it.

sudo apt install python3-sdformat14 ?

Question, since I have mac only at the moment. Linux is at work.

How do I access to python on mac m2?

On macOS, just installing sdformat14 via homebrew will install the python bindings.

1 Like