Can't build package with gazebo plugin

asked 2023-02-27 09:59:09 -0500

muronglindong gravatar image

updated 2023-02-27 19:28:51 -0500

Hi, I tried to build a package with a gazebo plugin, but got an error:

--- stderr: bp_gazebo                             
make[2]: *** No rule to make target “/usr/lib/x86_64-linux-gnu/libsdformat9.so.9.5.0”,needed by “libbp_joints.so”. Stop.
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/gazebo-11/gazebo/common/common.hh:8,
                 from /usr/include/gazebo-11/gazebo/gazebo_core.hh:19,
                 from /usr/include/gazebo-11/gazebo/gazebo.hh:20,
                 from /home/mu/bp/bp0_0/src/gazebo/bp_gazebo/src/bp_joints.cpp:2:
/usr/include/gazebo-11/gazebo/common/Battery.hh:25:10: fatal error: sdf/sdf.hh: No such file or directory
   25 | #include "sdf/sdf.hh"
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/bp_joints.dir/build.make:63:CMakeFiles/bp_joints.dir/src/bp_joints.cpp.o] error 1
make[1]: *** [CMakeFiles/Makefile2:78:CMakeFiles/bp_joints.dir/all] error 2
make: *** [Makefile:141:all] error 2
---
Failed   <<< bp_gazebo [0.49s, exited with code 2]

Summary: 0 packages finished [0.70s]
  1 package failed: bp_gazebo
  1 package had stderr output: bp_gazebo

I tried to fix it as here, but the error still exists. So how can I do? Thank you!

edit retag flag offensive close merge delete