Gazebo | Ignition | Community
Ask Your Question

Can't get ContainPlugin to trigger in Tutorial

asked 2019-03-27 03:53:44 -0600

gaznoob gravatar image

Hello, I can't get this ContainPlugin to trigger the light on according to this tutorial (

I've downloaded the files to ~/gaztut/contain_plugin/,

then ran $ cmake ../ $ make in ~/gaztut/contain_plugin/build/,

set the source with $ usr/share/gazebo/,

added the library path with $ export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:~/gaztut/contain_plugin/build,

then started $ gazebo ~/gaztut/contain_plugin/ --verbose.

The ball rolls down and away but no light is triggered on. Shell shows:

Gazebo multi-robot simulator, version 9.8.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.

[Msg] Waiting for master.
[Msg] Connected to gazebo master @
[Msg] Publicized address:
[Wrn] [] emission texture not supported
Service [/~/contain_example/enable] is not valid.
Topic [/~/contain_example/contain] is not valid.
[Msg] Started contain plugin [~/contain_example]
[Msg] Loading Example plugin

Are these two messages

Service [/~/contain_example/enable] is not valid.
Topic [/~/contain_example/contain] is not valid.

relevant? I've tried another world-file only launching <plugin name="TestPI" filename=""> but they still appear.

Further, what's the difference between ContainPlugin and OccupiedEvent from SimEventsPlugin? They both seem to trigger when something enters their specified area... Please help me! Thank you in advance! :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-19 01:41:16 -0600

dogukan_altay gravatar image

"In gazebo 9 and beyond the gazebo topics are removed; only the ignition transport topics are available." The problem lies here. We need to use ignition transport services in order to get the plugin's messages. In the source code, the plugin publishes to a ignition topic. But I cant seem to find any examples yet.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-03-27 03:35:05 -0600

Seen: 208 times

Last updated: Apr 19 '19