Errors in the source code of the Gazebo plugin developer tutorial

asked 2022-12-12 06:59:55 -0500

Gavriel-CTO gravatar image

updated 2022-12-12 07:04:35 -0500

I am following the tutorial for compiling a custom Gazebo plugin: http://classic.gazebosim.org/tutorial...

I am getting the following two errors in the ContactPlugin.hh file:

identifier "sdf" is undefined

namespace "gazebo::event" has no member "ConnectionPtr"

I tried to install everything I could find regarding Gazebo and SDF. I am at a loss. In my include paths include:

/usr/include/gazebo-11/**

/usr/include/sdformat-9.8/sdf/**

I have also tried switching the #include to:

gazebo-11/gazebo/gazebo.hh

but to no avail.

Any help would be greatly appreciated, Thanks!

edit retag flag offensive close merge delete

Comments

Maybe this is a vscode issue... but I tried the hello-world example and even though I had the same errors, it compiled with including only the gazebo-11 path and including <gazebo gazebo.hh="">

Gavriel-CTO gravatar imageGavriel-CTO ( 2022-12-12 08:48:01 -0500 )edit

I'm having the same issue. It's just vscode that's acting up though since the plugin compiles just fine. But it would be nice if there was a fix.

lem2300 gravatar imagelem2300 ( 2023-02-23 06:00:16 -0500 )edit